Berkshire PC Watchdog
Product: PC Watchdog
Manufacturer: Berkshire Products
Price: $144.95 US $159.95 US with temperature monitor option
Reviewer: David Walker
Do you have an Internet server that needs to be on-line 24 hours a day, 7 days a week dependably? A hardware watchdog timer is one way to be sure such a system is down for a minimal length of time. One such board is the PC Watchdog System Monitoring Board made by Berkshire Products.
I reviewed the PC Watchdog (rev. C) with the temperature monitoring option, part number 1090-1. From the manual: “The PC Watchdog board is a short, 8-bit ISA card that is used to monitor a PC to ensure maximum system availability.”
The board can monitor a PC's activity in several ways to determine if it has locked up. Dip switches on the board can be set to monitor specific I/O addresses for activity. If the PC Watchdog board does not detect activity on the monitored addresses for the specified period of time, it reboots the machine.
The board has a user I/O port that can be used for enhanced watchdog control and monitoring. This is the same interface used by the Linux kernel PC watchdog driver and PC watchdog daemon. If an I/O port on the board is not written to within the specified time, the board reboots the machine.
The board came packed in an anti-static bag in a box with a manual and a 3.5-inch MS-DOS disk of MS-DOS software, including source code. The manual covers the details of the hardware thoroughly. However, it did not specifically describe a Linux installation, and no Linux software is included on the disk.
The PC Watchdog comes with software drivers for MS-DOS/MS Windows. Linux support is available with the kernel and on the Internet. The board works with Intel architecture motherboards and requires one ISA slot.
The board uses three dip switches to configure its operation. I configured the board in order to ignore I/O activity as the Linux driver writes to the user I/O port to keep the board from resetting the PC. I set the address of the user I/O port to 0x0270 and set the delay time to one minute. My switch settings are shown in Figure 1.
I compiled the Linux 2.0.28 kernel with the PC Watchdog driver enabled as a module. I also compiled the watchdog daemon from watchdog_2.0-0.tar.gz (from sunsite.unc.edu in /pub/Linux/system/Admin) and added it to /etc/rc.d/rc.local. I created /dev/watchdog and /dev/temperature with the major and minor device numbers specified in the kernel documentation on the watchdog (linux/Documentation/watchdog.txt).
When all was ready, I shut down my machine, turned off the power and installed the PC Watchdog board in an ISA slot, following the instructions in the manual.
A wire on the board connects to the reset connecter on the motherboard. The wire from the reset switch connects to another connecter on the Watchdog board, so that the reset switch on the case will still work.
When I turned the power on, my machine booted. After a 3.5-minute delay, the PC Watchdog beeped then rebooted my machine. After a few reboots I disconnected the wire from the board to the reset connector until I could figure out how to make the software work correctly.
I sent e-mail to Berkshire Products (email@example.com) for any information they might have on Linux. Simon Machell promptly replied referring me to Ken Hollis (firstname.lastname@example.org) who wrote the kernel driver for the PC Watchdog board.
While I waited to hear from Ken, I found a bug in the kernel driver. After I fixed this bug, the example watchdog daemon from linux/Documentation/watchdog.txt and the daemon from watchdog_2.0-0.tar.gz worked.
Listing 1 is my patch to fix the kernel driver included with Linux-2.0.28. It may also work with other kernels—your mileage may vary.
Ken directed me to the latest driver he has written: ftp://ftp.bitgate.com/pub/mirrors/bitgate/pcwd/pcwd-1.01.tar.gz. I got the tar file, looked at the contents, then patched my kernel source tree with the patch file patch-2.0.15.
Patching linux/drivers/char/pcwd.c and linux/include/linux/pcwd.h wasn't successful, so I copied pcwd-2.0.27.c to linux/drivers/char/pcwd.c and pcwd.h to linux/include/linux/pcwd.h. The watchdog driver then compiled successfully.
The new driver does not work with the daemons for the older driver; it comes with a new daemon. The driver works correctly with the included daemon. The daemon included with the driver lacks one useful feature: the daemon from watchdog_2.0-0.tar.gz. It doesn't fork when it writes to /dev/watchdog, so it won't reboot the machine if the process table gets full.
I modified the daemon to fork before writing to /dev/watchdog, so a full process table will cause a reboot of the machine. Listing 2 is the patch to watchdog.c from pcwd-1.01.tar.gz.
I did try compiling the PC Watchdog driver as part of the kernel, but it caused an error and wasn't initialized properly. It works fine compiled as a module.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- BitTorrent Inc.'s Sync
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- New Container Image Standard Promises More Portable Apps
- The Humble Hacker?
- The Death of RoboVM
- The US Government and Open-Source Software
- Open-Source Project Secretly Funded by CIA
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- ACI Worldwide's UP Retail Payments
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide