Task management problem

G

Guest

Hello all,

I'm having a problem regarding on how to identify different processes with
the same name.

I have a batch script monitoring a service and when that service is not OK
it has to restart the service. The service doesn't drop a PID file so I need
to check all the tasks trough the batch script, identify the service and kill
it so he can start again.

The problem is that with tasklist this service (we have 4 instances running)
all have the same name and the only way to identify which one I have to kill
is by the arguments passed to launch the service (-d config1.cfg or -d
config2.cfg, etc..).

My question is: Is there a way to execute a "unix like" PS (prints cmd line
arguments) in order to check which exact PID I have to kill?

Like this:

mysql 1501 1 0 May17 ? 00:00:00 /bin/sh
/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf
--pid-file=/var/run/mysqld/mysqld.pid

Thanks in advance for your support!
Regards
 
G

Guest

Anyone knows a command line tool that prints all the processes including the
initial command line arguments instead of only printing the name of the
process?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top