今天在工作的時候遇到一個問題,就是我啓動一個項目(script/server)後,這個進程壞死了
等你強制關了重新啓動後報錯,說那個地址還在被使用中……
今天引進的命令是ps
$ ps -A
PID TTY TIME CMD
1 ? 00:00:01 init
2 ? 00:00:00 kthreadd
3 ? 00:00:00 migration/0
4 ? 00:00:00 ksoftirqd/0
5 ? 00:00:00 watchdog/0
6 ? 00:00:00 migration/1
7 ? 00:00:00 ksoftirqd/1
8 ? 00:00:00 watchdog/1
9 ? 00:00:00 events/0
10 ? 00:00:00 events/1
11 ? 00:00:00 khelper
46 ? 00:00:00 kblockd/0
47 ? 00:00:00 kblockd/1
50 ? 00:00:00 kacpid
51 ? 00:00:00 kacpi_notify
141 ? 00:00:00 kseriod
183 ? 00:00:00 pdflush
184 ? 00:00:00 pdflush
185 ? 00:00:00 kswapd0
226 ? 00:00:00 aio/0
227 ? 00:00:00 aio/1
1514 ? 00:00:00 ksuspend_usbd
1518 ? 00:00:00 khubd
1553 ? 00:00:00 khpsbpkt
1628 ? 00:00:00 ata/0
1630 ? 00:00:00 ata/1
1632 ? 00:00:00 ata_aux
2331 ? 00:00:00 knodemgrd_0
2349 ? 00:00:00 scsi_eh_0
2350 ? 00:00:01 scsi_eh_1
2638 ? 00:00:17 mount.ntfs
2673 ? 00:00:01 loop0
2676 ? 00:00:00 kjournald
2881 ? 00:00:00 udevd
3213 ? 00:00:00 kpsmoused
3364 ? 00:00:00 kmmcd
3931 ? 00:00:52 b43
4305 ? 00:00:00 ipolldevd
4919 tty4 00:00:00 getty
4920 tty5 00:00:00 getty
4922 tty2 00:00:00 getty
4924 tty3 00:00:00 getty
4926 tty6 00:00:00 getty
5111 ? 00:00:00 acpid
5154 ? 00:00:00 kondemand/0
5155 ? 00:00:00 kondemand/1
5229 ? 00:00:00 syslogd
5282 ? 00:00:00 dd
5284 ? 00:00:00 klogd
5306 ? 00:00:11 dbus-daemon
5322 ? 00:00:00 system-tools-ba
5344 ? 00:00:00 sshd
5365 ? 00:00:00 avahi-daemon
5366 ? 00:00:00 avahi-daemon
5381 ? 00:00:00 slapd
5424 ? 00:00:00 cupsd
5474 ? 00:00:00 mysqld_safe
5641 ? 00:00:02 mysqld
5734 ? 00:00:24 wicd
5775 ? 00:00:00 dhcdbd
5794 ? 00:00:00 hald
5801 ? 00:00:00 console-kit-dae
5802 ? 00:00:00 hald-runner
5877 ? 00:00:00 hald-addon-inpu
5898 ? 00:00:00 hald-addon-cpuf
5899 ? 00:00:00 hald-addon-acpi
5910 ? 00:00:02 wicd-monitor
5915 ? 00:00:01 hald-addon-stor
5935 ? 00:00:00 hcid
5942 ? 00:00:00 btaddconn
5943 ? 00:00:00 btdelconn
5956 ? 00:00:00 bluetoothd-serv
5959 ? 00:00:00 krfcommd
5965 ? 00:00:00 bluetoothd-serv
5985 ? 00:00:00 gdm
6005 ? 00:00:00 gdm
6014 tty7 00:06:38 Xorg
6025 ? 00:00:00 atd
6039 ? 00:00:00 cron
6184 tty1 00:00:00 getty
6270 ? 00:00:01 gconfd-2
6277 ? 00:00:00 gnome-keyring-d
6278 ? 00:00:00 x-session-manag
6297 ? 00:00:01 scim-launcher
6301 ? 00:00:00 scim-helper-man
6302 ? 00:00:06 scim-panel-gtk
6304 ? 00:00:00 scim-launcher
6345 ? 00:00:00 seahorse-agent <defunct>
6349 ? 00:00:00 dbus-daemon
6350 ? 00:00:02 gnome-settings-
6354 ? 00:00:12 pulseaudio
6357 ? 00:00:00 gconf-helper
6370 ? 00:00:06 gnome-screensav
6371 ? 00:00:00 compiz
6372 ? 00:00:19 gnome-panel
6374 ? 00:00:31 nautilus
6380 ? 00:00:00 bonobo-activati
6408 ? 00:00:00 gvfsd
6423 ? 00:00:00 gvfs-fuse-daemo
6449 ? 00:00:21 compiz.real
6450 ? 00:00:00 bluetooth-apple
6453 ? 00:00:00 update-notifier
6455 ? 00:00:01 pidgin
6460 ? 00:00:00 tracker-applet
6463 ? 00:00:00 evolution-alarm
6466 ? 00:00:00 trackerd
6468 ? 00:00:16 wicd-client
6471 ? 00:00:00 python
6473 ? 00:00:03 wicd-client
6475 ? 00:00:00 gnome-volume-ma
6476 ? 00:00:00 gnome-power-man
6508 ? 00:00:00 gvfsd-burn
6522 ? 00:00:00 evolution-excha
6526 ? 00:00:00 evolution-data-
6543 ? 00:00:00 gvfsd-trash
6575 ? 00:00:00 trashapplet
6590 ? 00:00:00 sh
6591 ? 00:00:00 compiz-decorato
6593 ? 00:00:06 gtk-window-deco
6616 ? 00:00:00 mixer_applet2
6618 ? 00:00:00 fast-user-switc
6874 ? 00:00:00 notification-da
7265 ? 00:00:00 qq
7266 ? 00:01:11 qq
7292 ? 00:00:00 dhclient
9200 ? 00:05:31 firefox
10693 ? 00:00:00 gnome-vfs-daemo
12592 ? 00:00:04 soffice.bin
12768 ? 00:00:05 smplayer
12774 ? 00:00:12 mplayer
13812 ? 00:00:00 mount.ntfs-3g
14305 ? 00:00:02 smplayer
14627 ? 00:00:00 sh
14628 ? 00:00:01 gnome-terminal
14632 ? 00:00:00 gnome-pty-helpe
14633 pts/0 00:00:00 bash
14700 pts/1 00:00:00 bash
14960 pts/1 00:00:01 ruby
15332 pts/0 00:00:00 ps
現在這個壞死的進程是關鍵字ruby
pgrep ruby
14960
顯示14960是那個壞死進程的pid、
kill -9 14960
就殺死可這個進程
二、查看CPU是多少位的(這個是查看操作系統是多少位,並不是查看cpu支持多少位 )
getconf LONG_BIT
32