My system reboots when i give the "date -s" command. I collected the log and it says this
Jan 18 13:27:46 watchdog[2421]: file /tmp/cmm/strobeWDT was not changed in 1 seconds.
Jan 18 13:27:46 watchdog[3303]: shutting down the system because of error 2
Jan 18 13:27:47 watchdog[2421]: stopping daemon (5.2)
My application run on the system writes into the file /tmp/cmm/strobeWDT. If it fails to write to the file periodically, the watchdog daemon sends a reboot command. That is understandable. But only when i give the "date -s" command to set a new date, the system logs the above message and reboots.
Where is the problem existing.
I dont know whether the above info is enough to solve the problem from your side. Kindly help
Adding more info
I am getting the above log message from the code in file_stat.c (file inside the source code for watchdog daemon)
file_stat.c
#if USE_SYSLOG
/* do verbose logging */
if (verbose && logtick && ticker == 1)
syslog(LOG_INFO, "file %s was last changed at %s.", file->name, ctime(&buf.st_mtime));
#endif
if (time(NULL) - buf.st_mtime > file->parameter.file.mtime) {
/* file wasn't changed often enough */
#if USE_SYSLOG
syslog(LOG_ERR, "file %s was not changed in %d seconds.", file->name, file->parameter.file.mtime);
#else /* USE_SYSLOG */
fprintf(stderr, "file %s was not changed in %d seconds.", file->name, file->parameter.file.mtime);
#endif /* USE_SYSLOG */
I think problem exits in this part of the code, bcause the the error comes from this code. parameter.file.mtime is configured in /etc/watchdog.conf as "change=1"