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 (firstname.lastname@example.org) for any information they might have on Linux. Simon Machell promptly replied referring me to Ken Hollis (email@example.com) 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.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide