题解 | #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{ print "MEM TOTAL"; printf("VSZ_SUM:%.1fM,RSS_SUM:%.3fM",VSZ/1024,RSS/1024);}' "./nowcoder.txt"