Mailing List Archive

How to use Perfmon Library
Hello,

Is it anybody that can give me some information
about the usage of Perfmon library ?

I want to monitor a process on a remote NT server


Thanks,

Jacobo


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
How to use Perfmon Library [ In reply to ]
There are 2 ways to use the performance monitor:

* If you just want to collect performance data from an existing process that
is "performance monitor aware" (or you just want to see data that NT
provides, such as memory usage, processor utilization etc. This is quite
simple to use - you use the win32pdhutil module - there is a sample
"killProcName.py" that shows how to use these functions to query the local
machine - a remote machine is not much harder.

* If you want your application to provide custom perfmon data that another
process can read, then this is significantly harder - you really need to
read the NT documentation on how to do this; Python just wraps the standard
NT APIs.

Mark.

belbo_j@my-deja.com wrote in message <7kvrrc$2d3$1@nnrp1.deja.com>...
>Hello,
>
>Is it anybody that can give me some information
>about the usage of Perfmon library ?
>
>I want to monitor a process on a remote NT server
How to use Perfmon Library [ In reply to ]
Thanks for this info
My target is to monitor for certain process on a remote NT Server
- Memory usage
- Processor usage
- Is it alive

with killProcName.py I can just working with a local machine

After a search on MSDN it seems that I must work with
KHEY_PERFORMANCCE_DATA + other specific call
I have found this in the Python Perfmon module from a certain Mark H.
You know this guy ? ;-)
But without example is not easy to use

Jacobo

Mark Hammond wrote:

> There are 2 ways to use the performance monitor:
>
> * If you just want to collect performance data from an existing process that
> is "performance monitor aware" (or you just want to see data that NT
> provides, such as memory usage, processor utilization etc. This is quite
> simple to use - you use the win32pdhutil module - there is a sample
> "killProcName.py" that shows how to use these functions to query the local
> machine - a remote machine is not much harder.
>
> * If you want your application to provide custom perfmon data that another
> process can read, then this is significantly harder - you really need to
> read the NT documentation on how to do this; Python just wraps the standard
> NT APIs.
>
> Mark.
>
> belbo_j@my-deja.com wrote in message <7kvrrc$2d3$1@nnrp1.deja.com>...
> >Hello,
> >
> >Is it anybody that can give me some information
> >about the usage of Perfmon library ?
> >
> >I want to monitor a process on a remote NT server