Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120037 - sys-apps/watchdog logtick option has two implementation problems
Summary: sys-apps/watchdog logtick option has two implementation problems
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Henrik Brix Andersen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-23 04:12 UTC by Christoph Probst
Modified: 2006-07-24 02:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Probst 2006-01-23 04:12:32 UTC
The watchdog.conf man page of watchdog-5.2.4_p5 writes about the logtick option:

  "logtick = <logtick>

   If  you  enable verbose logging, a message is written into
   the syslog or a logfile. While this is nice, it is not
   necessary to get a message every 10 seconds which really
   fills up disk and needs CPU. logtick allows adjustment of
   the number of intervals skipped before a log message is
   written. [...]"

This sounds very useful but there are two problems with its implementation:

1. The logtick option only applies for the "I'm alive"
   message in the main loop ("[watchdog] still alive after
   x seconds = y interval(s)"). All other messages are written
   every "interval" seconds and fill up the logfiles anyway
   (eg. "[watchdog] current load is 0 0 0").

   For the reason see pidfile.c for example. It just checks:

     if (verbose)
       syslog(LOG_INFO, "was able to ping process ...


2. The main loop prints the "I'm alive" message only once because
   of an programming error:

   See watchdog.c. The check to run the syslog() call is (--ticker == 0)
   but if verbose is true the value of ticker will be set to 0. As ticker
   is set nowhere else the check (--ticker == 0) will never be true again.

--> if(logtick && (--ticker == 0)) {

      ticker = logtick;
 
      if (verbose) {
        count += logtick;
-->     ticker = 0;
        syslog(LOG_INFO, "still alive after %ld seconds = ...
     }
   }
Comment 1 Henrik Brix Andersen 2006-01-23 04:28:16 UTC
Please report this issue upstream.
Comment 2 Christoph Probst 2006-04-22 03:17:02 UTC
I reported this and all other watchdog issues to upstream some month ago but no reaction so far. Just FYI.
Comment 3 Henrik Brix Andersen 2006-04-22 06:31:37 UTC
(In reply to comment #2)
> I reported this and all other watchdog issues to upstream some month ago but no
> reaction so far. Just FYI.

Oh, I thought your proposed changes was included in 5.2.5_p1?
Comment 4 Javier Miqueleiz 2006-07-24 02:31:01 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I reported this and all other watchdog issues to upstream some month ago but no
> > reaction so far. Just FYI.
> 
> Oh, I thought your proposed changes was included in 5.2.5_p1?
> 

Just for the bug searchers...

--logtick option works for me in 5.2.5_p1.