in reply to Calculating percent cpu in linux?
Maybe that is what you mean. If not, and your machine actually does have a /proc/PID/* directory, then this does not seem like a very portable manner of doing it. Perhaps you should rethink using ps, as it should be very portable.
If you really want to use the 'pure perl' method, then you will not reinvent the wheel. Look here at Proc::ProcessTable from... you guessed it CPAN. It will do everything you need.
Good luck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calculating percent cpu in linux?
by suaveant (Parson) on May 03, 2005 at 04:22 UTC |