inspec/test/unit/mock/cmd/ps-busybox
Jonathan Hartman 7451917223 Support finding larger processes on Busybox (#3446)
For larger processes, Busybox's ps displays the vsz and rss columns in
megabytes or gigabytes, with no option I've found to override the behavior.

This change updates the process regex to account for that and converts
the values to kilobytes so they can still be cast as integers.

Signed-off-by: Jonathan Hartman <j@hartman.io>
2018-10-04 14:06:17 -04:00

5 lines
299 B
Text

PID VSZ RSS TT STAT TIME RUSER COMMAND
1 1536 4 136,0 S 0:00 root /bin/sh
5 1528 4 136,0 R 0:00 joe /some/other/coolprogram
82 24m 2m ? S 3:50 frank /a/bigger/program
83 2.6g 1g ? S 39:00 tim /the/biggest/program