anyone who has used the resource module?

etsang at my-deja.com etsang at my-deja.com
Wed Nov 15 20:40:06 EST 2000


Hi I have found some documentatin about a resource module provided in
python. link: http://python.org/doc/current/lib/node216.html
It says it can tracks resource usage on a couple aspects.

But I am not getting how it can apply to my current situation.

Right now I have a program which uses its python part to control the C
part of it.
Everytime I use python myprogram.py to invoke the whoel thing.
So myprogram.py is my entry point.
from myprogram.py, it wil spawn some other process, pure binary process
and commmunicate with them. There is only one child process at a time.
I have a lot of problems with the application, which I suspect is
resource issue related.
PRoblems that I faced are like: inconsistent core dumped,and  exit,
system IO error, system bus error.
This happens in different of the day with the application used in same
way. Sometimes it happens during th day, sometimesthe problems sidapper
in weekend.. It is very very inconsistent and I find recreating it very
hard. So I would like to do some syste resource profiling.

I am insterested in tracking the the resoruce usage for the wholething
until it failed.
So I am thinking of saving those date in a file and use the return
vaules from the functions provided by the resource module as input to
the file.
So has anyone used this module to track the resource?
If so can someone suggest how to do it? If some sample code is very
helpful.
Also,let say the program cashed in the middle, how can I ensure the
date that I ahve written the file is not lost?


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list