[mrtg] Re: Re[2]: lib error
Don Buchholz
buchhod at kentrox.com
Thu Dec 2 00:34:29 MET 1999
Cron is usually started at system boot -- I can only assume that
/etc/profile is not read by the shell firing off the "init.d" scripts.
You can view a process's environment with the BSD version of ps(1) and
specifying the "e" flag.
% /usr/ucb/ps aexwww | grep cron
155 ? S 0:01 /usr/sbin/cron PATH=/usr/sbin:/usr/bin TZ=US/Pacific
On my Solaris 2.5.1 system, all 'cron' is for an environment is:
PATH=/usr/sbin:/usr/bin
TZ=US/Pacific
- Don
On Wed, 1 Dec 1999, Francisco Javier Alcala Soler wrote:
> Thanks to Don Buchholz, Neil Calvert and Daniel R . Kilbourne for their
> replies.
>
> Don's wrapper solves the problem. I was already using full paths for the
> cron job. My LD_LIBRARY_PATH is correctly exported in </etc/profile> and
> therefore, MRTG was working correctly from the command line.
>
> Why didn't it work from the cron job? Any ideas?
>
> Thanks, Curro.
>
>
> ___________________ Reply Separator ____________________
> Subject: [mrtg] Re: lib error
> Author: Don Buchholz <buchhod at kentrox.com> at UNO
> Date: 1/12/99 7:05 PM
>
>
> You need to set your LD_LIBRARY_PATH. I use a wrapper named
> /usr/local/mrtg/run_mrtg. It sets the path, and then runs:
>
> | #!/bin/sh
> |
> | LD_LIBRARY_PATH=/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/ucblib:/usr/local/lib
> | export LD_LIBRARY_PATH
> |
> | cd /usr/local/mrtg
> | ./mrtg mrtg.conf
>
> The crontab entry is simply:
>
> 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/mrtg/run_mrtg
>
>
> - Don Buchholz, Communication Networks Manager <don_buchholz at adc.com>
>
--
* 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