[mrtg] Re: lockfile problem

Shipley, Rob rshipley at state.mt.us
Thu May 3 23:54:24 MEST 2001


remove the lock files. try at the command line "/usr/bin/perl
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/mrtg.cfg". Does this generate a
lockfile if you run mrtg at your command line? If it does, than there is a
problem with how it is running. Possibly not loading modules, ie libz.a or
libpng.a.  
A lock file is created if it is not running correctly.
If it runs great, you may need to specify the path to perl ie.
/usr/local/perl before the /usr/local/mrtg-2/bin/mrtg. cron will need the
pathing for perl to run. With your output it looks like sh is attempting to
run it too, without perl! If this works, then you may need to place this in
your cron job or create a seperate script that runs mrtg. (makes cron
cleaner anyway) ie. 
-------start--------
#!sh
/usr/bin/perl /usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/mrtg.cfg
------end----------
chmod +x, then run this script in cron.
did this work?



-----Original Message-----
From: Ron Cripe [mailto:rcripe at dupagels.lib.il.us]
Sent: Thursday, May 03, 2001 2:44 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] lockfile problem



My mrtg installation (MRTG 2.9.12a) appears to be running quite nicely
except that I get an error message about a lockfile every time the cron job
kicks in.  My inbox overfloweth with emails describing this error.  I'm
using mrtg on Solaris 7.  Here is a sample error output:

Your "cron" job on myserver

/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/mrtg.cfg

produced the following output:

2001-05-03 09:00:02 -- ERROR: I guess another mrtg is running. A lockfile
(/usr/local/mrtg-2/mrtg.cfg_l) aged
1 seconds is hanging around. If you are sure that no other mrtg
is running you can remove the lockfile

This is the only instance of the program.  I've captured process status
output during the run time and only see processes such as this:
# ps -ef | grep mrtg
    root  5790  5749  1 09:10:09 ?        0:00 /usr/local/mrtg-2/bin/rateup
/home/users/nics/public_html/ 10.10.10.10_serial1
    root  5749  5748  5 09:10:00 ?        0:01 /usr/bin/perl
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/mrtg.cfg
    root  5748   812  0 09:10:00 ?        0:00 sh -c
/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/mrtg.cfg


There is a lock file created.  Here is an example of an ls -la showing it:
-rw-r--r--   1 root     other          0 May  3 08:50 mrtg.cfg_l_4764

After mrtg has run, the lock file is removed.  There appears to be no
problems actually generated.  I just receive error message emails every time
mrtg runs.

The only discrepancy I see is the error message refers to is always a file
named /usr/local/mrtg-2/mrtg.cfg_l and the actual name was (in one instance)
/usr/local/mrtg-2/mrtg.cfg_l_4764.

Any ideas?

Ron

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Ron Cripe
 Systems Manager
 DuPage Library System
 127 South First Street
 Geneva, IL  60134
 Voice: 630-232-8457 x210
 Fax: 630-232-0699
 Email: rcripe at dupagels.lib.il.us
 Website: http://www.dupagels.lib.il.us
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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