Also, and I'm not saying this is a solution, you can run:
'UNIX95=1 /usr/bin/ps -e -o
pid,ppid,pgid,user,uid,vsz,time,etime,comm,args'
which goes a long way towards being able to parse ps portably on most major
Unix platforms. I can't tell you how much mileage we have gotten out of
this simple step. Just thought it was worth a mention. ;)
You might be able to derive %busy using time, etime, and the load average
though. But the problem you are going to run into is what if your child is
CPU bound? Can't do much about that unless you use something proprietary I
think.
-
Lance Braswell - + 1 469 357 6112
[EMAIL PROTECTED]
a
To
05/03/2005 12:55 Rocco Caputo <[EMAIL PROTECTED]>
PM cc
poe@perl.org
Subject
Re: How to make as much childs as
possible, but not more than 50% of
CPU
On 03-May-2005 Rocco Caputo wrote:
> On Tue, May 03, 2005 at 11:47:19AM +0400, Alex wrote:
>> How to make as much childs as possible, but not more than
>> (for example 50%) of CPU.
>
> I don't know. How does one portably determine their machine's idle
> CPU percent?
Proc::ProcessTable supports a suprising number of OSes. Dunno if it
returns the info needed, though.
http://search.cpan.org/~durist/Proc-ProcessTable-0.39/
-Philip