PCI WATCHDOG TIME CARD

Check Program Time Out

WATCHDOG FILE SYSTEM USING LINUX

Here is watchfile.ini file format:
1. The 1st line is the device node of Decision WatchDog card,
such like "/dev/dwatchdog".

2. The 2nd to 6th lines are the files that you want to monitor.
Each line has three parameters.The first parameter is the file
name with full path.The second parameter is only "Yes" or "No" ,use for checking the file size when program scan the file.The third parameter is only "Yes" or "No",use for checking the last modified time when program scan the file.
p.s.1. Keep the line empty to allow the program skip the file.
p.s.2. Each line just has two conditions. The first one has three parameters for program to check and the second is empty for program to skip the line. Other condition will cause error to appear

3. The 7th line is also "Yes" or "No", use for the program to
send a reset command to watchdog card when one of the file that you monitor reached the condition

4. The 8th line has two parameters. The first is only "On" or "Off".
The second parameter is a number
The 8th line has two parameters. The first is only "On" or "Off".
The second parameter is a number

5. The 9th line is a number for time interval of the program will scan each file according to the pre-set time


INSTALLATION SETUP
PREPROCESSING
Uncompress the tar file, and enter the directory that have a watchfile.ini
# First, save the original "watchfile.ini" as a backup file.
1. cp watchfile.ini watchfile.ini.backup
# Then use editor(vi,joe....) to add the filename that you want to monitor.
# The watchfile.ini format is in the Top of this article.

2. vi watchfile.ini
or
joe watchfile.ini
# Run "install"

3. . ./install
# Now you may type "./watchfile &" to run, or type "make" to rebuild again.

4. . ./watchfile &
or
make
# [Optional] Set this program to run automatically when everytime
# the system is rebooting.

5. cd /etc/rc.d

6. vi rc.local
# If the path of the watchdog driver is "/root/watchdog", then
# at the bottom of "rc.local", add each line below and save it.
# The first five lines are to set up the driver, and the last line is running
# the program.
/sbin/insmod -f /root/watchdog/dwatchdog.o
rm -f /dev/dwatchdog
mknod /dev/dwatchdog c 154 154
chgrp root /dev/dwatchdog
chmod 664 /dev/dwatchdog
/usr/lib/watchfile &
NEXT