[mrtg] Fwd: RE: Setting up MRTG as a Windows Service

Westley Chang ChangW at gao.gov
Thu Jan 6 22:11:10 MET 2005



>>> Westley Chang Thursday, January 06, 2005 4:08:50 PM >>>
Jon,
   Thanks for the quick response.  However, if I log off the machine,
will the processes terminate?  In addition, how do you call your file
without the .cfg extension.  Please advise.  Thanks!

          Wes

>>> "Shier, Jon" <JonS at mtrx.com> Thursday, January 06, 2005 4:05:16 PM
>>>
I have one file that call all for all my cfg files, In my batch file I
have

Perl c:\mrtg\bin\mrtg --logging=eventlog c:\mrtg\config\mrtg (I don't
have an extension on this file)

In the mrtg file I have

Workdir: c:\mrtgdata\
LogFormat: rrdtool
PathAdd: c:\rddtool\perl-shared
RunAsDaemon:Yes 
Interval: 5
Refresh: 300
WithPeak[_]: ymwd
Options[_]: growright, bits, unknaszero

Include: C:\mrtgdata\mrtg1.cfg
Include: C:\mrtgdata\mrtg2.cfg
Include: C:\mrtgdata\mrtg3.cfg
And so on.

That way you only have one perl.exe running on the system

Jon

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]

On Behalf Of Westley Chang
Sent: Thursday, January 06, 2005 12:58 PM
To: mrtg at list.ee.ethz.ch 
Cc: oetiker at ee.ethz.ch 
Subject: Spam Filter:[mrtg] Setting up MRTG as a Windows Service

Hello,
   I just got the new version of mrtg-2.11.1 installed.  Thanks
Tobias!
 However I am having a bit of a problem with setting up MRTG as a
windows service.  
   Apparently I have MRTG running fine as a service with one entry in
the mrtg.bat file.  However, if you add more than one command line in
the mrtg.bat file (please see example below), the MRTG service will
only
execute one at a time.  Therefore, if I have a mrtg.bat file as such:


perl c:\mrtg\bin\mrtg --logging=eventlog c:\mrtg\config\mrtg.cfg perl
c:\mrtg\bin\mrtg --logging=eventlog c:\mrtg\config\mrtg2.cfg perl
c:\mrtg\bin\mrtg --logging=eventlog c:\mrtg\config\mrtg3.cfg

The MRTG service will only invoke the first mrtg.cfg file.  HOWEVER,
if
you stop the MRTG service and restart it again, it will execute the
second one.  And so on.  Is there any way the mrtg.bat file can
execute
several .cfg files at once instead of starting and stopping a service.

Please advise.  Thanks!


            Wes

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