LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I stop MRTG? (http://www.linuxquestions.org/questions/linux-networking-3/how-do-i-stop-mrtg-222617/)

dani81 08-26-2004 08:36 AM

How do I stop MRTG?
 
Quote:

MAX91216# crontab -l
crontab: no crontab for root
MAX91216# ps -ax | grep mrtg
1084 ?? Is 0:00.08 /usr/local/bin/perl -w /usr/local/bin/mrtg /usr/local
1088 p0 RV 0:00.00 grep mrtg (csh)
MAX91216# kill 1084
ERROR: Bailout after SIG TERM
*** Restarting after 10 seconds in an attempt to recover from the error above
MAX91216# /usr/local/bin/mrtg /usr/local/etc/mrtg/network.cfg
Daemonizing MRTG ...
ERROR: I Quit! Another copy of mrtg seems to be running. Check /usr/local/etc/mrtg/network.pid
MAX91216# ps -ax | grep mrtg
1089 ?? Ss 0:00.08 /usr/local/bin/perl -w /usr/local/bin/mrtg /usr/local
MAX91216#
How do i stop MRTG???

PenguinPwrdBox 08-26-2004 09:02 AM

Code:

kill 1089

Dark_Helmet 08-26-2004 02:13 PM

He's already tried that... He did a "kill 1084" previously, but MRTG detected the SIGTERM and restarted itself in 10 seconds. Killing the process a second time would likely only repeat the sequence.

The kill program defaults to sending a SIGTERM signal if none is specified. It could be that MRTG is specifically looking for that signal, catches it, and performs some sort of "graceful" recovery. You could try a "kill -9 1084" which sends a SIGKILL signal that cannot be caught (according to the kill man page). MRTG ought to be abruptly killed.

If the script does restart, then there's an external process monitoring MRTG's existence, and you would have to track it down (similar to your demonstration with "crontab -l"). If this is the case, check your system crontabs as well (not just root's personal crontab) Also, see if there's any configuration file changes you can make to whatever files MRTG looks at in /usr/local. I assume it's getting its configuration from there since you are obviously trying to have it run with a different config file later on.

Disclaimer: I've never used MRTG nor do I have the slightest clue what it's used for

nweaver916 08-26-2004 03:42 PM

MRTG is an SNMP router monitoring tool...(very nice one at that)

It is usually set up to run every X minutes (Mine runs every 5). It uses that to build historic router usage charts.

You need to get it out of cron, so that it doesn't start up every 5 mins. I am a n00b, so I dont' really know how. if you kill mrtg, it will just restart in 5 minutes anyway. Normally, it starts, runs it's script, and then terms itself.

Hope that helps a little bit.

dani81 09-03-2004 05:17 AM

Quote:

Originally posted by Dark_Helmet
He's already tried that... He did a "kill 1084" previously, but MRTG detected the SIGTERM and restarted itself in 10 seconds. Killing the process a second time would likely only repeat the sequence.

The kill program defaults to sending a SIGTERM signal if none is specified. It could be that MRTG is specifically looking for that signal, catches it, and performs some sort of "graceful" recovery. You could try a "kill -9 1084" which sends a SIGKILL signal that cannot be caught (according to the kill man page). MRTG ought to be abruptly killed.

If the script does restart, then there's an external process monitoring MRTG's existence, and you would have to track it down (similar to your demonstration with "crontab -l"). If this is the case, check your system crontabs as well (not just root's personal crontab) Also, see if there's any configuration file changes you can make to whatever files MRTG looks at in /usr/local. I assume it's getting its configuration from there since you are obviously trying to have it run with a different config file later on.

Disclaimer: I've never used MRTG nor do I have the slightest clue what it's used for

Thx It did the trick. I found out what is was. I put in my mrtg config that MRTG has to run as a Deamon en has to restart every 5 min. So that is why it wasn't in my crontab :)


All times are GMT -5. The time now is 01:51 PM.