[mrtg] Re: AW: How To run as Daemon

Jason Truong JasonT at plumtree.com
Wed May 29 20:35:45 MEST 2002


Michel,

Thanks for this email...
I was trying to figure out the best way to run MRTG as a daemon...you wouldn't believe it but I have live close to 20 daemons running...one for each cfg file...
So I can just have one daemon and in my mrtg.cfg file, specify:

Include: /etc/mrtg/router1.cfg
Include: /etc/mrtg/switch1.cfg
etc 

Let me give it a shot...

jason


-----Original Message-----
From: Michel.Grossenbacher at coop.ch [mailto:Michel.Grossenbacher at coop.ch]
Sent: Wednesday, May 29, 2002 5:01 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] AW: How To run as Daemon



Hi Jonathan
MRTG got the option to run as a Daemon, its easier to use the option then
create a script on your own.

Create a global configuration file with options you want have for all
configurations, then add the RunAsDaemon option and the Fork. In your case
this would kinda look like this:

Interval: 5
Forks: 4
Refresh: 300
RunAsDaemon: Yes

Include: /home/mrtg/cfg/router01.cfg
Include: /home/mrtg/cfg/router02.cfg
Include: /home/mrtg/cfg/router03.cfg

then just start mrtg with your global configfile and you got your daemon.
greets

Michel


-----Ursprüngliche Nachricht-----
Von: Jonathan P Tornea [mailto:jonathan.tornea at d1asia.com]
Gesendet: Mittwoch, 29. Mai 2002 13:55
An: Mrtg
Betreff: [mrtg] How To run as Daemon



Hi,

I have three diffirent config file im running with mrtg on a cron.  I want
to run this as daemon.  Does the script below will do the trick?


#!/bin/bash
cd /usr/local/mrtg-2917/bin && ./mrtg --user=mrtg
/home/mrtg/cfg/router01.cfg --logging /var/log/router01.log
cd /usr/local/mrtg-2917/bin && ./mrtg --user=mrtg
/home/mrtg/cfg/router02.cfg --logging /var/log/router02.log
cd /usr/local/mrtg-2917/bin && ./mrtg --user=mrtg
/home/mrtg/cfg/router03.cfg --logging /var/log/router03.log



Jonathan P Tornea
Network Engineer
DataOne Asia (Philippines) Inc

DID: (632) 580-9831
FAX: (632) 995-8252

----------------------------------------

This e-mail and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient or the person responsible,
be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying of this e-mail is strictly
prohibited. If you have received this e-mail in error, please immediately
notify DataOne Asia (Philippines) Inc at  +632 580 9888.

--
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

--
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