Is There A Network Equivalent Of Alt-SysReq?
Random Q. Hacker asks: "Alt-SysReq has saved me from filesystem damage and runaway processes more than once. Unfortunately, several of the machines I admin are thousands of miles away in data centers, and it takes 15 minutes for data center personnel to go to our cage, hook up a monitor to the right system, and call back for interactive troubleshooting. I have played with snmpd, but it's a userspace daemon, and most of its functionality involves executing external programs and accessing files. Sometimes a system gets hung so bad (say, on root becoming unavailable, or memory becoming completely full) that the only thing still working is the kernel itself. Is there a kernel backdoor (as in a patch) that could let me have (secure, authenticated) SysReq functionality through the network?"
Another choice might be to insert a terminal server over at the remote end, connected to the lan on one side and the server's console port on the other ("10/100 Serial Server" over at Blackbox). It wouldn't give you a remote reset capability, but you'd be able to control the server no matter what state it was in, short of total unresponsiveness.
Secure authenticated? that might be a bit much to ask.... however...
I'm speaking from only a general knowledge here, I'm not an expert on kernel hacking or anything, but possibly what could be done is this...
if you have multipul servers at the location, prehaps they could be connected via a serial port, and you could login to the other server that ISN'T completely ****ed up, and use the serial link? wether or not this will itself requier kernel patches I do not know, as I've never made use of a "serial console" in any way... but it seems a lot easier and probably more likely to happen than a secure authenticated method right to the locked server
just my $.02
What does SysReq do? It seems to do nothing in Windows and DOS, but what does it do in Linux?
"Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
There are lots of things you can do really. APC and others make products that allow you to power cycle machines remotely. I've seen 1u boxes with a bunch of serial ports that allow you to access consoles remotely. You could also build a box with a bunch of serial ports and connect consoles that way. I have various networking devices connected to serial ports on a FreeBSD box, and it's great to console into them when you hosed something :)
Abstainer: a weak person who yields to the temptation of denying himself a pleasure.
Abstainer: a weak person who yields to the temptation of denying himself a pleasure.
--Ambrose Bierce
If its PC hardware, sending a break over the serial port does the same as SysRq, so if you got a console server(these let you use serial ports over the network, you usually telnet into them and then pick a port) you could do all the Magic SysRq stuff remotely... Combine this with a somthing to do remote poweroffs, a modern bios that does serial console stuff (lets you config the bios), a properly configured bootloader, and a properly configured kernel and you'll never need a physical console (excluding hardware failures).
/*
*Not a Sermon, Just a Thought
*/
*Not a Sermon, Just a Thought
*/
Along the lines with those who suggested a serial console, perhaps hooked to a terminal server:
I've seen (awhile ago now) a company that makes a serial console 'card' for a linux machine. The machine sees it as an MGA or Hercules video adapter, and it allows *all* configuration over the serial port, including BIOS (Because the MB sees it as a video card). Once the kernel is booted, it switches to a standard serial mode, so you could even do things like "boot linux single" through lilo.
If I can find a link to the card again, I'll reply with it; but a search of Google might turn it up even.
Three dits, four dits, two dits, dah!
Radio, radio, rah rah rah!
Get a real unix box. Any true unix box will default to using the first serial port when no keyboard is present. This holds true for Sun/HP/DEC/SGI/.
Only the State obtains its revenue by coercion. - Murray Rothbard
Zac
This is a sig
You could also have more than one SSH server, to have getty access through the second serial port in case the first SSH server is down.
You also can wire up remote RESET buttons, such as relays controlled through serial ports or "one-wire" controllers. But you're trying to avoid RESET so as to allow a more controlled shutdown.
Note that "man gdm" includes a feature which allows a mouse to run scripts -- such as making triple-click run a shutdown script. You can hang a mouse on a server so an obscure click sequence will do a controlled shutdown or restart...or wire the mouse port to a relay...
Also, as others have mentioned, hang a watchdog in there -- Linux includes a software watchdog but for a server you really should have a hardware watchdog card in there. You can also have more than one watchdog, with the first one initiating a software shutdown -- if that fails, the second one with a longer interval can automatically push the hardware RESET.