Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux total memory

# show memory usage in megabytes
$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3788        1955         241         190        1592        1594
Swap:             0           0           0

# access memory raw data
$ cat /proc/meminfo
MemTotal:        3879924 kB
MemFree:          247836 kB
MemAvailable:    1633344 kB
Buffers:            3108 kB
Cached:          1567648 kB
SwapCached:            0 kB
Active:          2850928 kB
Inactive:         579040 kB
Active(anon):    1954152 kB
Inactive(anon):   100056 kB
Active(file):     896776 kB
Inactive(file):   478984 kB
...
 
PREVIOUS NEXT
Tagged: #linux #total #memory
ADD COMMENT
Topic
Name
6+3 =