2

For the heck of it, what's the fastest way to kill a server, other than just pulling the plug?

Kill as in a(n) (un)safe shutdown, you could theoretically reboot it and have it survive the incident.

Edit: Tangentially related to serverfault.com, my apologies. IMHO, the question is related in that these are possible things users could be attempting, as well as in the case of adverse conditions there might be reasons server admins want to take down multiple boxes lest undefined "damage" might occur.

Edit2: opened to community wiki.

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
EricR
  • 199
  • 4
  • 12

13 Answers13

15

give an oracle dba the root password.

Sirex
  • 5,499
  • 2
  • 33
  • 54
10

On a Sun server, Stop-A suspends the kernel immediately. You can press the key combination or send an equivalent signal on the serial console.

On Linux, Alt-SysRq-O crashes the kernel immediately. Through a remote shell, you can do echo o > /proc/sysrq-trigger. There are other magic SysRq keys that will cause an immediate unclean reboot. Alt-SysRq-S is handy to sync to disk first.

200_success
  • 4,771
  • 1
  • 25
  • 42
  • Bingo, cheers mate. – EricR Jul 15 '10 at 00:22
  • I'd like to add that "echo b > /proc/sysrq-trigger" is useful when an NFS client is wedged so badly that a clean reboot is likely to hang forever. In that case, I would rather take the chance of local filesystem corruption (which is unlikely to be a problem with journaling) than to be left with a remote server that is unreachable because SSH has shut down and NFS hangs while trying to unmount. – 200_success Jul 15 '10 at 00:35
  • I shall have to try that next time our VM running Zimbra decides it neither wants to work or properly shut down. `echo S > /proc/sysrq-trigger` followed by `echo 0 > /proc/sysrq-trigger` should be slightly safer than just hitting the virtual bit red button. – David Spillett Jul 15 '10 at 01:11
7

C4, or other explosive

askvictor
  • 854
  • 3
  • 15
  • 29
7

For Windows, this one is simply delicious:

http://msdn.microsoft.com/en-us/library/ff545499(v=VS.85).aspx

Just a little Registry edit, and you'll be able to trigger an instant BSOD on any Windows system by pressing CTRL + SCROLL LOCK twice.

Massimo
  • 70,200
  • 57
  • 200
  • 323
  • Oohh, nice - I didn't know about this – Mark Henderson Jul 15 '10 at 05:53
  • 4
    Well, there *should* be some way to force a system crash in order to test and debug it, I suppose... MS developers couldn't just sit there waiting for it to randomly happen. Even if in good old times this wouldn't have meant waiting *so much* :-p – Massimo Jul 15 '10 at 05:57
6

You're not scaling. If it doesn't scale, it's not a solution.

EMP pulse.

Theoretically, if it didn't hard-fry the electronics, you could reinstall the OS and things would survive the incident. Fastest way to turn off an entire datacenter of machines -- just use a larger pulse -- and will work better than just pulling the power, as those UPSes/batteries won't get in your way.

Of course, it's not ideal scaling, as you're dealing inverse-square law for power vs coverage area and any decent computer scientist will wince at such an O constraint and look for a better algorithm. Perhaps a bunch of EMP pulse emitters, each triggerable by being subjected to a pulse, would give you an easy scaling cascade system, at the cost of small delays in the effect as the pulses ripple out.

Phil P
  • 3,080
  • 1
  • 16
  • 19
  • Wow, I like that. Wire them all together and have one box shielded (or not for that matter) set off localised EMPs throughout your data centre. Scalable and fun. – EricR Jul 15 '10 at 15:41
3

Universal: Find a paperclip and jam it in the "Reset" hole

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
3

Run a fork bomb as root? (or any user if no user resource limits are in place)

Or cat hair, dust, and other general household detritus gumming up all the cooling fans?

David Spillett
  • 22,754
  • 45
  • 67
3

This is handy for shutting down a Windows computer remotely:

C:\WINDOWS\system32\shutdown.exe -r -m \\MYCOMPUTERNAME01
C:\WINDOWS\system32\shutdown.exe -r -m \\192.168.1.186

-r means you are completely shutting it down and rebooting
-m means it's a remote machine
JohnB
  • 497
  • 2
  • 6
  • 12
3

For Windows:

shutdown -s -f -t 0 \\ServerName

This forces an immediate shutdown and causes all the applications to close (whether they'd like to or not).

K. Brian Kelley
  • 9,034
  • 32
  • 33
2

shutdown -t now has always been fast enough for me

linkedlinked
  • 446
  • 1
  • 3
  • 11
1

Depending on your system

halt --force

might get the job done (as far as quickness goes).

Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
1

Cross the pins in a USB port with something metal (paper clip works well), and you'll have a really quick power down (ie, instant). I've only ever seen this happen in a laptop, but I'd imagine it'd happen on a desktop as well. Amazingly, the computer has booted back up normally after it was done.

Paul Kroon
  • 2,250
  • 1
  • 16
  • 20
  • Interesting, hadn't heard of that before, something to try next time. – EricR Jul 15 '10 at 03:19
  • P.S. - Only try it if you're ok with frying the whole computer in case something goes wrong. :) – Paul Kroon Jul 15 '10 at 16:50
  • 1
    On a similar note, get a usb cable and plug both ends into the same computer. You'll certainly fry some components that way. – WheresAlice Jul 15 '10 at 17:34
  • [According to this blog post,](http://blogs.msdn.com/b/oldnewthing/archive/2006/11/29/1171695.aspx) USB 2.0 devices are now required to withstand short-circuits. – user1686 Jul 18 '10 at 21:29
1

Two fun ones that may not give you 'comes back up' (data corruption is vicious):

dd if=/dev/zero of=/dev/mem
dd if=/dev/urandom of=/dev/kmem

Of course, the other way around would be interesting too.

Slartibartfast
  • 3,295
  • 18
  • 16
  • 1
    What OSs have a /dev/mem? I run ubuntu, and there wasn't a /dev/mem last I checked – EricR Jul 15 '10 at 17:52
  • 1
    Linux xxx 2.6.32-xx-generic xxx-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux \\ $ ls -l /dev/mem crw-r----- 1 root kmem 1, 1 2010-07-14 00:02 /dev/mem – Slartibartfast Jul 16 '10 at 03:05