Memory Space usage Status
free [OPTION]
- -B in bytes
- -M in megabytes
- -G in GB
- -H easy-to-read format
- -O does not display *-/+BUFFERS/CAC
- -T shows total RAM + swap
- -s n flush interval n seconds
- -c n is exited after Flushing N times
***
Vmstat command: Virtual memory information
- Vmstat [Options] [delay [count]]
- Vmstat 2 5
Procs:
- R: Number of processes that can run (running or waiting to run), and the number of cores
-
B: Number of processes in non-interruptible sleep state (length of blocked queue)
Memory
- SWPD: Total amount of swap memory used
- Free: Total Idle physical memory
- Buffer: The total amount of memory used for buffer
-
Cache: The total amount of memory used for the cache
Swap
- SI: Data rate for swapping into memory from disk (KB/S)
-
So: Data rate from memory swap to disk (KB/S)
Io:
- BI: The rate at which data is read from the block device to the system (KB/S)
-
Bo: The rate at which data is saved to a block device
System
- In:interrupts interrupt rate, including clock
-
Cs:context Switch Process Switching rate
Cpu:
- Us:time spent running Non-kernel code
- Sy:time spent running kernel code
- Id:time spent idle. Before Linux 2.5.41, including io-wait time.
- Wa:time spent waiting for IO. 2.5.41 before, including in Idle.
-
St:time stolen from a virtual machine. 2.6.11 ago, unknown.
Options:
-
-S: Show memory statistics
Iostat: Statistics CPU and device IO information
PMAP command: Memory mappings for processes
- PMAP [options] pid [...]
- -X: Display detailed format information
- Example: Pmap 1
Another implementation:
14. Memory tool Free;vmstat;iostat;pmap;