Sunday 22 January 2023

vmstat – Virtual memory statistics

 The vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity.

vmstat 3
Sample Outputs:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 2540988 522188 5130400    0    0     2    32    4    2  4  1 96  0  0
 1  0      0 2540988 522188 5130400    0    0     0   720 1199  665  1  0 99  0  0
 0  0      0 2540956 522188 5130400    0    0     0     0 1151 1569  4  1 95  0  0
 0  0      0 2540956 522188 5130500    0    0     0     6 1117  439  1  0 99  0  0
 0  0      0 2540940 522188 5130512    0    0     0   536 1189  932  1  0 98  0  0
 0  0      0 2538444 522188 5130588    0    0     0     0 1187 1417  4  1 96  0  0
 0  0      0 2490060 522188 5130640    0    0     0    18 1253 1123  5  1 94  0  0

Display Memory Utilization Slabinfo

vmstat -m

Get Information About Active / Inactive Memory Pages

vmstat -a

Linux Find Out What Process Are Using Swap Space

Use the smem command:

smem
Another option is to combine pgrep command with the grep command to find out SWAP mem usage:
pgrep memcached

grep --color VmSwap /proc/48440/status

Linux Find Out What Process Are Using Swap Space

Linux Find Out What Process Are Using Swap Space

No comments:

Post a Comment