2
Linux:使用的总交换=进程使用的交换+?
因此,我试图对交换使用率高的系统中的交换使用来自何处进行调查: # free total used free shared buffers cached Mem: 515324 508800 6524 0 4852 27576 -/+ buffers/cache: 476372 38952 Swap: 983032 503328 479704 加总每个进程使用的交换: # for proc in /proc/*; do cat $proc/smaps 2>/dev/null | awk '/Swap/{swap+=$2}END{print swap "\t'`readlink $proc/exe`'"}'; done | sort -n | awk '{total+=$1}/[0-9]/;END{print total "\tTotal"}' 0 …