メモリ搭載量などを調べる (Linux)

提供:あわ自由帳

はじめに

自宅サーバー(CentOS7)で確認しました。

実行例

[root@host3 ~]# cat /proc/meminfo
MemTotal:        3809724 kB
MemFree:          693740 kB
MemAvailable:    2220508 kB
Buffers:               0 kB
Cached:          1833704 kB
SwapCached:         2568 kB
Active:          1099744 kB
Inactive:        1740332 kB
Active(anon):     585136 kB
Inactive(anon):   623508 kB
Active(file):     514608 kB
Inactive(file):  1116824 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8191932 kB
SwapFree:        8166520 kB
Dirty:                 4 kB
Writeback:             0 kB
AnonPages:       1003876 kB
Mapped:           200928 kB
Shmem:            202272 kB
Slab:             159704 kB
SReclaimable:     128544 kB
SUnreclaim:        31160 kB
KernelStack:        1440 kB
PageTables:        21952 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    10096792 kB
Committed_AS:    2192304 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      117636 kB
VmallocChunk:   34359610404 kB
HardwareCorrupted:     0 kB
AnonHugePages:    616448 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       44672 kB
DirectMap2M:     4075520 kB