X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fsysstat.sh;h=6ecab67705c37f5fbc73229d1af376a78a769665;hb=6eefde1f463638b5021c2ec96eb67a017d379f1f;hp=d90061c01513c824ee27faa359f9343a3b14ab29;hpb=6a177f2aa47a827ac661f3f5d1bb61035bf83588;p=releng%2Fglobal-jjb.git diff --git a/shell/sysstat.sh b/shell/sysstat.sh index d90061c0..6ecab677 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. # @@ -34,9 +34,9 @@ SAR_DIR="$WORKSPACE/archives/sar-reports" mkdir -p "$SAR_DIR" cp "$SYSSTAT_PATH/"* "$_" # convert sar data to ascii format -while IFS="" read -r s +while IFS="" read -r sarfilenum do - [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/sar${s//[!0-9]/}" + [ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}" done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true) # DON'T fail build if script fails.