[mrtg] AW: Help regarding Perl script

Michel.Grossenbacher at coop.ch Michel.Grossenbacher at coop.ch
Mon Feb 11 15:02:40 MET 2002


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



More information about the mrtg mailing list