From 8209d3e3b8c6fbb7d0389efe8e67beaf6263d60e Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 7 Oct 2023 19:07:07 -0600 Subject: [PATCH 1/2] fixing bug with systat interactive move And there is an underlying bug with the pidstat command parsing. We will want to update the command to use -T ALL when it is fixed - I will update the PR here. Signed-off-by: vsoch --- pkg/metrics/perf/sysstat.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/metrics/perf/sysstat.go b/pkg/metrics/perf/sysstat.go index 8e77b0f..91d6103 100644 --- a/pkg/metrics/perf/sysstat.go +++ b/pkg/metrics/perf/sysstat.go @@ -236,10 +236,12 @@ while true retval=$? if [[ $retval -ne 0 ]]; then echo "%s" + %s exit 0 fi if [[ $completions -ne 0 ]] && [[ $i -eq $completions ]]; then echo "%s" + %s exit 0 fi sleep %d @@ -259,7 +261,9 @@ done metadata.Separator, showPIDS, metadata.CollectionEnd, + interactive, metadata.CollectionEnd, + interactive, m.rate, ) postBlock := fmt.Sprintf("\n%s\n", interactive) From 5295e81d0eb1d371a3a9ce38f1a4aec697ca45cc Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 7 Oct 2023 19:08:19 -0600 Subject: [PATCH 2/2] use tabs so it looks uniform Signed-off-by: vsoch --- pkg/metrics/perf/sysstat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/metrics/perf/sysstat.go b/pkg/metrics/perf/sysstat.go index 91d6103..73ed405 100644 --- a/pkg/metrics/perf/sysstat.go +++ b/pkg/metrics/perf/sysstat.go @@ -236,12 +236,12 @@ while true retval=$? if [[ $retval -ne 0 ]]; then echo "%s" - %s + %s exit 0 fi if [[ $completions -ne 0 ]] && [[ $i -eq $completions ]]; then echo "%s" - %s + %s exit 0 fi sleep %d