> > MRTG is a Perl script, not an EXE. Also, it has NO polling/timing > capabilities in and of itself, it just runs and then quits. Its roughly > equivalent to trying to run a batch file as a service (or a Kix script, or > if you have any Unix experience a running a shell script as a deamon) > Not that I would actually do it this way (cron works just fine for me) but here's how I would run mrtg as a daemon: 1) Create a wrapper that calls mrtg every five minutes 2) Run this wrapper from init (include it in /etc/inittab) The script would be while : do /usr/bin/mrtg /home/mrtg/config/router.cfg /usr/bin/mrtg /home/mrtg/config/switches.cfg # above part takes about 5 seconds, sleep 295 more sleep 295 done If this script would abort, it gets immediately fired up again by init, unless it keeps starting and aborting fast. This last part may be hard to implement on NT (wouldn't know). The next release of the script (wow, version 0.0.2a :) would include lines such as NOW=`date +%s` THEN=$((NOW + 300)) # five minutes past now THEN=$((THEN / 300)) # integer divide THEN=$((THEN * 300)) # and multiplication sleep $((THEN - NOW)) to sleep until the next xx:05, xx:10, xx:15 etcetera. "date +%s" returns time in seconds, the calcula on it does this: my local time 0:32:03 becomes 932596323 + 300 makes 932596623 / 300 makes 3108655 * 300 makes 932596500 932596500 - 932596323 == 177 seconds, or 2 minutes and 57 seconds. 0:32:03 + 0:02:57 is 0:35:00 Version 0.1.0 would include error handling /usr/bin/mrtg /home/mrtg/config/router.cfg > tempfile if [ -s tempfile ] # output of mrtg is not empty then mail -s mrtg_error me@my.address < tempfile fi Perhaps some NT guru can do something with all this; if not: sorry to have wasted your time. Regards, Alex -- * To unsubscribe from the mrtg mailing list, send a message with the subject: unsubscribe to mrtg-request@list.ee.ethz.ch * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg