[mrtg] Re: Problems with customized perl scripts in MRTG

The YOSH theyosh at selwerd.nl
Sun Aug 5 23:37:30 MEST 2001


05-08-2001 23:08:18, Larry Sheldon <lsheldon at creighton.edu> schreef:
AAARRGGGG I am stupid.... a dombo... idiot.... It was so simple...
I didn't use absolute path in my perl scripts...
So MRTG wasn't able to run the perl script with his environment...

DAMMM.... stupid...
But problem solved....
And thanx Alex...for helping

The YOSH


>> I am sure of it now.... when MRTG is started by the cron, then the perl scripts are giving zeros. Why o why???
>> As user root it is ok.... as the cron does is as user root it is NOT OK!!!
>> 
>> Help?? 
>
>SROT (Sheldon's Rules of Thumb) (First rule, move thumb before swinging hammer
>at nail) say in this situation  (where things "work" at the command line
>and "don't work" from "cron) the problem is almost certainly due to a
>failure to account for the fact that "cron" has practically no "environment"
>and in particular, practically no path.
>
>If you depend on something being set some way in particular, set it that
>way in in your cron-run script.  Keep in mind that calling another
>script (like /etc/profile) will probably not have the desired effect unless
>you use the construct:
>
>. /etc/profile
>
>or in some other way make it run in the main cron-run shell.
>--



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list