in reply to Process Management
Perl has a module for looping thru it all and creating stats, it uses alot of cpu though, so often you might want to run the system utlities like 'top', and 'ps auxww', thru system.
#!/usr/bin/perl use Proc::ProcessTable; # Dump all the information in the current process table $t = new Proc::ProcessTable; while(1){ foreach $p (@{$t->table}) { print "\n--------------------------------\n"; foreach $f ($t->fields){ print $f, ": ", $p->{$f}, " "; } } sleep(1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Process Management
by almut (Canon) on Jan 17, 2009 at 20:43 UTC |