[mrtg] Re: [mrtg]error: Expected an INTEGER for 'out' but got '' ...

Aндpeй Mиxaйлoвич Фёдopoв andre at kolasc.net.ru
Sat Dec 25 09:01:03 MET 1999

>Try to find out where the script fails.
>Start with the ping command itself.  Does it return data when using
>these options?  If so, append the 1st sed command.  Check the output
>again and make sure it is what you expect.  Add the 2nd sed command.
>If so, you could simplify it into this:
>ping -Q -q -c1 iim | awk 'BEGIN{FS="/"};/\//{print int($5*100)}'
>If I run this script, I get an error.  Routing the error to /dev/null
>I'll end up with nothing. 
>Run ping without options (or Read The FM) to see what options to use.
>Try removing the "-Q" for instance.  As soon as the command returns
>a number, try again from MRTG.
I changed my script to yours. Now it looks so:

ping -Q -q -c1 iimm |\
awk 'BEGIN{FS="/"};/\//{print int($5*100)}'

It returns one integer number.
If I change int($5*100) for simply $5 then I get 

Problem with Externale get '`/usr/home/andre/bin/mping.sh`'
    Expected an INTEGER for 'in' but got '3.486'

Problem with Externale get '`/usr/home/andre/bin/mping.sh`'
    Expected an INTEGER for 'out' but got ''

I understanded first error and change $5 for int($5*100).
I done it and first error got away.

But I can`t understand second error :(
It looks like MRTG trys to write something to my script and then expects
replay from it ...

What do you think about it?

Andrey M Fedorov, IIMM, KSC RAN, Apatity, Murmansk region.

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg

More information about the mrtg mailing list