[python-win32] Capturing a Python script's Task Manager statistics

python at bdurham.com python at bdurham.com
Fri Jun 20 16:57:45 CEST 2008


Anyone know of a way to have a Python script capture its own Task
Manager statistics?

I have a long running Python script whose CPU, memory, disk i/o, and
network traffic I would like to monitor.

An alternative more generic approach would be to run an 'observer'
script that would monitor all Task Manager statistics so I could watch
multiple scripts.

Motivation: I would like to track this script's resource requirements
and if the script detects its exceeding some pre-defined resource limits
for a certain amount of time, to send out an alert.

Any suggestions (or recommendation on a 3rd party that does the same)
appreciated.

Thank you,
Malcolm


More information about the python-win32 mailing list