[mrtg] Re: Daemons and Forks
Chris Marlow
marlowc at us.ibm.com
Thu Feb 22 13:14:08 MET 2001
Well, I'm more of an AIX guy than a Linux guy, but here's what generally
happens:
You look at the .pid file, and kill that parent process...
Sometimes (Depending on the program running), the children will
realize their parents are dead, go into mourning, and die themselves.....
Sometimes, the children won't see their parents are dead, and stay up
all night eating cookies and watching TV....
Some suggestions as to what you can do:
If you want to kill all MRTG processes that are running, look at the
process table, and do a search on "path to MRTG here". Kill those
processes
Conversly, if you want to just kill the childred of a parent, whose
PID you have, the process table showes the PID for each process. Using
that, you can determine which children came from which parent.
Let me know if you need me to get more detailed with the PERL coding
Good luck, happy hunting,
-Chris
-----
Christopher S. Marlow
AIX Infrastructure / 24x7 Security
Burlington, VT
Phone: 802-769-3253
Tie line: 446-3253
e-mail: marlowc at us.ibm.com
Vargas Miguel <mvargas at tnsi.com> on 02/21/2001 05:00:43 PM
To: Chris Marlow/Burlington/Contr/IBM at IBMUS, Vargas Miguel
<mvargas at tnsi.com>
cc: mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Daemons and Forks
Could I just kill the pid listed in the .pid file? If the other forks are
running will they die also?
> -----Original Message-----
> From: Chris Marlow [SMTP:marlowc at us.ibm.com]
> Sent: Wednesday, February 21, 2001 3:04 PM
> To: Vargas Miguel
> Cc: mrtg at list.ee.ethz.ch
> Subject: Re: [mrtg] Daemons and Forks
>
>
> If you know perl, you could parse the process table, looking for "mrtg",
> and kill those processes, then remove the "logfilenamehere".pid files
from
> your directory. All in all, not hard to do.
>
> -Chris
>
> -----
> Christopher S. Marlow
> AIX Infrastructure / 24x7 Security
> Burlington, VT
> Phone: 802-769-3253
> Tie line: 446-3253
> e-mail: marlowc at us.ibm.com
>
>
> Vargas Miguel <mvargas at tnsi.com>@list.ee.ethz.ch on 02/21/2001 02:22:45
PM
>
> Sent by: mrtg-bounce at list.ee.ethz.ch
>
>
> To: mrtg at list.ee.ethz.ch
> cc:
> Subject: [mrtg] Daemons and Forks
>
>
>
>
> I want to run mrtg as a daemon with 4 forks in Linux. I have a pretty
big
> network (100+ routers). I run cfgmaker every night in order to see if
> there
> are new interfaces on any of the routers, so I need to restart mrtg from
a
> cron job. Is there a way that I could stop all 4 mrtg processes and
> restart
> them from a cron job?
>
> thanks
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive http://www.ee.ethz.ch/~slist/mrtg
> FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
> WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>
>
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list