Running process in Unix or Linux system sometimes are not responding or stop working for long period, to solve the problem the process need to be restarted or terminated, here are some technique to solve the problem.
First.
Open your Unix/Linux shell terminal.
Second.
Find the process id that going to be killed.
use ps or pidof to list the running process id.
ps aux | grep process_namepidof process_name
example:
ps aux | grep lighttpdthe output from the command above
lighttpd 3486 0.0 0.1 4248 1432 ? S Jul31 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf lighttpd 3492 0.0 0.5 13752 3936 ? Ss Jul31 0:00 /usr/bin/php5-cgor using pidof
example:
pidof lighttpdthe output from the command above
3486Third.
Use the kill command
kill PID_numberexample:
kill 3486use the -9 command option if you want to terminate instantly the process from the id which has been defined.
killall command.
Don't use this command in Unix system, it will terminate all running process, use this command only in Linux System.
the syntax
killall -9 process_nameexample
killall -9 lighttpd
Source: here
0 comments:
Post a Comment