LMLPHP后院

查看Linux系统虚拟内存状态

原文链接 : http://blog.lmlphp.com/tutorial/1/SHELL/item/1/View_Linux_system_virtual_memory_status  来自 : LMLPHP后院

通过 /proc/meminfo 文件来观察 Linux 系统的虚拟内存状态。如下示例:

$ cat /proc/meminfo
MemTotal:        1020620 kB
MemFree:          142124 kB
MemAvailable:     318752 kB
Buffers:           63488 kB
Cached:           211436 kB
SwapCached:        23368 kB
Active:           419596 kB
Inactive:         322428 kB
Active(anon):     223088 kB
Inactive(anon):   249092 kB
Active(file):     196508 kB
Inactive(file):    73336 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1047548 kB
SwapFree:         611016 kB
Dirty:                32 kB
Writeback:             0 kB
AnonPages:        461644 kB
Mapped:            97868 kB
Shmem:              5080 kB
Slab:              88608 kB
SReclaimable:      69124 kB
SUnreclaim:        19484 kB
KernelStack:        6016 kB
PageTables:        27504 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1557856 kB
Committed_AS:    3616652 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:    339968 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       91516 kB
DirectMap2M:      956416 kB

使用 ipcs 查看共享内存,如下示例:

$ ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 196608     may        600        524288     2          dest
LMLPHP,可爱滴WEB开发框架

2017-11-19 05:40:31 1511041231 0.003938