linux查看占用swap内存进程 for i in $(ls /proc | grep “1” | awk ‘$0>100’); do awk ‘/Swap:/{a=a+KaTeX parse error: Expected 'EOF', got '}' at position 2: 2}̲END{print '"i"’,a/1024"M"}’ /proc/$i/smaps;done| sort -k2nr | head 0-9 ↩︎