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