Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 47FD718821 for ; Tue, 16 Feb 2016 22:41:36 +0000 (UTC) Received: (qmail 7134 invoked by uid 500); 16 Feb 2016 22:41:36 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 7109 invoked by uid 500); 16 Feb 2016 22:41:36 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 7097 invoked by uid 99); 16 Feb 2016 22:41:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 22:41:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E6FB2E0577; Tue, 16 Feb 2016 22:41:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: avijayan@apache.org To: commits@ambari.apache.org Message-Id: <1ead65c124a24dffa068ad946076f089@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-15063 : Metrics monitor fails on restart (avijayan) Date: Tue, 16 Feb 2016 22:41:35 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 21fd70c9b -> d412ca11c AMBARI-15063 : Metrics monitor fails on restart (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d412ca11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d412ca11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d412ca11 Branch: refs/heads/trunk Commit: d412ca11c8347fb89e7a5318c72a7dc24d0c2ff9 Parents: 21fd70c Author: Aravindan Vijayan Authored: Tue Feb 16 14:41:00 2016 -0800 Committer: Aravindan Vijayan Committed: Tue Feb 16 14:41:00 2016 -0800 ---------------------------------------------------------------------- .../conf/unix/ambari-metrics-monitor | 6 +++--- .../conf/unix/ambari-metrics-collector | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d412ca11/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 815b3e4..aa4ae02 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 ${PID}`" ]; then + if [ -z "`ps ax -o pid | 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 ${PID}`" ]; then + if [ -z "`ps ax -o pid | 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 ${PID}`" ]; then + if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE" retcode=2 else http://git-wip-us.apache.org/repos/asf/ambari/blob/d412ca11/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector ---------------------------------------------------------------------- diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index f83af50..e319d73 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -267,7 +267,7 @@ function start() sleep 2 echo "Verifying ${METRIC_COLLECTOR} process status..." | tee -a $STARTUPFILE - if [ -z "`ps ax -o pid | grep ${PID}`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep ApplicationHistoryServer`" ]; then if [ -s ${OUTFILE} ]; then echo "ERROR: ${METRIC_COLLECTOR} start failed. For more details, see ${OUTFILE}:" | tee -a $STARTUPFILE echo "===================="