How can I track/monitor an application and system resources.

Jordan jordan.taylor2 at gmail.com
Thu Feb 22 12:47:53 EST 2007


On Feb 22, 11:48 am, "richar... at latter.demon.co.uk"
<richar... at latter.demon.co.uk> wrote:
> Hello All,
>
> I'm a newbie to Python!
>
> I am trying to develop a program that monitors the performance of an
> application.  The kind of information I am interested in is the CPU/
> Process/Thread and memory performance. Specifically, I would like to
> track the following
>
> CPU usage
> Used Memory on Phone
> Free Memory on Phone
> Number of Processes running
> Number of threads running
> Number of Filehandles currently open
> Memory used by a process/thread
> Process/Thread CPU activity.
>
> All this under Windows
>
> Can anyone help me, or direct me to the appriopriate API's so I can
> get the above information?
>
> Does anyone have any other sugestions on what else I could monitor for
> a running application?
>
> Does anyone have any example code they can direct me to?
>
> Many thanks in advance,
>
> Richard

You will definitely want to check out pywin32api, because it is the
best (and most powerful) way to interact with windows through python.
Also, if you know any c++, you might search for taskmanager extensions
on codeproject.com or look at the msdn on taskmanager to see how it
gets all of its information (which is essentially what you want -- a
taskmanager).  Either way you'll almost defitely need pywin32, so look
there first.

Cheers,
Jordan




More information about the Python-list mailing list