Alan Gauld wrote:

>> shell out to perform the top command, parse the results, and report
>> those values to the job controller.
>
>
> I'd use vmstat rather than top since top is intended to run
> contuinuously whereas vmstat by default just returns a single line
> snapshot.
>
> I don't know of any native python mechanism for obtaining cpu usage.
>
> Alan G


vmstat is a beautiful thing.  Although as I mentioned in reply to others
who responded to my question that top can run just once, top actually
provides much more information than I am intending to use, making it
seem a little wasteful.  vmstat is much more focused on exactly the
information I want.  Although I am using linux pretty much exclusively
these days, there's still a lot that I don't know and I wasn't aware
that it existed.

Thanks

ds


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to