[python-win32] Process monitor

Mark Hammond mhammond@skippinet.com.au
Tue, 30 Apr 2002 09:14:07 +1000


You may find http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262938
of interest.  I haven't tiem to digest it now, but please let me know what
the up-shot is :)  I will help making any necessary changes.

Mark.

> -----Original Message-----
> From: python-win32-admin@python.org
> [mailto:python-win32-admin@python.org]On Behalf Of Moray B. Grieve
> Sent: Tuesday, 30 April 2002 12:52 AM
> To: python-win32@python.org
> Subject: [python-win32] Process monitor
>
>
> I want to write a python script that monitors a process CPU and
> memory usage, and am basing it on the win32pdhutil wrapper
> module. However, I have noticed that in this module the function
> GetPerformanceAttributes always returns zero for the counter "%
> Processor Time" even when I know a process is using a large
> amount of CPU (as seen from the windows task manager). This is
> also the same for the counters "% User Time" and "% Privileged
> Time" and is easily demonstrated when running ShowAllProcesses,
> which gives zero for all these three counters and for all running
> processes.
>
> Has anyone noticed this before, or can help me as to how I can
> retrieve the CPU usage of a process?
>
> With many thanks for any help,
> Moray Grieve
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>