How to get memory and CPU status of a particular process

Taskinoor Hasan taskinoor.hasan at csebuet.org
Tue Feb 23 08:30:00 CET 2010


On Tue, Feb 23, 2010 at 9:48 AM, R. P. Janaka <rpjanaka at gmail.com> wrote:

> Hi all,
>
> Is there a way to get system memory consumption and CPU consumption in a
> platform independent way, using python...?
>
> Basically my requirement is, get the memory status and CPU status of a
> particular process. If there is a way to get memory info and CPU info by
> just giving the process ID, that is exactly what I need to do :)
> Is this possible with python..?
>

I'm afraid that this is not possible in a platform independent way. In case
of Windows, you can look at Tim Golden's WMI module for Python. And in case
of Linux, you need to dig the details of /proc.

Regards
Taskinoor Hasan (Sajid)

>
> --
> Regards,
> R. P. Janaka
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100223/25034f66/attachment.html>


More information about the Python-list mailing list