Often it happens that some programs hangs and it doesnot close by clicking the “X ” button.In that case we can use “$kill ” command to kill the process.”$Kill” has several options attached with it. To kill something forcibly we use “-9″ option. I show u some example.
——————
step1:->
$ps -a
-> this will list all process (but not that which runs in the background)
$ps -e
->this will list all process , evem those that runs in the background
—————————————
step2->
Now that we have listed the process by above two methods, chose the “pid” of that process which u want to kill
$kill “pidnumber”
->where pidnumber is the one u noted from above which u want to stop.
**this may not kill some process. So for this use -9 option
$kill -9 “pidnumber”
-> now ur required process will be closed
———————————–
Actually sometimes while using TopCoder Arena, the applet didnot closes or it Hangs, To stop it either i has to restart the system or i had to log off and then log in. Now through theses commnads with -9 option i can close it.
sample:->
[abc@localhost ~]$ ps
PID TTY TIME CMD
3564 pts/0 00:00:00 bash
3857 pts/0 00:00:00 ps
[abc@localhost ~]$ ps -a
PID TTY TIME CMD
3858 pts/0 00:00:00 ps
[abc@localhost ~]$ ps -e
PID TTY TIME CMD
1 ? 00:00:00 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:01 events/0
10 ? 00:00:00 events/1
11 ? 00:00:00 cpuset
12 ? 00:00:00 khelper
13 ? 00:00:00 netns
14 ? 00:00:00 async/mgr
15 ? 00:00:00 kintegrityd/0
16 ? 00:00:00 kintegrityd/1
17 ? 00:00:00 kblockd/0
18 ? 00:00:00 kblockd/1
19 ? 00:00:00 kacpid
20 ? 00:00:00 kacpi_notify
21 ? 00:00:00 ata/0
22 ? 00:00:00 ata/1
23 ? 00:00:00 ata_aux
24 ? 00:00:00 ksuspend_usbd
25 ? 00:00:00 khubd
26 ? 00:00:00 kseriod
27 ? 00:00:00 khungtaskd
28 ? 00:00:00 pdflush
29 ? 00:00:00 pdflush
30 ? 00:00:00 kswapd0
31 ? 00:00:00 aio/0
32 ? 00:00:00 aio/1
33 ? 00:00:00 crypto/0
34 ? 00:00:00 crypto/1
40 ? 00:00:00 scsi_eh_0
41 ? 00:00:00 scsi_eh_1
43 ? 00:00:00 kpsmoused
44 ? 00:00:00 kstriped
45 ? 00:00:00 ksnapd
46 ? 00:00:00 usbhid_resumer
69 ? 00:00:00 kdmflush
70 ? 00:00:00 kdmflush
71 ? 00:00:00 kjournald2
80 ? 00:00:00 kauditd
158 ? 00:00:00 udevd
776 ? 00:00:00 kmmcd
795 ? 00:00:00 tifm
863 ? 00:01:23 phy0
894 ? 00:00:00 pccardd
989 ? 00:00:00 hd-audio0
1063 ? 00:00:00 kmpathd/0
1064 ? 00:00:00 kmpathd/1
1065 ? 00:00:00 kmpath_handlerd
1093 ? 00:00:00 kjournald
1179 ? 00:00:00 kondemand/0
1180 ? 00:00:00 kondemand/1
1212 ? 00:00:00 auditd
1214 ? 00:00:00 audispd
1215 ? 00:00:00 sedispatch
1239 ? 00:00:00 rsyslogd
1262 ? 00:00:00 rpcbind
1281 ? 00:00:03 dbus-daemon
1291 ? 00:00:00 avahi-daemon
1292 ? 00:00:00 avahi-daemon
1301 ? 00:00:00 cupsd
1322 ? 00:00:00 acpid
1330 ? 00:00:01 hald
1333 ? 00:00:00 console-kit-dae
1334 ? 00:00:00 hald-runner
1424 ? 00:00:04 hald-addon-inpu
1442 ? 00:00:00 hald-addon-gene
1458 ? 00:00:00 hald-addon-cpuf
1459 ? 00:00:00 hald-addon-acpi
1475 ? 00:00:00 pcscd
1489 ? 00:00:00 NetworkManager
1495 ? 00:00:00 nm-system-setti
1499 ? 00:00:00 wpa_supplicant
1507 ? 00:00:00 rpc.statd
1533 ? 00:00:00 rpciod/0
1536 ? 00:00:00 rpciod/1
1543 ? 00:00:00 rpc.idmapd
1551 ? 00:00:00 bluetoothd
1565 ? 00:00:00 bluetooth
1578 ? 00:00:00 sshd
1618 ? 00:00:00 gpm
1629 ? 00:00:00 crond
1640 ? 00:00:00 atd
1648 ? 00:00:00 gdm-binary
1649 tty4 00:00:00 mingetty
1650 tty5 00:00:00 mingetty
1651 tty2 00:00:00 mingetty
1652 tty3 00:00:00 mingetty
1653 tty6 00:00:00 mingetty
1694 ? 00:00:00 gdm-simple-slav
1695 tty1 00:05:29 Xorg
1724 ? 00:00:00 dbus-launch
1772 ? 00:00:00 sendmail
1773 ? 00:00:00 sendmail
1840 ? 00:00:01 devkit-power-da
1842 ? 00:00:00 devkit-daemon
1895 ? 00:00:00 gdm-session-wor
1920 ? 00:00:00 gnome-keyring-d
1934 ? 00:00:00 gnome-session
1949 ? 00:00:00 dbus-launch
1951 ? 00:00:00 dbus-daemon
2032 ? 00:00:02 gconfd-2
2037 ? 00:00:00 gnome-settings-
2050 ? 00:00:04 metacity
2055 ? 00:00:24 pulseaudio
2056 ? 00:00:02 gnome-panel
2059 ? 00:00:00 gconf-helper
2061 ? 00:00:00 gvfsd
2073 ? 00:00:00 gvfs-fuse-daemo
2077 ? 00:00:02 nautilus
2079 ? 00:00:00 bonobo-activati
2084 ? 00:00:00 seapplet
2085 ? 00:00:00 nm-applet
2086 ? 00:00:00 bluetooth-apple
2090 ? 00:00:00 python
2091 ? 00:00:00 notification-da
2093 ? 00:00:00 gnome-volume-co
2096 ? 00:00:00 im-settings-dae
2098 ? 00:00:00 kerneloops-appl
2105 ? 00:00:01 gpk-update-icon
2116 ? 00:00:01 gnome-power-man
2129 ? 00:00:02 kerneloops
2314 ? 00:00:00 gconf-im-settin
2348 ? 00:00:00 gvfsd-trash
2351 ? 00:00:00 gvfs-gdu-volume
2353 ? 00:00:01 devkit-disks-da
2354 ? 00:00:00 devkit-disks-da
2364 ? 00:00:00 trashapplet
2365 ? 00:00:03 wnck-applet
2368 ? 00:00:00 gvfs-gphoto2-vo
2373 ? 00:00:01 clock-applet
2377 ? 00:00:01 tomboy
2378 ? 00:00:00 notification-ar
2380 ? 00:00:00 gdm-user-switch
2388 ? 00:00:00 gvfsd-burn
2398 ? 00:00:00 run-mozilla.sh
2413 ? 00:04:51 firefox
2432 ? 00:00:01 gnome-screensav
2753 ? 00:00:02 gedit
3562 ? 00:00:00 gnome-terminal
3563 ? 00:00:00 gnome-pty-helpe
3564 pts/0 00:00:00 bash
3718 ? 00:00:01 javaws ->this is TopCoder application running
3763 ? 00:00:18 javaws->--do--
3860 pts/0 00:00:00 ps
[abc@localhost ~]$ kill -9 3718
[abc@localhost ~]$ kill -9 3763
[abc@localhost ~]$ kill -9 2413
[abc@localhost ~]$ ps -e



Recent Comments