【分享】如何砍掉已經掛掉的應用程式



贊助商連結


bentong
2002-08-22, 12:41 AM
一般會用top,可是它只顯示一個Page
您可用ps aux, 還可看出它是如何執行的, 你可利用它寫成捷徑或script
[root@localhost myprogram]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1368 476 ? S Aug21 0:03 init
root 2 0.0 0.0 0 0 ? SW Aug21 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW Aug21 0:00 [kapmd]
root 4 0.0 0.0 0 0 ? SWN Aug21 0:00 [ksoftirqd_CPU0]
root 5 0.0 0.0 0 0 ? SW Aug21 0:00 [kswapd]
root 6 0.0 0.0 0 0 ? SW Aug21 0:00 [bdflush]
root 7 0.0 0.0 0 0 ? SW Aug21 0:00 [kupdated]
root 8 0.0 0.0 0 0 ? SW Aug21 0:00 [mdrecoveryd]
root 16 0.0 0.0 0 0 ? SW Aug21 0:00 [kjournald]
root 136 0.0 0.0 0 0 ? SW Aug21 0:00 [kjournald]
root 449 0.0 0.0 0 0 ? SW Aug21 0:00 [eth0]
root 530 0.0 0.1 1428 540 ? S Aug21 0:00 syslogd -m 0
root 535 0.0 0.0 1364 440 ? S Aug21 0:00 klogd -x
root 676 0.0 0.0 1400 448 ? S Aug21 0:00 gpm -t ps/2 -m /dev/mouse
root 695 0.0 0.1 1536 608 ? S Aug21 0:00 crond
daemon 725 0.0 0.1 1404 516 ? S Aug21 0:00 /usr/sbin/atd
root 749 0.0 0.2 2272 1028 ? S Aug21 0:00 login -- root
root 750 0.0 0.0 1344 396 tty2 S Aug21 0:00 /sbin/mingetty tty2
root 751 0.0 0.0 1344 396 tty3 S Aug21 0:00 /sbin/mingetty tty3
root 752 0.0 0.0 1344 396 tty4 S Aug21 0:00 /sbin/mingetty tty4
root 753 0.0 0.0 1344 396 tty5 S Aug21 0:00 /sbin/mingetty tty5
root 754 0.0 0.0 1344 396 tty6 S Aug21 0:00 /sbin/mingetty tty6
root 757 0.0 0.2 2480 1280 tty1 S Aug21 0:00 -bash
root 804 0.0 0.2 1980 920 tty1 S Aug21 0:00 /bin/sh /usr/sbin/adsl-connect
root 831 0.0 0.1 1860 784 ? S Aug21 0:00 /usr/sbin/pppd pty /usr/sbin/pppoe -p /var/run/pppoe.conf-
root 832 0.0 0.1 1380 460 ? S Aug21 0:01 /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I e
root 1486 0.0 0.3 3476 1472 ? S Aug21 0:00 smbmount //CLIENTXP/ClientXP /home/tmp/CLIENTXP/ClientXP/
root 1546 0.0 0.2 2824 1024 tty1 S Aug21 0:00 /bin/sh /usr/X11R6/bin/startx
root 1559 0.0 0.1 2276 596 tty1 S Aug21 0:00 xinit /etc/X11/xinit/xinitrc --
root 1560 1.2 4.7 72616 21528 ? S< Aug21 0:29 X :0
root 1564 0.0 0.2 2836 1052 tty1 S Aug21 0:00 /bin/sh /usr/bin/startkde
root 1571 0.0 0.2 2840 1052 tty1 S Aug21 0:00 /bin/sh /etc/X11/xinit/xinitrc
root 1575 0.0 0.4 5128 2132 tty1 S Aug21 0:00 xcin
root 1625 0.0 1.5 19544 6920 ? S Aug21 0:00 kdeinit: Running...
root 1628 0.0 1.5 20052 7144 ? S Aug21 0:00 kdeinit: dcopserver --nosid
root 1631 0.0 1.9 21256 8564 ? S Aug21 0:00 kdeinit: klauncher
root 1669 0.0 0.3 3844 1568 ? S Aug21 0:00 rxvt
root 1670 0.0 0.3 3216 1416 pts/2 S Aug21 0:00 bash
root 1701 0.0 2.0 51704 9328 ? S Aug21 0:00 xmms
root 1702 0.0 2.0 51704 9328 ? S Aug21 0:00 xmms
root 1703 0.0 2.0 51704 9328 ? S Aug21 0:00 xmms
root 1704 0.0 2.0 51704 9328 ? S Aug21 0:00 xmms
root 1708 0.4 4.1 30968 18528 ? S Aug21 0:10 kdeinit: konqueror --silent
root 1859 0.0 0.2 2880 1088 ? S 00:28 0:00 /bin/sh /usr/local/mozilla/run-mozilla.sh /usr/local/mozil
root 1864 2.2 4.7 35592 21360 ? S 00:28 0:01 /usr/local/mozilla/mozilla-bin
root 1866 0.0 4.7 35592 21360 ? S 00:28 0:00 /usr/local/mozilla/mozilla-bin
root 1867 0.0 4.7 35592 21360 ? S 00:28 0:00 /usr/local/mozilla/mozilla-bin
root 1868 0.0 4.7 35592 21360 ? S 00:28 0:00 /usr/local/mozilla/mozilla-bin
root 1870 0.0 4.7 35592 21360 ? S 00:28 0:00 /usr/local/mozilla/mozilla-bin
root 1876 0.2 2.0 51704 9328 ? S 00:29 0:00 xmms
root 1877 0.2 2.0 51704 9328 ? S 00:29 0:00 xmms
root 1879 0.0 0.1 2680 760 pts/2 R 00:30 0:00 ps aux
[root@localhost myprogram]# kill -9 1877
然後下 kill -9 'PID'殺掉