Steps to enable Watchdog:

 

1. sudo vi /etc/watchdog.conf

uncomment watchdog-device = /dev/watchdog 

 

2. Execute the below at the shell prompt 

sudo modprobe i2c-i801

sudo modprobe i2c-smbus

sudo modprobe iTCO-wdt heartbeat="60"


Note: check if blacklist-watchdog.conf is present in /etc/modprobe.d directory, and if there is a line iTCO_wdt in this file - if so please remove this link or comment it out   


 


3. Add the following modules to vi /etc/modules è For subsequent reboots, modules are loaded by default

i2c-i801

i2c-smbus

iTCO-wdt heartbeat=60  



. Toggle the watchdog once as below


   

[admin@versa-flexvnf: ~] $ sudo /usr/sbin/service watchdog stop

 * Stopping watchdog daemon...                                                                                         [ OK ]

 * Starting watchdog keepalive daemon...                                                                               [ OK ]

[admin@versa-flexvnf: ~] $ sudo /usr/sbin/service watchdog start

 * Stopping watchdog keepalive daemon...                                                                               [ OK ]

 * Starting watchdog daemon...                                                                                         [ OK ]



Check the status as below



[root@abc: aaaadmin]# sudo /usr/sbin/service watchdog status


* watchdog.service - watchdog daemon


   Loaded: loaded (/lib/systemd/system/watchdog.service; enabled; vendor preset: enabled)


   Active: active (running) since Tue 2023-10-03 12:55:08 GMT; 56s ago


  Process: 22878 ExecStopPost=/bin/sh -c [ $run_wd_keepalive != 1 ] || false (code=exited, status=1/FAILURE)


  Process: 22922 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)


  Process: 22921 ExecStartPre=/bin/sh -c [ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)


Main PID: 22924 (watchdog)


    Tasks: 1 (limit: 4915)


   CGroup: /system.slice/watchdog.service


           `-22924 /usr/sbin/watchdog


 


Oct 03 12:55:08 abc watchdog[22924]: interface: no interface to check


Oct 03 12:55:08 abc watchdog[22924]: temperature: no sensors to check


Oct 03 12:55:08 abc watchdog[22924]: no test binary files


Oct 03 12:55:08 abc watchdog[22924]: no repair binary files


Oct 03 12:55:08 abc watchdog[22924]: error retry time-out = 60 seconds


Oct 03 12:55:08 abc watchdog[22924]: repair attempts = 1


Oct 03 12:55:08 abc watchdog[22924]: alive=/dev/watchdog heartbeat=[none] to=root no_act=no force=no


Oct 03 12:55:08 abc watchdog[22924]: watchdog now set to 60 seconds                


Oct 03 12:55:08 abc watchdog[22924]: hardware watchdog identity: iTCO_wdt   

    

Oct 03 12:55:08 abc systemd[1]: Started watchdog daemon.


[root@abc: aaaadmin]#

 


Note: In 22.1.3 iTCO driver/module will be auto installed on all systems that support iTCO (CSG as well as White-box devices), so the above steps would not be needed. However, watchdog will be disabled by default on the non-CSG/White-box devices and would need to be enabled via cli by executing "request system cpu-watchdog enable"


<for example>


For a white-box, initial state 


cat /etc/watchdog.conf   (we see watchdog-device is commented)






Enable watchdog via cli



Check /etc/watchdog.conf, you will see watchdog-device is now uncommented



You can check the status and state, it will show up as active 


[root@abc: aaaadmin]# sudo /usr/sbin/service watchdog status