Browse code

Merge "add dstat to see top process info"

Jenkins authored on 2014/02/13 02:27:12
Showing 4 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+dstat
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+dstat
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+dstat
0 1
\ No newline at end of file
... ...
@@ -298,6 +298,8 @@ SYSLOG_PORT=${SYSLOG_PORT:-516}
298 298
 SYSSTAT_FILE=${SYSSTAT_FILE:-"sysstat.dat"}
299 299
 SYSSTAT_INTERVAL=${SYSSTAT_INTERVAL:-"1"}
300 300
 
301
+DSTAT_FILE=${DSTAT_FILE:-"dstat.txt"}
302
+
301 303
 PIDSTAT_FILE=${PIDSTAT_FILE:-"pidstat.txt"}
302 304
 PIDSTAT_INTERVAL=${PIDSTAT_INTERVAL:-"5"}
303 305
 
... ...
@@ -879,6 +881,16 @@ if is_service_enabled sysstat; then
879 879
     fi
880 880
 fi
881 881
 
882
+if is_service_enabled dstat; then
883
+    # Per-process stats
884
+    DSTAT_OPTS="-tcndylp --top-cpu-adv"
885
+    if [[ -n ${SCREEN_LOGDIR} ]]; then
886
+        screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE"
887
+    else
888
+        screen_it dstat "dstat $DSTAT_OPTS"
889
+    fi
890
+fi
891
+
882 892
 if is_service_enabled pidstat; then
883 893
     # Per-process stats
884 894
     PIDSTAT_OPTS="-l -p ALL -T ALL"