[mrtg-developers] Getting error from MRTG when runningexternalscript

Scott S. Heath SHeath at udi.com
Tue Mar 18 16:26:44 CET 2008

I replaced the last print line of my code with a hard coded print
statement just printing out just 250,50 and received this error:

readline() on closed filehandle NF at /usr/bin/mrtg line 1311.
Use of uninitialized value in concatenation (.) or string at
/usr/bin/mrtg line 1484.

When I pass this code through od -c I get:
0000000   2   5   0  \n   5   0  \n

When I pass my original code through od -c I get:
0000000   2   0   0  \n   0  \n   0  \n   C   o   p   y   Q   u   e   u
0000020   e   L   e   n   g   t   h  \n

I'm not sure how to interpret this as I'm brand new to perl.


-----Original Message-----
From: mrtg-developers-bounces at lists.oetiker.ch
[mailto:mrtg-developers-bounces at lists.oetiker.ch] On Behalf Of Alex van
den Bogaerdt
Sent: Tuesday, March 18, 2008 9:28 AM
To: mrtg-developers at lists.oetiker.ch
Subject: Re: [mrtg-developers] Getting error from MRTG when

On Tue, Mar 18, 2008 at 06:16:25AM -0500, Scott S. Heath wrote:
> Actually I wrestled with that for a while. There is a new line char in
> the file and I found it easier to leave in then chomp it.

I suggest you run the output of your script through "od -tx1" or
similar, and then look for characters that shouldn't be there.

Alternatively: replace the script temporarily with some other
script returning a constant number and see if that makes the
problem disappear.  If not, you need not wast time on debugging
that script, but if the problem is magically solved, you know
you have to remove the problem from your perl script.

mrtg-developers mailing list
mrtg-developers at lists.oetiker.ch

More information about the mrtg-developers mailing list