Skip to content

reibax-marcus/watchdog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Watchdog Timer (WDT)

Introduction

The linux watchdog timer allows the linux kernel to reset the system if serious problems are detected.

It's composed of three different layers:

  1. watchdog hardware (hardware)
  2. watchdog driver (kernel)
  3. watchdog daemon (userspace)

The watchdog driver makes available in the procfs the corresponding
device file to make the link between the hardware and userspace.

By default, the device file is located in /dev/watchdog.

watchdogd:

  • The watchdog daemon opens /dev/watchdog.

  • It keeps writing to the device file often enough to prevent the kernel from resetting. (at least once per minute). Each write delays the reboot time another minute.

  • If a system issue occurs (process table full, not enough free memory, temperature too high, file table overflow, ...) describes in man (8) wdctl. The watchdog the daemon will stop writing to the device file.

  • After a minute of inactivity the watchdog hardware will cause the reset.

Program Description:

Show hardware watchdog information.
The default device file used is /dev/watchdog.
Note that the number of supported watchdog features is hardware specific.

More Info:

Usage:

sudo ./watchdog

Output:

Device:         /dev/watchdog
Identity:       iTCO_wdt [version 0]
Timeout:        30 seconds
Pre-timeout:    0 seconds
Timeleft:       30 seconds
Last boot:      Power-On-Reset

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Show hardware watchdog status

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.3%
  • CMake 4.7%