Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


pc_engines_apu_-_watchdog_centos_6.5

PC Engines APU - watchdog

The sp5100_tco module works out-of-the-box with newer kernels.

Device info

  • Check if the kernel recognizes the watchdog device.
    dmesg |grep 5100
    sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver v0.05
    sp5100_tco: PCI Revision ID: 0x42
    sp5100_tco: Using 0xfed80b00 for watchdog MMIO address
    sp5100_tco: Last reboot was not triggered by watchdog.
    sp5100_tco: initialized (0xffffc9000074cb00). heartbeat=60 sec (nowayout=0)

Install watchdog daemon for CentOS 6.5

  • Install kernel-ml.
    yum --enablerepo=elrepo-kernel install kernel-ml
  • Boot kernel 3.x (if you want, change default boot in /etc/grub.conf)
  • Install watchdog program.
    yum install watchdog
  • Edit /etc/watchdog.conf for example to ping the gateway every 10 seconds
    ping = 1.2.3.4
  • Auto-start at boot.
    chkconfig watchdog on
  • Start watchdog.
    service watchdog start
  • Check pings with tcpdump.
  • Disconnect network and the device should auto restart.
    May 16 22:22:12 sms watchdog[1342]: no response from ping (target: 1.2.3.4)
    May 16 22:22:52 sms watchdog[1342]: shutting down the system because of error 101

Change heartbeat timeout

  • Temporary:
    # modprobe sp5100_tco heartbeat=300
    # dmesg | grep sp5100_tco
    [    3.995335] sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver v0.05
    [    3.995571] sp5100_tco: PCI Revision ID: 0x42
    [    3.995680] sp5100_tco: Using 0xfed80b00 for watchdog MMIO address
    [    3.995696] sp5100_tco: Last reboot was not triggered by watchdog.
    [    3.995880] sp5100_tco: initialized (0xffffc90000746b00). heartbeat=60 sec (nowayout=0)
    [  208.726037] sp5100_tco: SP5100/SB800 TCO Watchdog Module Unloaded
    [  218.427251] sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver v0.05
    [  218.427436] sp5100_tco: PCI Revision ID: 0x42
    [  218.427547] sp5100_tco: Using 0xfed80b00 for watchdog MMIO address
    [  218.427564] sp5100_tco: Last reboot was not triggered by watchdog.
    [  218.431145] sp5100_tco: initialized (0xffffc9000074eb00). heartbeat=300 sec (nowayout=0)
  • Permanent:
    # vi /etc/modprobe.d/watchdog.conf
    options sp5100_tco heartbeat=300
pc_engines_apu_-_watchdog_centos_6.5.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1