devstack/lib/dstat
Ian Wienand c00d2a5313 run dstat with run_process
It is not clear to me why this can't use run_process?  Currently we
end up with two log-files both with the same thing

- dstat.txt.gz which comes from the "tee" and is symlinked into
  SCREEN_LOGDIR, so gets picked-up by the gate scripts
- screen-dstat.txt.gz which comes from screen_it

Change-Id: I00b9e09b8d44f72ff14e69dc6e4a4bd5e2a0439e
2015-04-14 09:42:23 +10:00

33 lines
618 B
Bash

#!/bin/bash
#
# lib/dstat
# Functions to start and stop dstat
# Dependencies:
#
# - ``functions`` file
# ``stack.sh`` calls the entry points in this order:
#
# - start_dstat
# - stop_dstat
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
# start_dstat() - Start running processes, including screen
function start_dstat {
# A better kind of sysstat, with the top process per time slice
DSTAT_OPTS="-tcmndrylpg --top-cpu-adv --top-io-adv"
run_process dstat "dstat $DSTAT_OPTS"
}
# stop_dstat() stop dstat process
function stop_dstat {
stop_process dstat
}
# Restore xtrace
$XTRACE