Merge "add dstat to see top process info"
diff --git a/files/apts/dstat b/files/apts/dstat
new file mode 100644
index 0000000..2b643b8
--- /dev/null
+++ b/files/apts/dstat
@@ -0,0 +1 @@
+dstat
diff --git a/files/rpms-suse/dstat b/files/rpms-suse/dstat
new file mode 100644
index 0000000..2b643b8
--- /dev/null
+++ b/files/rpms-suse/dstat
@@ -0,0 +1 @@
+dstat
diff --git a/files/rpms/dstat b/files/rpms/dstat
new file mode 100644
index 0000000..8a8f8fe
--- /dev/null
+++ b/files/rpms/dstat
@@ -0,0 +1 @@
+dstat
\ No newline at end of file
diff --git a/stack.sh b/stack.sh
index 67e137c..e45707b 100755
--- a/stack.sh
+++ b/stack.sh
@@ -298,6 +298,8 @@
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 @@
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"