[mrtg] Re: uptime script errors
Daniel R. Kilbourne
drk at voyager.net
Thu Nov 18 20:50:04 MET 1999
I notice several of these type problems.
A rule of thumb - ALWAYS use absolute paths rather that relative when using
cron. Since MRTG uses cron it goes for that too.
ie:
you have a command called getit.sh in /home/mrtg/
when you are in the /home/mrtg/ directory, typing './getit.sh' will work.
But cron does not run from that directory so it will have problems. Best
thing to do is have a line like this in crontab
0,10,20,30,40,50 * * * * /home/mrtg/getit.sh
NOT
0,10,20,30,40,50 * * * * ./getit.sh
keeping this in mind will save you from much general crontab heartache (as
I know very well :) )
___
Dan
At 10:38 AM 11/18/99 -0800, Karyn Williams wrote:
>Yesterday I used the following script suggested by Jeff Lieberman to
>monitor uptime on IRIX 6.5.
>
>
>#!/bin/sh
>drive1=`uptime | cut -d: -f 4- | tr -d ',' | tr -d '.'`
>set $drive1
>echo "$1\n$2\n0\n0"
>
>
>I ran it manually and it worked so I added it to my cron job at about
>13:30. At 13:45 I got an error from cron as follows:
>
>Subject: cron <karyn at muse> ./mrtg-2.7.2/mrtg ./mrtg-2.7.2/muse.cfg
>
>Problem with Externale get '`/usr/people/karyn/scripts/muse.load`':
> Expected an INTEGER for 'in' but got 'ERRNO=10'
>
>Problem with Externale get '`/usr/people/karyn/scripts/muse.load`':
> Expected an INTEGER for 'out' but got 'FCEDIT=/bin/ed'
>
>
>I have gotten the same error every hour at the 45 minute mark since. It
>runs successfully in between.
>
>I've checked the crontabs and there is nothing that runs at X:45 only.
>
>Any ideas/suggestions ?
>
>
>
>
>
>
>
>
>--
>
>Karyn Williams CNE
>karyn at calarts.edu
>http://www.calarts.edu/network
>
>--
>* To unsubscribe from the mrtg mailing list, send a message with the
> subject: unsubscribe to mrtg-request at list.ee.ethz.ch
>* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list