[mrtg] Re: rateup problems

Tim Kennedy tkennedy at newsreal.com
Thu Dec 30 01:39:48 MET 1999


If you can run mrtg by hand and everything works, then perhaps cron is not
getting a correct LD_LIBRARY_PATH statement, or if it's from the perl,
then you'd have an @INC error.  Have you tried running it by hand from 
/ for from /tmp, so that you're not in the directory tree?
ldconfig might need to be run, after verifying that libpng2 is in a
directory that is listed in /etc/ld.so.conf.

Or you can try building your mrtg into a perl script that uses chdir, and
then put that in cron to be run.  Your mrtg might work that way if you
can run it by hand.

Like:

########################
#!/usr/local/bin/perl -w
# 
# a script to run mrtg from the mrtg directory.
# from "Programming Perl."

use Cwd 'chdir';

chdir "/mrtg/mrtg-2.8.9/run/";

@args = ("/mrtg/mrtg-2.8.9/run/mrtg", "/mrtg/mrtg-2.8.9/run/mrtg.cfg")
system (@args) == 0 
	or die "system @args failed: $?"

# End
########################

With a little modification, this can also be re-written into a script that
will run mrtg against a whole slew of mrtg config files, first sorting
them, then running a constant 4 mrtg processes, until all the configs
have been run.  At least, that's how I did it.

YMMV,

-Tim
tkennedy at newsreal.com

On Wed, 29 Dec 1999, Wright, Christopher W, CONTRACTOR Fort Carson wrote:

> > I just installed MRTG.  I scheduled it to run every 5 minutes in the
> > crontab, but I get an error message every time it executes:
> > 
> > /mrtg/mrtg-2.8.9/run/mrtg /mrtg/mrtg-2.8.9/run/mrtg.cfg 
> > 
> > produced the following output:
> > 
> > ld.so.1: /mrtg/mrtg-2.8.9/run//rateup: fatal: libpng.2: open failed: no
> > such file or directory
> > 
> > I checked the PATH statement (it is correct) and also found the libpng.2
> > file where it should be.  When I look at the charts, they appear to be
> > correct.


--
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