free
free -m
free -mt
free -gt
Show figures in KB
Show figures in MB
Show figures in MB with Totals
Show figures in GB with Totals
awk '{a[$1]=$2} END{ print a["MemAvailable:"]/a["MemTotal:"]*100; }' /proc/meminfo
prtconf -m
svmon -G
svmon -O summary=basic,unit=auto
vmstat
vmstat 5 5
vmstat -a
vmstat -Itw 5 5
5 iterations, 5 seconds apart
Show inactive and active memory (instead of buff and cache)
(AIX) I/O oriented view ,with timestamp, wide mode
SMT
More information...
cat /proc/meminfo
dmidecode --type 17
lshw -short -C memory
Pagesize...
getconf PAGESIZE
Memory Nodes/Zones/Fragmentation...
cat /proc/buddyinfo
Information about storage used for swap...
cat /proc/swaps
cat /etc/fstab
dstat -d --top-mem
Processes by % Memory Usage...
for file in /proc/*/status
do
awk '/VmSize|Name|Uid/{printf $2 " " $3}END{ print ""}' $file
done | grep 101 | awk '{sum+=$3;} END{print sum;}'
For a breakdown of memory usage for a specifc process (e.g. 222)...
pmap 222
For a breakdown of shared memory usage...
ipcs -b
Processes by % Memory Usage...
ps -o pid,user,%mem,command ax | sort -b -k3 -r
ps -eo pid,cmd,%mem,%cpu --sort=-%mem
ps -eo pid,euser,cmd,vsz --sort=-vsz
ps -eo pid,euser,comm,vsz --sort=-vsz | grep grid | awk '{sum+=$4;} END{print sum;}'
Using top...
top
See the MEM% columnUsing htop...
htop
See the MEM% columnhtop
Top 15 Memory Hogs
svmon -Pt15 | perl -e 'while(<>){print if($.==2||$&&&!$s++);$.=0 if(/^-+$/)}'
ps aux | sort -n -k 6
ps alxww | sort -n -k 11
topas