1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Linux】メモリの使用状況を確認できるファイル

Last updated at Posted at 2021-12-15

Linuxでメモリの使用状況を確認できるファイルが、

/proc/meminfo

以下のコマンドで出力できる。

出力方法
# cat /proc/meminfo 
MemTotal:        5890844 kB
MemFree:         5223668 kB
MemAvailable:    5484588 kB
Buffers:            3164 kB
Cached:           463104 kB
SwapCached:            0 kB
Active:           268176 kB
Inactive:         264768 kB
Active(anon):       2144 kB
Inactive(anon):    73224 kB
Active(file):     266032 kB
Inactive(file):   191544 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       9433084 kB
SwapFree:        9433084 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         66732 kB
Mapped:            83204 kB
Shmem:              8692 kB
KReclaimable:      28256 kB
Slab:              50876 kB
SReclaimable:      28256 kB
SUnreclaim:        22620 kB
KernelStack:        2224 kB
PageTables:         6796 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12378504 kB
Committed_AS:     258340 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:              652 kB
HardwareCorrupted:     0 kB
AnonHugePages:     10240 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:       85952 kB
DirectMap2M:     6205440 kB 

・Memtotalがメモリの総容量
・MemFreeが空きメモリの容量
・MemAvailableがキャッシュを解放することで利用可能なメモリ量
各々意味は調べなければならない。

【使用環境】

・VirtualBox
・Red Hat Enterprise Linux 8.5 (Ootpa)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?