Skip to content

Linux RAM using

http://www.linuxatemyram.com/

# Общее (-m в мегабайтах)
$ free -m

# смотрим у какого процесса сколько
ps -eo size,pid,user,command | \
awk '{ hr=$1/1024 ; printf("%13.6f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }'| \
sort -n | tail -20
cat /proc/meminfo

Pay attention to line 'Inactive'

MemTotal:        1024428 kB
MemFree:          270128 kB
MemAvailable:     807544 kB
Buffers:           30496 kB
Cached:           602032 kB
SwapCached:            0 kB
Active:           411716 kB
Inactive:         268044 kB
Active(anon):      47564 kB
Inactive(anon):     4268 kB
Active(file):     364152 kB

# reset page cache
echo 1 > /proc/sys/vm/drop_caches
# reset cache: dentry и inodes
echo 2 > /proc/sys/vm/drop_caches
# (1+2)
echo 3 > /proc/sys/vm/drop_caches