Repository: ambari Updated Branches: refs/heads/trunk df2dbe150 -> 8999aee37
AMBARI-15063 : Metrics monitor fails on restart - Commit 2 (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8999aee3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8999aee3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8999aee3 Branch: refs/heads/trunk Commit: 8999aee37b2f4129304f6e93b7928d0bafd68f25 Parents: df2dbe1 Author: Aravindan Vijayan <[email protected]> Authored: Wed Feb 17 15:20:10 2016 -0800 Committer: Aravindan Vijayan <[email protected]> Committed: Wed Feb 17 15:20:10 2016 -0800 ---------------------------------------------------------------------- .../conf/unix/ambari-metrics-monitor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8999aee3/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor ---------------------------------------------------------------------- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor index aa4ae02..7464c55 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor +++ b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor @@ -131,7 +131,7 @@ case "$1" in echo "Checking for previously running Metric Monitor..." if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` - if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${PIDFILE} found with no process. Removing ${PID}..." rm -f ${PIDFILE} else @@ -152,7 +152,7 @@ case "$1" in sleep 2 echo "Verifying ${METRIC_MONITOR} process status..." - if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then if [ -s ${OUTFILE} ]; then echo "ERROR: ${METRIC_MONITOR} start failed. For more details, see ${OUTFILE}:" echo "====================" @@ -173,7 +173,7 @@ case "$1" in if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` echo "Found ${METRIC_MONITOR} PID: $PID" - if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE" retcode=2 else
