We can get all the memory related information by checking the file /proc/meminfo

linuxinternetworks Documents # cat /proc/meminfolinux, commands, tips and tricks

MemTotal: 2084476 kB
MemFree: 547388 kB
Buffers: 251472 kB
Cached: 872824 kB
SwapCached: 0 kB
Active: 691556 kB
Inactive: 749960 kB
Active(anon): 320000 kB
Inactive(anon): 6024 kB
Active(file): 371556 kB
Inactive(file): 743936 kB
Unevictable: 3208 kB
Mlocked: 3208 kB
HighTotal: 1208264 kB
HighFree: 6704 kB
LowTotal: 876212 kB
LowFree: 540684 kB
SwapTotal: 1998844 kB
SwapFree: 1998844 kB
Dirty: 128 kB
Writeback: 0 kB
AnonPages: 320444 kB
Mapped: 90224 kB
Shmem: 6724 kB
Slab: 66960 kB
SReclaimable: 56576 kB
SUnreclaim: 10384 kB
KernelStack: 2776 kB
PageTables: 5916 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3041080 kB
Committed_AS: 1801860 kB
VmallocTotal: 122880 kB
VmallocUsed: 7716 kB
VmallocChunk: 112900 kB
HardwareCorrupted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 12280 kB
DirectMap2M: 901120 kB

Also if you want to check the current RAM usage use the following command

free – Command is used to check the RAM usage and free memory

free -b –> display memory in bytes

free -k –>┬ádisplay memory in kilobytes

free -m –>┬ádisplay memory in megabytes

free -g –>┬ádisplay memory in gigabytes

For more information about RAM usage please check the free man pages.

Also you can use vmstat command to check the free memory of RAM

linuxinternetworks ~ # vmstat -S M

where unit size k:1000 K:1024 m:1000000 M:1048576 (default is K)

To check the disk information, use fdisk, its a partition table manipulator tool

linuxinternetworks ~ # fdisk -l

If you want to check the disk usage, free disk space, file system of the partition, file system type of the partition use the following command

linuxinternetworks ~ # df -hT

To check the disk usage of file(s)

linuxinternetworks ~ # du -sh <file_name>

Related articles


Subscribe Our Free Newsletter

Delivered by FeedBurner. We Respect Your Privacy

Tagged with:
 

Leave a Reply