diff --git a/files/apts/sysstat b/files/apts/sysstat new file mode 100644 index 0000000000..ea0c342d91 --- /dev/null +++ b/files/apts/sysstat @@ -0,0 +1 @@ +sysstat diff --git a/files/rpms-suse/sysstat b/files/rpms-suse/sysstat new file mode 100644 index 0000000000..ea0c342d91 --- /dev/null +++ b/files/rpms-suse/sysstat @@ -0,0 +1 @@ +sysstat diff --git a/files/rpms/sysstat b/files/rpms/sysstat new file mode 100644 index 0000000000..ea0c342d91 --- /dev/null +++ b/files/rpms/sysstat @@ -0,0 +1 @@ +sysstat diff --git a/stack.sh b/stack.sh index 331743f0a6..6cde9da1cf 100755 --- a/stack.sh +++ b/stack.sh @@ -268,6 +268,11 @@ SYSLOG=`trueorfalse False $SYSLOG` SYSLOG_HOST=${SYSLOG_HOST:-$HOST_IP} SYSLOG_PORT=${SYSLOG_PORT:-516} +# Enable sysstat logging +SYSSTAT_FILE=${SYSSTAT_FILE:-"sysstat.dat"} +SYSSTAT_INTERVAL=${SYSSTAT_INTERVAL:-"1"} + + # Use color for logging output (only available if syslog is not used) LOG_COLOR=`trueorfalse True $LOG_COLOR` @@ -1274,6 +1279,15 @@ if is_service_enabled nova && is_baremetal; then screen_it baremetal "nova-baremetal-deploy-helper" fi +# run sysstat if it is enabled +if is_service_enabled sysstat;then + if [[ -n ${SCREEN_LOGDIR} ]]; then + screen_it sysstat "sar -o $SCREEN_LOGDIR/$SYSSTAT_FILE $SYSSTAT_INTERVAL" + else + screen_it sysstat "sar $SYSSTAT_INTERVAL" + fi +fi + # Save some values we generated for later use CURRENT_RUN_TIME=$(date "+$TIMESTAMP_FORMAT") echo "# $CURRENT_RUN_TIME" >$TOP_DIR/.stackenv