题解 | #ps分析-统计VSZ,RSS各自总和#
ps分析-统计VSZ,RSS各自总和
https://www.nowcoder.com/practice/7094b5f96e1a4c998ce01baf407beee6
#!/bin/bash echo "MEM TOTAL" echo "VSZ_SUM:`cat nowcoder.txt | awk '{print $5,$6}' | awk 'BEGIN{sum=0;sum1=0;}{sum=sum+$1;sum1=sum1+$2}END{print sum/1024"M,RSS_SUM:"sum1/1024"M"}'`" #cat nowcoder.txt | awk '{getline;print $6}'