Authored by Rong

auto commit by shell by gr

... ... @@ -43,10 +43,10 @@ cpu_load=$(cat /proc/loadavg | awk '{print $1}')
cpu_ratio=$(awk -F ',' '$1=="CPU_ALL"&&$2=="T0001"{print 100-$6}' <${tmp_file_path})
#内存使用率 %
memory_ratio=$(awk -F ',' '$1=="MEM"&&$2=="T0001"{print ($3-$7)*100/$3}' <${tmp_file_path})
memory_ratio=$(awk -v n=$memory_ratio '{printf("%.2f", n)}')
memory_ratio=$(echo $memory_ratio | awk -v n=$memory_ratio '{printf("%.2f", n)}')
#网络收发吞吐量 Mbps
net=$(awk -F ',' '$1=="NET"&&$2=="T0001"{max=$4;if($6>$4) max=$6;print max*8/1024}' <${tmp_file_path})
net=$(awk -v n=$net '{printf("%.2f", n)}')
net=$(echo $net | awk -v n=$net '{printf("%.2f", n)}')
#磁盘IO 使用率 %
disk_busy=$(cat ${tmp_file_path} | grep DISKBUSY,T0001 | awk -F ',' '{max=0.0;for(i=3;i<=NF;i++) if($i>max) max=$i ;print max}')
#使用的端口号数量
... ...