sourCEntral - mobile manpages

pdf

start_wdog

NAME

start_wdog − NetWinder watchdog timer support

SYNOPSIS

insmod watchdog [ timeout=num ] [ testmode=1 ]

/sbin/start_wdog

DESCRIPTION

The NetWinder has an on-board watchdog timer that can be programmed to reset the hardware after a certain period of inactivity. This is intended for use in situations where unattended operation of the NetWinder is required over prolonged periods of time. Note that when the watchdog timer resets the system, it necessarily performs a hard reset (the assuption being that the software has crashed), and could potentially corrupt the hard disk as a result. Thus the use of the watchdog timer should be considered a "last line" of defence against poor programming.

The interface to the hardware watchdog timer is handled through a kernel module called watchdog.o which needs to be loaded via the insmod command as shown above. It is also possible to compile this module directly into the kernel, however the timeout value is then fixed at its default value of 3 minutes. The presence of the kernel module does not activate the watchdog timer, it merely allows for clients to access it via the /dev/watchdog device node.

A client program such as start_wdog activates the watchdog timer by opening /dev/watchdog and must thereafter write at least one character to the device per timeout period otherwise the watchdog timer will reset the system. The start_wdog sample client program writes a byte every thirty seconds in an infinite loop. Thus as long as this program runs, and is granted enough CPU time to do its writing, the watchdog is held off. Note that if the program is killed with SIGHUP, then normal program termination will close the stream to /dev/watchdog and this will cause the hardware watchdog to again be disabled.

OPTIONS

The following options may be passed to insmod when loading the watchdog module:

timeout

This value specifies how many seconds of inactivity may pass before the harware watchdog performs a hard reset of the system. If not specified then the default value is 180 seconds (3 minutes).

testmode

If nonzero, then when a timeout occurs, rather than resetting the system, the LED on the front panel will start blinking.

FILES

/sbin/start_wdog /man/man8/start_wdog.8

SEE ALSO

DIAGNOSTICS

The client communicates to the kernel module via a device node /dev/watchdog with major=10, minor=130. The device node can be created with the command
mknod -m666 /dev/watchdog c 10 130

This program may only be run by the super-user, and will fail with a "permission denied" error message if run by non-root. The error message "operation not supported" indicates a missing device node, or the watchdog kernel module has not been loaded.

AUTHOR

The program is written by Woody Suwalski <woody AT netwinder DOT org>, and the man page was written by Ralph Siemsen <ralphs AT netwinder DOT org>. Both are distributed under the terms of the GPL.

pdf