|
#!/usr/bin/perl -P
open (Ps, '/bin/ps -el|' ) || die "scan_ps: can't run ps" ;
while (<Ps>) {
next if /rwhod/;
print if index ( ' T' , substr ( $_ ,62,1)) < 0;
}
open (Ps, '/bin/ps auxww|' ) || die "scan_ps: can't run ps" ;
while (<Ps>) {
next if /dataserver/;
next if /nfsd/;
next if /update/;
next if /ypserv/;
next if /rwhod/;
next if /routed/;
next if /pagedaemon/;
( $user , $pid , $cpu , $mem , $sz , $rss , $tt , $stat , $start , $time ) = split ;
( $user , $pid , $cpu , $mem , $sz , $rss , $tt , $stat , $time ) = split ;
print if length ( $time ) > 4;
}
|