mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
fix bug: RegExp in processes resource can't match long-run process #1332
Signed-off-by: Wei, He <weihe924stephen@gmail.com>
This commit is contained in:
parent
1cd2519d90
commit
861856fbd9
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ module Inspec::Resources
|
|||
|
||||
if os.linux?
|
||||
command = 'ps axo label,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,user:32,command'
|
||||
regex = /^([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+(.*)$/
|
||||
regex = /^([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+(\w{3} \d{2}|\d{2}:\d{2}:\d{2})\s+([^ ]+)\s+([^ ]+)\s+(.*)$/
|
||||
else
|
||||
command = 'ps axo pid,pcpu,pmem,vsz,rss,tty,stat,start,time,user,command'
|
||||
regex = /^\s*([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+(.*)$/
|
||||
|
|
Loading…
Reference in a new issue