The PC Weasel 2000

by Jon Valesh

If you ask system administrators the benefits of Linux as a server, one ability that always seems to come up is remote access, or the ability to get into the server to do anything that needs doing, without needing to be where the machine is. Linux—UNIX in general—handles that wonderfully. Unfortunately, PCs don't. To access CMOS settings or watch a system boot, you need to have a display attached, and you need to be there watching. There is nothing Linux, or any operating system, can do about it.

But the PC Weasel can help. The PC Weasel is an ISA card that replaces the system video card in servers intended for headless (without monitor and keyboard) operation. It acts as a video card and, with the connection of a short cable between the card and the system's keyboard port, as a keyboard too. With the PC Weasel, the monitor and keyboard are replaced by an RS-232 connection and any standard terminal emulation (VT100 or ANSI) running on anything from a dumb terminal to a handheld computer to another server.

That isn't all the Weasel can do. On motherboards with reset connectors, the PC Weasel can provide remote reset control that allows you to reboot locked servers or disable computers that may be causing problems on your network. There is also a watchdog timer mode, allowing the PC Weasel to reset the system automatically if the OS locks up, or it at least stops telling the card that everything is okay. Watchdog support requires kernels with PC-Weasel watchdog support, and you may need to patch your kernel to get this.

Having a serial console on a PC provides many advantages, not the least of which is that you can control a lot of computers from one workstation by using multiport serial cards or inexpensive RS-232 switch boxes to connect all of the headless servers to the workstation. This can save effort and time if you have a lot of rackmounted PCs. But, far more valuable, the PC Weasel allows you to place servers in remote locations and provide true remote administration. You can connect a standard external modem to the PC Weasel and have dial-in access to the computer—not just the running operating system, but the whole machine. You can watch the system self-test, change BIOS settings, view POST codes, diagnose failed hardware and do a few other jobs that usually mean having someone present with the computer.

And the PC Weasel isn't limited to Linux. It will work with any OS that supports text-mode video, including DOS and most UNIX variants.

Documentation

The PC Weasel manual is a spiral bound mini-tome of engineering wit and detail—a lot of detail, including everything from how to set the board jumpers to compiling custom code to run on the PC Weasel's on-board microprocessors. Though it tends to jump into low-level details with both feet, there is enough general information that anyone with a fair tolerance for jargon can get what they need. Given that the PC Weasel is aimed at a traditionally tech-savvy user base (system administrators, technical support personnel, embedded systems developers, etc.), the documentation is probably exactly right: human enough to be fun to read, but technical enough to be precise.

These days, when it seems like everyone has ADD, a lot of people (me, for example) would benefit from a single-page reference guide with nothing but the few facts most people would need who use the PC Weasel card. The card is fairly self-explanatory, but such a guide would be nice.

Installation

First the limitations: you need an available ISA slot; the PC Weasel doesn't come in a PCI version. Second, you can't have another video card installed in the computer alongside the PC Weasel. Given that, installing the PC Weasel is fairly simple, provided your computer's motherboard is willing. An unfortunate number of modern motherboards have video controllers built in, and unless the on-board video disables itself properly when the PC-Weasel card is installed, you may have problems. The PC Weasel's keyboard connection is made by way of an external jumper cable that is just a little bit messy and prone to being yanked out by careless people working around the computer. The reset feature requires that your motherboard have a reset jumper, a feature that a few new motherboards seem to be skipping.

The most painful part of installing a PC Weasel may very well be finding an ISA slot and the reset jumper on your motherboard. After removing the old video card, inserting the PC Weasel and hooking up the various cables and connecting your RS-232 cable to a PC or terminal, everything pretty much works.

The PC Weasel defaults to a safe 9600 baud communications rate, adjustable once a terminal is connected. The configuration is stored in nonvolatile EEPROM, so you don't have to worry much about forgetting your settings.

How Well Does It Work?

Before I get into how well it works, here's a few words about how it works. It is important to note that in many ways the PC Weasel is an independent computer that talks to the system through some fairly narrow channels, and the narrowness of the connection provides for rather narrow areas of dependence. The first and most basic of the dependencies is power: the PC Weasel draws power from the system motherboard, and as long as the system motherboard has power, the PC Weasel runs. When the system is powered on, the PC Weasel boots separately, and runs separately, from the system CPU. This has some very positive implications for remote administration because it means that you can connect to a system even if the motherboard has completely locked up, as long as there is power. You'll only see the last screen the system displayed before it crashed, but at least you'll see something, and because the PC Weasel has abilities that go beyond a display and keyboard, you can perform a hard reset of the locked-up computer and then watch it boot without disconnecting and having to wait, blind and hoping, for the system to start.

Anyone who has ever had to call a remote office, data center or business to ask them to reboot a server, and has had to wheedle and beg to get someone to spend the five minutes it takes to find the (hopefully) right server and press the reset button, will appreciate being able to perform their own rebooting and watch it happen.

That said, there are some limitations: you get nothing but text. Forget about boot graphics or fancy boot loaders; absolutely forget about X or using any operating system that has forgotten how to think in ASCII; text is what you'll get, so save the graphics for after the OS has booted, when you can use OS-level remote access.

And the necessary kludges: a terminal doesn't have all the keys a 104-key keyboard has. And even if it did, it probably wouldn't have a Remote Reset Button key, or a Configure the PC Weasel Card key. The solution is to use an “attention” keystroke to bring up PC Weasel-specific menus, similar to many Telnet applications. The default attention keystroke is Ctrl-^ or Ctrl-~ (depending on your terminal), though that can be reconfigured. When you send the attention keystoke, a command prompt appears at the top of the screen. From there, you can type a single-character command, or a multicharacter mnemonic that represents one of the keys not available on most terminals. For example, when you are in the attention mode, typing xlshift is the same as pressing (and releasing) the left Shift key. The command xscrllk is like pressing the Scroll Lock key. This is somewhat typing intensive but allows you to access all of the keyboard functions. It is also fairly unimportant when dealing with operating systems like Linux; as it's designed to be terminal-friendly, you rarely need to go beyond the keys a terminal would have anyway. There are also special sequences for using the Ctrl, Alt and Shift keys as modifiers, so you can, for example, send a three fingered salute by typing a command like xc-a-del.

The most valuable application of the PC Weasel is in remote servers. Whether you have a web server colocated in an ISP or a data logger on the side of a mountain, having to drive hours—or worse, wake someone up so they can unlock the site to let you in—to get to your server can be a killer. Having another way into your equipment can be a lifesaver. Most of us count on SSH or Telnet to get us in, but when the normal communication paths go away, being able to make contact could save you the price of the PC Weasel the first time something went wrong.

To make the PC Weasel even more useful, it has another feature for those who need to move data as well as control the machine: the card can be used as a standard serial port by the PC in a passthrough mode where data coming from the serial port is passed over the line that would normally provide screen and keyboard information. How is this useful? If you are setting up a remote data logger or need to be able to move information, not screens, you can have system software use the PC Weasel's serial port and carry out all communications through a single modem or serial cable. I didn't try this, but it should also be possible to connect to a computer using the PC Weasel's serial console and start a PPP connection over that serial port, allowing both core system access when something has gone wrong and TCP/IP for the more flexible access it provides.

Within the limitations of its hardware and the emulations it connects to, the PC Weasel works very well.

For Remote Embedded Systems People

Okay, you aren't a system administrator. You don't care about web servers. You do care about real-world solutions, and those solutions involve putting a PC somewhere in the real-world. And, in the real world, that means that every once in a while one of the people you sold your real-world solution to calls and asks, quite reasonably, why it isn't doing anything. You have a few weapons in your arsenal to answer those questions. Maybe you have pppd set up waiting for an incoming call on a modem line, maybe getty is good enough, maybe you've been selling these systems so long that you've got DOS and a five-year-old copy of Closeup. Whatever you have, it works, but all too often you've got to call your customer and have them go over and do something to the system you sold them. The PC Weasel, out of the box, can do a lot toward making those calls disappear: the watchdog timer will hide persistent problems, and the reliability of not counting on remote-access software loaded after the OS will keep you from needing to call and ask someone to kick the hardware (or worse, sending someone driving/flying to do the same job), but the PC Weasel can be made to do more. By writing your own software to run on the PC Weasel, you can make the Weasel smart about the problems you face. For example, you could change the watchdog timer to automatically call your pager to let you know something went wrong rather than simply resetting the computer. Or if you want to get fancy, you could write software to watch the screen automatically for specific messages and type preconfigured commands when they are seen, perhaps restarting your crashing software or performing a soft reboot rather than an imperious hard reset. The PC Weasel includes a software API and information (including sample code snippets) on writing custom software to run on the card, independent of the system CPU.

Summary

The PC Weasel adds to the capabilities of a standard PC running any text-mode operating system, providing a watchdog timer, remote reboot capability and a serial console to make bringing large numbers of server consoles to one workstation or remotely accessing those same servers in a cost-effective manner. However, it may not be the best choice for everyone. At $250 each, you need to take a hard look at how much the card will save you. How often do your servers crash? How much effort and time is involved in hooking a keyboard and CRT up so you can watch them reboot? If the server is at the other end of an airplane flight, the PC Weasel is a no-brainer, but if the server is at the other end of the room, or if pressing the reset button is a telephone call away, it may not be the right choice.

Born at the beginning of the microcomputer age, Jon Valesh (jon@valesh.com) has pushed and been pushed by computers his entire life. Having run the gamut from games programmer to ISP system/network administrator, he now occupies himself by providing technical assistance to ISPs and small businesses whenever his day job doesn't get in the way.

Load Disqus comments