How to configure the Watchdog on Nexcom NISE50
The Nexcom NISE50 has an Embedded Controller Watchdog Timer (WDT), that is able to power cycle the whole machine, even when the OS has frozen. The WDT works by setting a timeout. Then the WDT has to be periodically reset by software before it reaches the timeout. If it ever reaches that timeout, the EC will force a hard reboot on the whole system. This characteristic is specially useful to recover from unforseen catastrophic errors, without the need of human intervention.
This article describes how to set up and use the WDT on the Nexcom NISE50
Necessary files:
- NISE50 Control: nise50_control.tar.gz
- WDT Script: watchdog.sh
- WDT Template: watchdog.template.xml
Step-by-step guide
To install and configure the WD follow the next steps
- Transfer and unpack the NISE 50 control files:
- Transfer the nise50_control.tar.gz file to the NISE50 using a tool like SCP or WinSCP
Uncompress package:
tar -xvzf nise50_control.tar.gz
Two folders will be created:
Kernel module driver access
\kernelModule\wdt
(The driver includes led+wdt driver)User mode APP access
\userMode
Build the driver
cd kernelModule\wdt make
Install the driver
Edit the /etc/rc.local file
sudo vim /etc/rc.local
Add the following at the end of the file:
# Enable the Nexcom NISE50 Kernel module insmod /lib/modules/$(uname -r)/kernel/drivers/control.ko exit 0
Copy the driver
sudo cp control.ko /lib/modules/$(uname -r)/kernel/drivers/control.ko
Reboot
Check the driver version to verify the installation:
cat /sys/devices/platform/nise50/nise50/version DATE 06-29-2016 VER: 0.10
- Install the watchdog script
- Transfer the watchdog.sh file to the gateway using SCP or WinSCP
if not already present, create a scripts folder:
sudo mkdir /opt/azeti/SiteController/scripts/
Copy the script file to the scripts folder
sudo cp watchdog.sh /opt/azeti/SiteController/scripts/
- Add the necessary actions to the SiteController.cfg
Edit the SiteController.cfg
sudo vi /opt/azeti/SiteController/config/SiteController.cfg
Add the actions to the file
[remote_exec_calls] watchdog_start = /opt/azeti/SiteController/scripts/watchdog.sh start watchdog_stop = /opt/azeti/SiteController/scripts/watchdog.sh stop watchdog_kick = /opt/azeti/SiteController/scripts/watchdog.sh kick
- Restart the SiteController if it was running.
- Use the template watchdog.template.xml in the cloud. Create the instance and add it to the site template. Deploy the site template. After that the watchdog will work
The default configuration in the files is a timeout of 10 minutes, and a WDT reset is every 2 minutes. To change the WDT timeout edit the watchdog.sh and change "echo 600" to the timeout in seconds. To change the reset interval, change the timer on the template rule.
Related articles
Filter by label
There are no items with the selected labels at this time.