HP UX How to kill Process

Hi,

I am Database Admin working on HP UX - last week when Sys admin is away i supposed to kill the fbackup process - which running when the Tape was write protected. My question i need to identify the process of fbackup at the time and i need to kill that one. Please any one could shed some light on this. With the steps and the commands i need to go with.

Thanks in advacne

Prakash

use
>ps -eaf|grep processname
to get the pid
then use
>kill -9 pid
to kill the process

I hope this helps

Hello gauravgoel

Thanks a lot for the message - for example if it is a fbackup process

is it like

$ps-ef|grep fbackup
then we get the pid

then

kill -9 pid # right

Thanks
Prakash

Ya prakash,
you are absolutely correct
the PID is the 2nd column from the left in the output of ps-ef|grep processname command

If still any confusion, post back the output of ps -ef|grep name command

Thanks,
Gaurav

Doing a "kill -9" should be reserved for a last resort. Doing a "kill -9" as the first thing you try is a terrible idea. In the case of fbackup, it is a disaster. Do a "kill -15 pid. Or just a "kill pid". The author of the kill program made -15 the default for a reason. In the case of fbackup, it will catch the -15 and go though a graceful shutdown procedure. fbackup is managing a suite of other processes and these must be shutdown first. And ipc's must be released. Especially a rather large shared memory segment. If you kill fbackup with a -9 that shared memory segment will remain allocated. It can be manually removed with ipcs/ipcrm but if you remove the wrong segment you will screw something else up. A reboot will be the safest way to recover.

Hey Prederabo,
Thanks for the info, I always used to do kill -9, but from now onwards will be more careful.

Thanks
Gaurav