![如何读取 show-memory-usage SysRq 的输出?](https://linux22.com/image/65002/%E5%A6%82%E4%BD%95%E8%AF%BB%E5%8F%96%20show-memory-usage%20SysRq%20%E7%9A%84%E8%BE%93%E5%87%BA%EF%BC%9F.png)
我找不到任何有关读取 show-memory-usage SysRq (Alt+SysRq+m) 输出的(最近)文档。那么,人们可以从观察中学到什么呢?
以下是我的盒子(内核 3.9.5)的输出示例:
SysRq : Show Memory
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
DMA32 per-cpu:
CPU 0: hi: 186, btch: 31 usd: 13
CPU 1: hi: 186, btch: 31 usd: 46
active_anon:346766 inactive_anon:109 isolated_anon:0
active_file:1954 inactive_file:2465 isolated_file:0
unevictable:3794 dirty:8 writeback:0 unstable:0
free:6425 slab_reclaimable:2888 slab_unreclaimable:34070
mapped:3344 shmem:176 pagetables:67123 bounce:0
free_cma:0
DMA free:8916kB min:44kB low:52kB high:64kB active_anon:584kB inactive_anon:0kB active_file:144kB inactive_file:512kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15988kB managed:15904kB mlocked:0kB dirty:0kB writeback:0kB mapped:180kB shmem:0kB slab_reclaimable:24kB slab_unreclaimable:5084kB kernel_stack:8kB pagetables:148kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 1986 1986 1986
DMA32 free:16784kB min:5676kB low:7092kB high:8512kB active_anon:1386480kB inactive_anon:436kB active_file:7672kB inactive_file:9348kB unevictable:15176kB isolated(anon):0kB isolated(file):0kB present:2080320kB managed:2033884kB mlocked:15176kB dirty:32kB writeback:0kB mapped:13196kB shmem:704kB slab_reclaimable:11528kB slab_unreclaimable:131196kB kernel_stack:37960kB pagetables:268344kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 7*4kB (UM) 9*8kB (UM) 5*16kB (UM) 37*32kB (UEM) 16*64kB (UEM) 5*128kB (UEM) 7*256kB (M) 0*512kB 0*1024kB 0*2048kB 1*4096kB (R) = 8916kB
DMA32: 1124*4kB (EM) 500*8kB (UEMR) 64*16kB (UMR) 91*32kB (UEMR) 20*64kB (EMR) 16*128kB (UR) 4*256kB (UR) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 16784kB
6062 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
524175 pages RAM
11057 pages reserved
1364519 pages shared
488355 pages non-shared
我的笔记本电脑(具有更新的内核)还报告了有关某些“正常”内存的信息:
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 148
CPU 1: hi: 186, btch: 31 usd: 168
Normal free:471924kB min:33464kB low:41828kB high:50196kB active_anon:103096kB inactive_anon:34108kB active_file:155112kB inactive_file:165940kB unevictable:172kB isolated(anon):0kB isolated(file):0kB present:1048576kB managed:975852kB mlocked:172kB dirty:628kB writeback:0kB mapped:71088kB shmem:34284kB slab_reclaimable:20040kB slab_unreclaimable:6996kB kernel_stack:896kB pagetables:4728kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Normal: 729*4kB (UEMR) 2317*8kB (UEMR) 4016*16kB (UEMR) 1699*32kB (UEMR) 654*64kB (UEMR) 374*128kB (UEMR) 250*256kB (UEMR) 152*512kB (UEMR) 96*1024kB (EMR) 1*2048kB (R) 0*4096kB = 471980kB
并且有
0 pages HighMem/MovableOnly
而不是最后三行。