Package: watchdog Version: 5.13-1 Severity: normal Dear Maintainer,
While testing some watchdog configurations for some embedded hardware, I noticed that watchdog was not waiting for the configured interval (10 seconds); instead, it was waiting only 5 seconds between checks. Perusing the source revealed the cause: in watchdog.c, in the main() function, the program explicitly waits for only half of the requested interval ("usleep(tint * 500000)"). The implicit assumption is that the other half of the sleep takes place in test_binary.c, in check_bin(). The problem with that is that the usleep() in check_bin() is only called when a test_binary is specified. Otherwise, check_bin() returns immediately. A further complication is that when a test_directory is used with several programs in it, check_bin() will be called along with its usleep() for each one. So if I have no test_binary or test_directory, I get 50% of the configured interval. But if I have a test_binary as well as a test_directory with 8 check binaries in it, I get 500% of the interval (especially dangerous when the interval is not much smaller than the watchdog period). I believe that either this should be fixed, so that the same interval is used regardless of which test binaries are being in place, or else the documentation should be corrected to explain the situation (maybe something like "The interval that will actually be used is determined by the formula '0.5i * (1 + t)', where i is the interval from the config file, and t is the number of test programs that will be run per interval". Yeah, I don't like that very much either.) Thanks for your attention! p -- System Information: Debian Release: 7.0 APT prefers testing APT policy: (900, 'testing'), (500, 'stable'), (50, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages watchdog depends on: ii debconf [debconf-2.0] 1.5.49 ii libc6 2.13-38 ii lsb-base 4.1+Debian8 ii udev 175-7.1 watchdog recommends no packages. watchdog suggests no packages. -- debconf information: watchdog/run: true watchdog/module: none watchdog/restart: false -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org