[mrtg] Re: Threshold script not working correctly.
s.shipway at auckland.ac.nz
Wed Dec 17 00:30:28 MET 2003
>I have a threshold script that if I run from command line it
>works great, but if MRTG calls it, it fails.
Don't make any assumptions about what the current directory is, or what the
PATH is initialised to. So, always give the full path name for the
executables, explicitly chdir to the directory you want to be in, and only
call externals with explicit paths. Any extra libraries you may need, make
sure they are appended to @INC before you require them. Also, make sure you
are running it as an authorised user -- when MRTG calls it, what user is it
running as? The same user as you are using on the command line?
This is probably why you cannot make it work from MRTG, since it probably
has a different environment set up.
Steve Shipway: ITSS, University of Auckland
Email: s.shipway at auckland.ac.nz Web: http://www.steveshipway.org/
** We can only discover new oceans when we have the **
** courage to lose sight of the shore. **
-- Attached file removed by Ecartis and put at URL below --
-- Type: text/x-vcard
-- Size: 155 bytes
-- URL : http://www.ee.ethz.ch/~slist/p/06-Steve%20Shipway.vcf
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg