help with process monitoring using python

Sean Reifschneider jafo at tummy.com
Sat Feb 3 11:41:13 EST 2001


On Sat, Feb 03, 2001 at 02:55:00AM +0300, bashar A. Asad wrote:
>project that will my life easier.  I would like to connect to a remote linux
>machines and check for a certain process "may be useing a system command is
>their something like that in python??" eg. httpd if its up or not if it is
>up the program will produce an activity file or whatever... I have no idea
>how to start working on that in python..any hints guys :)

Check out:

	ftp://www.tummy.com/pub/pythonExamples/checkpid.py

which includes a sample of doing that.  The pid file you want may be
"/var/run/httpd.pid".

I'm actually working on the ultimate process restarter right now.  The
code is done, but I don't have any docs for it yet.  It'll probably
be under ftp.tummy.com:/pub/tummy/ called something like "trestarter"
when it's finally released (hopefully in the next day or so).

Sean
-- 
 YOU ARE WITNESSING A FRONT THREE-QUARTER VIEW OF TWO ADULTS SHARING A
 TENDER MOMENT.  -- Gordon Cole, _Twin_Peaks_
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python




More information about the Python-list mailing list