diff --git a/src/im_mad/remotes/common.d/monitord-client-shepherd.sh b/src/im_mad/remotes/common.d/monitord-client-shepherd.sh index 5d099a7b81..d480253f32 100755 --- a/src/im_mad/remotes/common.d/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/common.d/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e /collectd-client.rb -e /monitord-client.rb| grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e /monitord-client.rb| grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids diff --git a/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh b/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh index 58c69c2687..5e86f8942d 100755 --- a/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh +++ b/src/im_mad/remotes/common.d/monitord-client-shepherd_local.sh @@ -27,7 +27,7 @@ CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid [ -f $CLIENT_PID_FILE ] || exit 0 running_pid=$(cat $CLIENT_PID_FILE) -pids=$(ps axuwww | grep -e "/collectd-client.rb.*${HID}" -e "/monitord-client.rb.*${HID} " | grep -v grep | \ +pids=$(ps axuwww | grep -e "/monitord-client.rb.*${HID} " | grep -v grep | \ awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then diff --git a/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh b/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh index ec4f70a5b5..0260877722 100755 --- a/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/kvm-probes.d/host/beacon/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e "/collectd-client.rb kvm" -e "/monitord-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e "/monitord-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids diff --git a/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh b/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh index 0edcd59638..f830755c02 100755 --- a/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh +++ b/src/im_mad/remotes/lxd-probes.d/host/beacon/monitord-client-shepherd.sh @@ -19,7 +19,7 @@ ( [ -f /tmp/one-monitord-client.pid ] || exit 0 running_pid=$(cat /tmp/one-monitord-client.pid) -pids=$(ps axuwww | grep -e "/monitord-client.rb lxd" -e "/collectd-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") +pids=$(ps axuwww | grep -e "/monitord-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$") if [ -n "$pids" ]; then kill -6 $pids