标签:
cat 192.168.101.* | grep load | awk ‘{sum+=$4} END {print "average=", sum/NR}‘
cat 192.168.101.* | grep Memory | awk ‘{sum+=$3} END {print "average=", sum/NR}‘
cat 192.168.101.* | grep os-root | awk ‘{sum+=$5} END {print "average=", sum/NR}‘
cat 192.168.101.* | grep load | awk ‘BEGIN {max = 0} {if ($4>max) max=$4 fi} END {print "max=", max}‘
cat 192.168.101.* | grep Memory | awk ‘BEGIN {max = 0} {if ($3>max) max=$3 fi} END {print "max=", max}‘
cat 192.168.101.* | grep os-root | awk ‘BEGIN {max = 0} {if ($5>max) max=$5 fi} END {print "max=", max}‘
标橙色一条有错误,如下:
[root@XXXX]# cat 192.168.101.* | grep load
system load average: 0.73
system load average: 1.32
system load average: 0.59
system load average: 1.55
system load average: 1.92
system load average: 1.28
system load average: 1.00
system load average: 0.29
system load average: 2.42
system load average: 1.14
system load average: 0.45
system load average: 0.10
system load average: 2.01
system load average: 1.40
system load average: 1.21
system load average: 0.82
system load average: 14.61
system load average: 3.40
system load average: 0.17
system load average: 2.39
system load average: 0.16
system load average: 3.25
system load average: 1.15
system load average: 0.26
system load average: 0.17
[root@XXXX]# cat 192.168.101.* | grep load | awk ‘BEGIN {max = 0} {if ($4>max) max=$4 fi} END {print "max=", max}‘
max= 3.40
结果竟然是3.40而不是14.61
待探究
统计单日计算节点系统负荷、内存利用率和磁盘利用率 平均值和峰值
标签:
原文地址:http://www.cnblogs.com/cmss/p/5422304.html