You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/12/19 21:16:31 UTC
ambari git commit: AMBARI-19243 : Metric monitor start command failed
though the process started successfully. (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 9b8a17bd2 -> eaa57846a
AMBARI-19243 : Metric monitor start command failed though the process started successfully. (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eaa57846
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eaa57846
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eaa57846
Branch: refs/heads/branch-2.5
Commit: eaa57846aa22b2a69073d6be69269bc0b1a77493
Parents: 9b8a17b
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Mon Dec 19 13:16:21 2016 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Mon Dec 19 13:16:21 2016 -0800
----------------------------------------------------------------------
.../conf/unix/ambari-metrics-monitor | 9 +++++----
.../src/main/python/core/host_info.py | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaa57846/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 220d533..967e133 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 | grep -w ${PID} | grep resource_monitoring`" ]; then
+ if [ -z "`ps ax -o pid | grep -w ${PID}`" ]; then
echo "${PIDFILE} found with no process. Removing ${PID}..."
rm -f ${PIDFILE}
else
@@ -151,8 +151,9 @@ case "$1" in
sleep 2
- echo "Verifying ${METRIC_MONITOR} process status..."
- if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then
+ echo "Verifying ${METRIC_MONITOR} process status with PID : ${PID}"
+ if [ -z "`ps ax -o pid | grep -w ${PID}`" ]; then
+ echo "Output of PID check : `ps ax -o pid | grep -w ${PID}`"
if [ -s ${OUTFILE} ]; then
echo "ERROR: ${METRIC_MONITOR} start failed. For more details, see ${OUTFILE}:"
echo "===================="
@@ -173,7 +174,7 @@ case "$1" in
if [ -f ${PIDFILE} ]; then
PID=`cat ${PIDFILE}`
echo "Found ${METRIC_MONITOR} PID: $PID"
- if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then
+ if [ -z "`ps ax -o pid | grep -w ${PID}`" ]; then
echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE"
retcode=2
else
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaa57846/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py
index 7992cff..90f73fa 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/host_info.py
@@ -191,7 +191,7 @@ class HostInfo():
try:
usage = psutil.disk_usage(part.mountpoint)
except Exception, e:
- logger.error('Failed to read disk_usage for a mountpoint : ' + str(e))
+ logger.debug('Failed to read disk_usage for a mountpoint : ' + str(e))
continue
if part.device in devices: # Skip devices already seen.