用kill
我想你可以尝试以下方法:
$kill -6 1
这将信号#6发送到进程#1(init进程).如果您在信号手册页中阅读:“man 7 signals”:
Signal Value Action Comment
-------------------------------------------------------------------------
SIGHUP 1 Term Hangup detected on controlling terminal
or death of controlling process
SIGINT 2 Term Interrupt from keyboard
SIGQUIT 3 Core Quit from keyboard
SIGILL 4 Core Illegal Instruction
SIGABRT 6 Core Abort signal from abort(3)
您可以了解进程如何处理各种信号(cat / proc / $PID / status).有关详细信息,请参阅此U& L Q& A:How can I check what signals a process is listening to?.
内存溢出
另一种方法是溢出内存以引起内核恐慌.首先,您需要禁用交换.
$swapon -s
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 14352376 3177812 -1
$swapoff /dev/mapper/VolGroup00-LogVol01
现在消耗所有内存:
$for r in /dev/ram*; do cat /dev/zero > $r; done
参考