From 4250378ec5b0bb31fe1bffe2c5ee8257859911ab Mon Sep 17 00:00:00 2001 From: x p k Date: Mon, 20 Apr 2020 11:28:35 +0800 Subject: [PATCH] UPD: touch up --- sh/sar-weekly.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/sar-weekly.sh b/sh/sar-weekly.sh index 174a022..00e6992 100644 --- a/sh/sar-weekly.sh +++ b/sh/sar-weekly.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash for f in $(ls /var/log/sysstat/sa[0123]*); do -stat $f | grep Modify | awk '{print $2}' -sar -f $f | tail -1 | awk '{print "Idle: "$NF}' +echo -n "Date: "; stat $f | grep Modify | awk '{print $2}' +sar -f $f | tail -1 | awk '{print "CPU Used: ", 100-$NF}' sar -r -f $f | tail -1 | awk '{print "Memused: "$5}' sar -f $f | tail -1 | awk '{print "iowait: "$6}' echo "- - -"