add dstat to see top process info

pidstat data isn't exceptionally useful, it's lots of lines, and
seems to be missing some of the most critical one.

dstat is kind of like sysstat, except the formatting is much better.
It also supports advanced features like the top CPU using process
at every interval.

put this behind the sysstat variable, as we'll probably want to
replace sysstat & pidstat with this if it works

Change-Id: I48dc22a0a7e63fe3abb527646cc70525998a7d85
This commit is contained in:
Sean Dague 2014-02-10 22:24:49 -05:00
parent b4b9146de2
commit 062cdaf84c
4 changed files with 15 additions and 0 deletions

1
files/apts/dstat Normal file
View File

@ -0,0 +1 @@
dstat

1
files/rpms-suse/dstat Normal file
View File

@ -0,0 +1 @@
dstat

1
files/rpms/dstat Normal file
View File

@ -0,0 +1 @@
dstat

View File

@ -298,6 +298,8 @@ SYSLOG_PORT=${SYSLOG_PORT:-516}
SYSSTAT_FILE=${SYSSTAT_FILE:-"sysstat.dat"}
SYSSTAT_INTERVAL=${SYSSTAT_INTERVAL:-"1"}
DSTAT_FILE=${DSTAT_FILE:-"dstat.txt"}
PIDSTAT_FILE=${PIDSTAT_FILE:-"pidstat.txt"}
PIDSTAT_INTERVAL=${PIDSTAT_INTERVAL:-"5"}
@ -879,6 +881,16 @@ if is_service_enabled sysstat; then
fi
fi
if is_service_enabled dstat; then
# Per-process stats
DSTAT_OPTS="-tcndylp --top-cpu-adv"
if [[ -n ${SCREEN_LOGDIR} ]]; then
screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE"
else
screen_it dstat "dstat $DSTAT_OPTS"
fi
fi
if is_service_enabled pidstat; then
# Per-process stats
PIDSTAT_OPTS="-l -p ALL -T ALL"