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
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