Merge "Add pidstat support"

This commit is contained in:
Jenkins 2014-01-25 21:06:14 +00:00 committed by Gerrit Code Review
commit 22d985f9d9

View File

@ -298,6 +298,9 @@ SYSLOG_PORT=${SYSLOG_PORT:-516}
SYSSTAT_FILE=${SYSSTAT_FILE:-"sysstat.dat"}
SYSSTAT_INTERVAL=${SYSSTAT_INTERVAL:-"1"}
PIDSTAT_FILE=${PIDSTAT_FILE:-"pidstat.txt"}
PIDSTAT_INTERVAL=${PIDSTAT_INTERVAL:-"5"}
# Use color for logging output (only available if syslog is not used)
LOG_COLOR=`trueorfalse True $LOG_COLOR`
@ -885,6 +888,16 @@ if is_service_enabled sysstat; then
fi
fi
if is_service_enabled pidstat; then
# Per-process stats
PIDSTAT_OPTS="-l -p ALL -T ALL"
if [[ -n ${SCREEN_LOGDIR} ]]; then
screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE"
else
screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL"
fi
fi
# Start Services
# ==============