Linux watchdog-watchdog5.8 released-Linux general technology-Linux programming and kernel information. The following is a detailed description. Linux comes with a watchdog implementation for monitoring system running, including a kernel watchdog module and a user space watchdog program
The kernel watchdog module communicates with the user space through the/dev/watchdog character device. Once the/dev/watchdog device is enabled for a user space program, a one-minute timer is enabled in the kernel, the user space program needs to ensure that data is written to the device within one minute, and each write operation will cause the timer to be reset. If the user space program does not perform write operations within one minute, the expiration of the timer will cause a system reboot operation.
The user space program can stop the timer in the kernel by disabling/dev/watchdog.
User space watchdog daemon:
In the user space, there is also a daemon called watchdog, which can regularly detect the system, including:
Is the process table full?
Is there enough free memory?
Are some files accessible?
Have some files changed within a given interval?
Is the average work load too high?
Has a file table overflow occurred?
Is a process still running? The process is specified by a pid file.
Do some IP addresses answer to ping?
Do network interfaces receive traffic?
Is the temperature too high? (Temperature data not always available .)
Execute a user defined command to do arbitrary tests.
If a check fails, a soft reboot may occur (simulating a shutdown command execution)
It can also trigger the running of the kernel watchdog through/dev/watchdog.
This version fixes many bugs and adds some updates. most of the changes mainly improve the availability of embedded systems. In particular, the default time interval is modified. In addition, watchdlog can avoid program suspension due to insufficient memory.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.