home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_20d1244b185192557ac22979a981580b
< prev
next >
Wrap
Text File
|
2000-03-15
|
788b
|
33 lines
#!/usr/bin/perl -P
# $RCSfile: scan_ps,v $$Revision: 4.1 $$Date: 92/08/07 17:20:40 $
# This looks for looping processes.
#if defined(mc300) || defined(mc500) || defined(mc700)
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;
}
#else
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/;
#ifdef vax
($user,$pid,$cpu,$mem,$sz,$rss,$tt,$stat,$start,$time) = split;
#else
($user,$pid,$cpu,$mem,$sz,$rss,$tt,$stat,$time) = split;
#endif
print if length($time) > 4;
}
#endif