[mrtg] Re: AW: Help regarding Perl script

Michael Marziani michaelm at kw.com
Mon Feb 11 15:30:09 MET 2002


That's a great solution, but a better one is to run MRTG through cron or
as a daemon (the two ways suggested in the setup docs).  I prefer
daemonizing  :)

-Mike

_____________________________
Michael D. Marziani
Systems Administrator


-----Original Message-----
From: Michel.Grossenbacher at coop.ch [mailto:Michel.Grossenbacher at coop.ch]

Sent: Monday, February 11, 2002 8:03 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] AW: Help regarding Perl script



Hi Shujaat
How do you start your Perlscript?

Do you use a "&" in the command line?

like:

perl yourscript.pl &

This will force the script to run in the background so you dont have to
keep a telnet session open. Greets

Michel

-----Ursprungliche Nachricht-----
Von: Shujaat Nazir Khan [mailto:snk at cyber.net.pk]
Gesendet: Montag, 11. Februar 2002 14:57
An: Mrtg List
Cc: Shujaat Nazir Khan
Betreff: [mrtg] Help regarding Perl script


Hi All

I am running mrtg2.9.12 on Solaris platform. I am running .cfg files by
using Perl script which is given below:

#!/usr/bin/perl
$interval=120;
while(1)
{ sleep ($interval - time() % $interval);
system '/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/conf/mrtg.cfg';
system '/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/conf/mrtg2.cfg';
}

But whenever I exit from Telnet session the script becomes stopped.
Everytime I have to go on Server's Console & start the script. Is there
anyway to get rid of such a hectic situation ??? Immediate response will
be highly appreciable.....!

Thanks 'n' regards,
Shujaat Nazir Khan



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