NEW: sar weekly

This commit is contained in:
xpk 2020-04-20 11:24:58 +08:00
parent 74a62c702d
commit 482f1a0f99
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

8
sh/sar-weekly.sh Normal file
View File

@ -0,0 +1,8 @@
#!/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}'
sar -r -f $f | tail -1 | awk '{print "Memused: "$5}'
sar -f $f | tail -1 | awk '{print "iowait: "$6}'
echo "- - -"
done