service enabled is something that's not required for sysstat and
friends, because instead we actually can do this with screen_it.
Change-Id: I4aa5787101cb0def46690f38a7f82effbb85f502
| ... | ... |
@@ -863,42 +863,36 @@ fi |
| 863 | 863 |
init_service_check |
| 864 | 864 |
|
| 865 | 865 |
|
| 866 |
-# Sysstat |
|
| 866 |
+# Sysstat and friends |
|
| 867 | 867 |
# ------- |
| 868 | 868 |
|
| 869 | 869 |
# If enabled, systat has to start early to track OpenStack service startup. |
| 870 |
-if is_service_enabled sysstat; then |
|
| 871 |
- # what we want to measure |
|
| 872 |
- # -u : cpu statitics |
|
| 873 |
- # -q : load |
|
| 874 |
- # -b : io load rates |
|
| 875 |
- # -w : process creation and context switch rates |
|
| 876 |
- SYSSTAT_OPTS="-u -q -b -w" |
|
| 877 |
- if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 878 |
- screen_it sysstat "cd $TOP_DIR; ./tools/sar_filter.py $SYSSTAT_OPTS -o $SCREEN_LOGDIR/$SYSSTAT_FILE $SYSSTAT_INTERVAL" |
|
| 879 |
- else |
|
| 880 |
- screen_it sysstat "./tools/sar_filter.py $SYSSTAT_OPTS $SYSSTAT_INTERVAL" |
|
| 881 |
- fi |
|
| 870 |
+# what we want to measure |
|
| 871 |
+# -u : cpu statitics |
|
| 872 |
+# -q : load |
|
| 873 |
+# -b : io load rates |
|
| 874 |
+# -w : process creation and context switch rates |
|
| 875 |
+SYSSTAT_OPTS="-u -q -b -w" |
|
| 876 |
+if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 877 |
+ screen_it sysstat "cd $TOP_DIR; ./tools/sar_filter.py $SYSSTAT_OPTS -o $SCREEN_LOGDIR/$SYSSTAT_FILE $SYSSTAT_INTERVAL" |
|
| 878 |
+else |
|
| 879 |
+ screen_it sysstat "./tools/sar_filter.py $SYSSTAT_OPTS $SYSSTAT_INTERVAL" |
|
| 882 | 880 |
fi |
| 883 | 881 |
|
| 884 |
-if is_service_enabled dstat; then |
|
| 885 |
- # Per-process stats |
|
| 886 |
- DSTAT_OPTS="-tcndylp --top-cpu-adv" |
|
| 887 |
- if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 888 |
- screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE" |
|
| 889 |
- else |
|
| 890 |
- screen_it dstat "dstat $DSTAT_OPTS" |
|
| 891 |
- fi |
|
| 882 |
+# A better kind of sysstat, with the top process per time slice |
|
| 883 |
+DSTAT_OPTS="-tcndylp --top-cpu-adv" |
|
| 884 |
+if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 885 |
+ screen_it dstat "cd $TOP_DIR; dstat $DSTAT_OPTS | tee $SCREEN_LOGDIR/$DSTAT_FILE" |
|
| 886 |
+else |
|
| 887 |
+ screen_it dstat "dstat $DSTAT_OPTS" |
|
| 892 | 888 |
fi |
| 893 | 889 |
|
| 894 |
-if is_service_enabled pidstat; then |
|
| 895 |
- # Per-process stats |
|
| 896 |
- PIDSTAT_OPTS="-l -p ALL -T ALL" |
|
| 897 |
- if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 898 |
- screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE" |
|
| 899 |
- else |
|
| 900 |
- screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL" |
|
| 901 |
- fi |
|
| 890 |
+# Per-process stats |
|
| 891 |
+PIDSTAT_OPTS="-l -p ALL -T ALL" |
|
| 892 |
+if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
| 893 |
+ screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE" |
|
| 894 |
+else |
|
| 895 |
+ screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL" |
|
| 902 | 896 |
fi |
| 903 | 897 |
|
| 904 | 898 |
|