Process details

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Mar 14 06:12:27 EST 2001


Timothy Grant <tjg at exceptionalminds.com> writes:

> I need to create a list of processes and process information. I
> have created a class that contains much of the information in
> /proc/'pid'/status.
> 
> It works quite well, however, it takes about four seconds to
> populate a list of 90 procs. This seems a bit long. Is there a
> faster way to get ahold of the information than reading /proc?

It depends on you exactly you read them, and what information exactly
you need. os.listdir("/proc") never took more than 10ms on my system.

Regards,
Martin



More information about the Python-list mailing list