lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

lockfile under /netmrg/var/log/netmrg

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
cbourel
Beginner


Joined: 09 Aug 2004
Posts: 3

PostPosted: Mon Aug 09, 2004 9:07 am    Post subject: lockfile under /netmrg/var/log/netmrg Reply with quote

Hello,

I'm running Netmrg 0.16 under a Linux box [Fedora Core release 2 (Tettnang) ].
A lock file is created under the /netmrg/var/log/netmrg which prevent netmrg
from running more than 8 hours consequently.

Can you explain me the way this lock file is created so I can check what's goin'on
that server.

Regards,

Christophe.
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Mon Aug 09, 2004 5:23 pm    Post subject: Reply with quote

The lockfile is created using fopen() from the run_netmrg() function in netmrg.cpp.

What are the specific circumstances of your problem? The only time the lockfile should prevent NetMRG from running is when either another instance of NetMRG is running, or a previous instance crashed. The former is the result of NetMRG "stepping on itself" which can occur when monitoring lots of stuff on an overloaded box. The latter would be the result of a bug in NetMRG that we need to track down. If you can find any errors in your NetMRG output (such as in the lastlog.err files that the wrapper script can create), they would be helpful.
Back to top
cbourel
Beginner


Joined: 09 Aug 2004
Posts: 3

PostPosted: Thu Aug 12, 2004 8:10 am    Post subject: Reply with quote

Hi,

First thanx for your response. Here is the last environment when the lock files
has been created:

------
ps -edf |grep netmrg

netmrg 25662 25661 0 Aug11 00:00:00 /netmrg/bin/netmrg_cron.sh
netmrg 25666 25662 0 Aug11 00:00:00 /netmrg/bin/netmrg-gatherer
netmrg 25667 25666 0 Aug11 00:00:00 sh -c /rrdtool/bin/rrdtool - >/dev/null
netmrg 25668 25667 0 Aug11 00:00:00 /rrdtool/bin/rrdtool

-----
ls -ltr /netmrg/var/log/netmrg

-rwxrwxrwx 1 nobody nobody 1 Aug 11 15:30 runtime
-rw-r--r-- 1 netmrg netmrg 17 Aug 11 15:35 lockfile
-rwxrwxrwx 1 nobody nobody 0 Aug 11 15:35 lastrun.err
-rwxrwxrwx 1 nobody nobody 510 Aug 11 15:35 lastrun.log

As you can see the lastrun.err file is empty.

The server is currently monitoring 5 boxes and has never been overloaded.

Regards.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Aug 13, 2004 3:31 pm    Post subject: Reply with quote

The permissions in that last directory seem a bit odd; some files are owned by 'nobody', while others are owned by 'netmrg'. Is it possible some cron job is chown-ing the files that this directory is in to nobody at some interval?

-Doug
Back to top
cbourel
Beginner


Joined: 09 Aug 2004
Posts: 3

PostPosted: Tue Aug 17, 2004 8:03 am    Post subject: Reply with quote

Hi,

I changed the set of permissions but I still get a lock file after a run
of 8 hours:

ls -ltr
total 12
-rwxrwxrwx 1 netmrg netmrg 1 Aug 17 01:15 runtime
-rw-r--r-- 1 netmrg netmrg 17 Aug 17 01:20 lockfile
-rwxrwxrwx 1 netmrg netmrg 0 Aug 17 01:20 lastrun.err
-rwxrwxrwx 1 netmrg netmrg 462 Aug 17 01:20 lastrun.log

I still have no clue.

Regards,

Chris.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group