[mrtg] mrtg errors out when run as plain user

Steve Shipway s.shipway at auckland.ac.nz
Mon Sep 8 01:17:34 CEST 2008

> parsed from an html page.  Typical values that I capture in
> file /tmp/modem.out are:
> ===================
> 7520
> 7328
> 6.0
> 4.0

Note that this is NOT MRTG plug-in format, it is two copies of MRTG plug-in format appended to each other.

> Target[modem]: `cat /tmp/modem.out`

So, this will not work (correctly).

> I am certain that the the above file will not do what I want, which is to
> display the top two values shown in /tmp/modem.out on one graph in kbps
> and the bottom two values in another graph in dB.

Correct.  You need to create two files if you're going to do it this way, one for each check.  Treat each Target definition as completely independent.

> This is the error I keep getting if I run mrtg as a plain user:
> 2008-09-06 00:57:29, Rateup WARNING: /usr/bin/rateup could not read the
> primary log file for modem
> 2008-09-06 00:57:29, Rateup WARNING: /usr/bin/rateup The backup log file
> for modem was invalid as well
> /usr/bin/rateup: Permission denied
> 2008-09-06 00:57:29, Rateup ERROR: Can't open modem.tmp for write

Looks like a permissions issue.  Can you read and write these files and directories as your plain user?  It looks like you can't.  Check the work directory and contents are all writeable to you.

> No problem running it as root (although it does not show anything on the
> graphs).  Grateful for any pointers.

Yes, a permissions issue.  Probably you ran it as root once (naughty!) and so the files became owned by root, so noone else can write to them...


More information about the mrtg mailing list