Help creating a process.pid file please

2007-12-24 23:06:00

Hi,

In order to control the stopping of processes that don't create their own
process.pid file I have written scripts with a line similar to this:
(I'm using named as an example - I know named creates its own named.pid
file)

ps -ef | grep named | awk '{print $2}' > /var/run/named.pid

This type of syntax has worked well in the past. However I am now trying to
control an application (and multiple instances of different versions of that
app) that we have in house that doesn't have anything "unique" to grep for.

Can anyone suggest another way of creating a process.pid file - for a
process that doesn't create one on its own?

I will summarize

Thanks!!

Greg

Greg Bennett
Equipe Communications
gbennett at equipecom.com

Comments

Got something to say?

You must be logged in to post a comment.