[mrtg] MRTG (Daemon Mode) Crashing
Israel Brewster
israel at frontierflying.com
Tue Jul 3 18:07:27 CEST 2007
On Jul 2, 2007, at 3:31 PM, Henrik Jacobsson wrote:
> You have two(or more) mrtg daemons running. Check your running
> processes.
>
> I had this problem when I was adjusting my mrtg config, each time I
> had
> to restart the daemon. And each time you run mrtg without just
> restarting it, it will generate duplicate daemons which will screw
> your
> logfiles as well.
>
> I fixed all my problems with just adding this to my crontab and my
> config saying "RunAsDaemon: No" (or whatever it is in the config):
> */5 * * * * root mrtg /home/henke/mrtg/mrtg.conf
>
> This will make mrtg run every five minutes. And I can change the
> config
> all the time without the need of restarting the daemon (as far as I
> know). And I dont see why you should run it as a daemon actually...
Thanks for the suggestion. However, when this problem occurs I only
have a single copy running-actually, I have never had more than one,
as I always make sure to kill off the old process before starting a
new one. What appears to happen is that MRTG itself attempts to
restart to fix the error (as the log states) but it has never cleaned
up the PID file from the existing process, therefore the restart
fails and MRTG exits leaving me with no MRTG processes. That isn't
the problem so much though (although I would think that MRTG should
be better about cleaning up the PID file in order to avoid that
crash), as is what caused that behavior in the first place, namely
the List::Util object version 1.18 does not match bootstrap
parameter 1.19 at /usr/libdata/perl5/i386-openbsd/5.8.8/ XSLoader.pm
line 94 error. it would seem to me that is the error that needs to be
fixed, even if I can potentially work around it by not running in
daemon mode.
As for why to run in daemon mode, from the documentation: "The
purpose of daemon mode is that MRTG is launched once and not
repeatedly (as it is with cron). This behavior saves computing
resourses as loading and parsing of configuration files happens only
once." As I am running on a VERY minimal system that is also trying
to run other things, this is of some importance to me. And, frankly,
while I don't take any offense at it, if a documented feature of a
program is not operating as it should, I will never take "well, don't
use that feature" as an acceptable solution :)
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
>
>
> Hope this helps you.
>
> Israel Brewster skrev:
>> I sent this from the wrong account last time, so I'm not sure if it
>> got through. My apologies if this ends up being a duplicate.
>> I am running MRTG 2.12.2 in daemon mode with RRD logging on OpenBSD
>> 4.0, and I am experiencing a problem where every so often it randomly
>> crashes and has to be restarted, particularly when one or more of the
>> routers it is monitoring goes down. For the most part I am using only
>> simple configs generated by config maker, and monitoring Linksys and
>> Cisco routers. I have tried compiling and running the latest version
>> as well, but if anything that version was even more crash prone. The
>> mrtg.log file shows the following each time it crashes:
>>
>> 2007-06-30 16:32:36 -- List::Util object version 1.18 does not match
>> bootstrap parameter 1.19 at /usr/libdata/perl5/i386-openbsd/5.8.8/
>> XSLoader.pm line 94.
>> 2007-06-30 16:32:36 -- *** Restarting after 10 seconds in an attempt
>> to recover from the error above
>> 2007-06-30 16:32:53 -- Started mrtg with config '/etc/mrtg/main.cfg'
>> 2007-06-30 16:32:57 -- ERROR: I Quit! Another copy of mrtg seems to
>> be running. Check /var/run/mrtg.pid
>>
>> This was the same both for the 2.12.2 version, as well as the current
>> latest. Between crashes, which can be anywhere from just a couple of
>> minutes, to couple of days or more, everything works fine. What can I
>> do to fix the error? Thanks.
>>
>> -----------------------------------------------
>> Israel Brewster
>> Computer Support Technician
>> Frontier Flying Service Inc.
>> 5245 Airport Industrial Rd
>> Fairbanks, AK 99709
>> (907) 450-7250 x293
>> -----------------------------------------------
>>
>>
>> _______________________________________________
>> mrtg mailing list
>> mrtg at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
>>
>>
>
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
More information about the mrtg
mailing list