[mrtg] Re: rateup problems

Wright, Christopher W, CONTRACTOR Fort Carson Contract-WrightC at carson.army.mil
Thu Dec 30 22:02:49 MET 1999


Tim,

   Thanks for your help.  I found out that ld.so.1 was pointing to the
/usr/lib directory, while the files needed were installed in /usr/local/lib.
Everything seems to be working now.

Chris

  
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

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