[mrtg] Re: Threshold script not working correctly.

Chirhart, Brian bchirhart at fnni.com
Wed Dec 17 01:08:28 MET 2003


Thanks for the ideas Steve - 
It is running as admin.  I know - not a good thing, but how can it be any
more insecure than windows anyway??? :)

the chdir command is: chdir "/mrtg/threshold/"; - So it is coming from root.


All libraries are valid/appended. - This is just a mod of another script
that runs fine.



-----Original Message-----
From: Steve Shipway [mailto:s.shipway at auckland.ac.nz]
Sent: Tuesday, December 16, 2003 5:30 PM
To: 'Mrtg (E-mail)'
Subject: [mrtg] Re: Threshold script not working correctly.


>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

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



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