WDT in Linux

R

ryanHo

Guest
I would like to trigger the WatchDog Timer from my system(Intel QM67 platform),what is the sample code/command to do so?
Please advise.
Thanks!
 


Do you have wdt installed?

Code:
#include <signal.h>
 
void watchdog(int sig)
{
  printf("Pet the dog\r\n");
  /* reset the timer so we get called again in 5 seconds */
  alarm(5);
}
 
 
/* start the timer - we want to wake up in 5 seconds */
int main()
{
  /* set up our signal handler to catch SIGALRM */
  signal(SIGALRM, watchdog);
  alarm(5);
  while (true)
  ;
}
 
Do you have wdt installed?

Code:
#include <signal.h>
 
void watchdog(int sig)
{
  printf("Pet the dog\r\n");
  /* reset the timer so we get called again in 5 seconds */
  alarm(5);
}
 
 
/* start the timer - we want to wake up in 5 seconds */
int main()
{
  /* set up our signal handler to catch SIGALRM */
  signal(SIGALRM, watchdog);
  alarm(5);
  while (true)
  ;
}


Thanks for reply.
Actually, I need to run a program on my system to trigger a watchdog signal to the system.
Can you help me to find the documentation or tools that would allow me to do this?
 
Okay, lets get the system setup. First what distro are you using? Is the kernel setup to use WDT? Have you installed wdt? IE bmc-watchdog in Ubuntu.

You may not need to use a specific program. If you set the timer EXTREMELY low Watchdog may activate naturally.
 

Members online


Top