LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-26-2004, 08:36 AM   #1
dani81
LQ Newbie
 
Registered: Aug 2004
Posts: 13

Rep: Reputation: 0
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???
 
Old 08-26-2004, 09:02 AM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
Code:
kill 1089
 
Old 08-26-2004, 02:13 PM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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
 
Old 08-26-2004, 03:42 PM   #4
nweaver916
LQ Newbie
 
Registered: Aug 2004
Location: Boise, ID
Distribution: RH9
Posts: 15

Rep: Reputation: 0
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.
 
Old 09-03-2004, 05:17 AM   #5
dani81
LQ Newbie
 
Registered: Aug 2004
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop MRTG Emails sti2envy Linux - Networking 2 12-28-2005 02:57 AM
How do I stop services from restarting after I stop them? M$ISBS Linux - Software 3 10-27-2005 09:13 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 08:29 PM
mrtg jcb_dreamvsat Linux - Networking 2 11-02-2003 12:59 PM
Mrtg Infynite Linux - Software 3 10-02-2003 02:49 AM


All times are GMT -5. The time now is 11:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration