Watchdog Timer Error Messages - Sun Oracle Netra T5440 Administration Manual

Hide thumbs Also See for Netra T5440:
Table of Contents

Advertisement

Example Watchdog Program (Continued)
EXAMPLE A-1
#include
<sys/types.h>
#include
<fcntl.h>
#include
<unistd.h>
#include
<sys/stat.h>
#include
<lom_io.h>
int main() {
uint_t timeout = 30; /* 30 seconds */
lom_dogctl_t dogctl;
int fd;
dogctl.reset_enable = 1;
dogctl.dog_enable = 1;
fd = open("/dev/ntwdt", O_EXCL);
/* Set timeout */
ioctl(fd, LOMIOCDOGTIME, (void *)&timeout);
/* Enable watchdog */
ioctl(fd, LOMIOCDOGCTL, (void *)&dogctl);
/* Keep patting */
while (1) {
ioctl(fd, LOMIOCDOGPAT, NULL);
sleep (5);
}
return (0);
}

Watchdog Timer Error Messages

describes watchdog timer error messages that might be displayed and
TABLE A-1
Appendix A
Watchdog Timer Application Mode
81

Advertisement

Table of Contents
loading

Table of Contents