[mrtg] Re: Perl Paths
Butch Kemper
kemper at bihs.net
Fri Nov 5 18:30:05 MET 1999
At 04:51 PM 11/04/1999 , you wrote:
>I'm trying to get the PM3Lines.pl script to work with MRTG 2.7.4 in
>FreeBSD 3.2. It works great from the command line, but when I try to run
>it from a config file I get
>
>Can't locate SNMP_Session.pm in @INC (@INC contains:
>/usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503
>/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>/usr/local/lib/perl5/site_perl/5.005 .) at /usr/local/mrtg/run/PM3Lines.pl
>line
>26.
>BEGIN failed--compilation aborted at /usr/local/mrtg/run/PM3Lines.pl line
>26.
>Could not get any data from external command
>'/usr/local/mrtg/run/PM3Lines.pl
>
>I tried adding push(@INC, "/usr/local/mrtg/run"); to the perl script, but
>mrtg still can't find SNMP_Session.pm. How do I get MRTG to add
>/usr/local/mrtg/run to its path?
Do not change the Perl scripts.
I think you have a PATH problem when you run MRTG from CRON. Try doing one
of these things:
1. In the call from CRON, run MRTG as a user that has
/usr/local/mrtg/run in its path.
2. In the call from CRON do this:
(cd /usr/local/mrtg/run; mrtg mrtg.cfg)
Butch
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list