X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fsysstat.sh;h=66c18f8421b53619740203c309e83be250a98837;hb=069fe5a151b96af411f29c66f06e86c5e263b704;hp=03cab6dc33d29db536bd941eac48b8e56348f13a;hpb=6b8bc7c5fa00404831dbba4935a3af793beeadcd;p=releng%2Fglobal-jjb.git diff --git a/shell/sysstat.sh b/shell/sysstat.sh index 03cab6dc..66c18f84 100644 --- a/shell/sysstat.sh +++ b/shell/sysstat.sh @@ -1,5 +1,5 @@ #!/bin/bash -# @License EPL-1.0 +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. # @@ -15,6 +15,11 @@ OS=$(facter operatingsystem) case "$OS" in Ubuntu) SYSSTAT_PATH="/var/log/sysstat" + + # Dont run the script when systat is not enabled by default + if ! grep --quiet 'ENABLED="true"' "/etc/default/sysstat"; then + exit 0 + fi ;; CentOS|RedHat) SYSSTAT_PATH="/var/log/sa"