Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Kill the process

Status
Not open for further replies.

kporeddy

IS-IT--Management
Sep 7, 2001
49
US
Hi

I am not able to kill the process , The process should kill at night time. I am using following way.

if [ $? != 0 ]; then
/usr/bin/kill -9 `ps -ef | /usr/bin/grep 413 | /usr/bin/grep offleasegear.com_NOSSL | /usr/bin/awk '{print $2}'`
/usr/bin/echo "Forcibly stopped offleasegear.com_NOSSL instance at\n `/usr/bin/date`\n"
fi

it is printing the PID, but it is no killing the process some times.
Is there any other method to kill the process.

Can any one help me

Thanks
Karan
 
In Solaris 8 you could try

pkill -n offleasegear.com_NOSSL

Steve
 
harris, Thanks for your reply, I already tryed with that command, but there is no result..

karan
 
Hello Karen,

The following (similar to your command) works for me,

kill `ps -ef|grep offleasegear.com_NOSSL|grep -v grep | grep -v " $$ " | nawk '{print $2}' `

It may not work at your site but worth a try

Cheers

Marrow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top