查看 linux swap 使用狀況
Mem: 16427616k total, 16374588k used, 53028k free, 872k buffers top - 16:48:42 up 153 days, 6:12, 3 users, load average: 1.90, 2.02, 2.04 Tasks: 1210 total, 2 running, 1208 sleeping, 0 stopped, 0 zombie Cpu(s): 12.5%us, 1.2%sy, 0.0%ni, 85.9%id, 0.0%wa, 0.1%hi, 0.2%si, 0.0%st Mem: 16427616k total, 16371592k used, 56024k free, 524k buffers Swap: 16779884k total, 208k used, 16779676k free, 15398336k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 29369 root 25 0 94600 7904 2632 R 98.5 0.0 118:27.17 sshd
一般而言用 top 指令. 預設是看不到 swap. 所以要額外按一些按鈕. 進去 top 然後按 O 再按 p 最後按 enter 就可以看到 swap
top - 16:50:29 up 153 days, 6:14, 3 users, load average: 1.80, 1.94, 2.00 Tasks: 1210 total, 3 running, 1207 sleeping, 0 stopped, 0 zombie Cpu(s): 11.6%us, 2.1%sy, 0.0%ni, 85.8%id, 0.0%wa, 0.0%hi, 0.5%si, 0.0%st Mem: 16427616k total, 16189080k used, 238536k free, 692k buffers Swap: 16779884k total, 208k used, 16779676k free, 15218204k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND 8898 root 18 0 151m 6724 972 S 0.0 0.0 0:00.01 144m hpssd.py