2

I'm trying to setup the watchdog daemon to run on my Fedora 12 system.

I know exactly what I want it to do ... but I'm unsure as to exactly configure it. Mainly due to inexact documentation.

What I want to do is have my system reboot if a specific file doesn't change within a certain amount of time.

To do this I'll use the file = <filename> and change = <mtime> configuration options.

The problem is, I can't figure out what value I should use for mtime.

I want the system to restart if the specified file (a web server log file) hasn't changed in 10 minutes. What value would I use for mtime?

Thanks!

David G
  • 205
  • 1
  • 11

2 Answers2

1

Which watchdog daemon? Have you tried setting change = 600? That's 10 minutes in seconds, which would be typical way of specifying this sort of thing. Looking at the watchdog.conf(8) man page it looks like everything else is specified in seconds.

Easy to test, too -- don't update the file for ten minutes and see if your system reboots.

larsks
  • 41,276
  • 13
  • 117
  • 170
  • I don't think 600 is 10 minutes ... I had that value set and the system ended up rebooting before it finished booting (yes, I had watchdog set to start at runlevel 3, I fixed that). Right now I have it set to 6000. – David G Dec 14 '10 at 21:45
0

I found some information here : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/User_Guide/Parameters_for_Watchdogs_in_watchdog.conf.html

change :

The number of watchdog intervals after which the watchdog checks for changes to files. A change line must be specified on the line directly after each file line, and applies to the file line directly above that change line. The number of watchdog intervals after which the watchdog checks for changes to files. A change line must be specified on the line directly after each file line, and applies to the file line directly above that change line.

watchdog interval is set via the interval parameter (default to 10 seconds)

interval :

The interval, in seconds, between updates to the watchdog device. The watchdog device expects an update at least once every minute, and if there are no updates over a one-minute period, the watchdog will be triggered. This one-minute period is hard-coded into the drivers for the watchdog device, and cannot be configured.

Golgot
  • 115
  • 6