Оживший юзерпик (tobotras) wrote,
Оживший юзерпик
tobotras

Линуксоидное

СЯУ, как посмотреть фрагаментацию памяти с точки зрения ядра:

echo 1 | sudo dd of=/proc/sys/kernel/sysrq
echo m | sudo dd of=/proc/sysrq-trigger

И читать хвост сислога:

Nov 29 15:43:25 bt-note kernel: [187781.943840] sysrq: Show Memory
Nov 29 15:43:25 bt-note kernel: [187781.943847] Mem-Info:
Nov 29 15:43:25 bt-note kernel: [187781.943856] active_anon:799580 inactive_anon:233898 isolated_anon:0
Nov 29 15:43:25 bt-note kernel: [187781.943856]  active_file:80756 inactive_file:71888 isolated_file:0
Nov 29 15:43:25 bt-note kernel: [187781.943856]  unevictable:24528 dirty:68 writeback:0 unstable:0
Nov 29 15:43:25 bt-note kernel: [187781.943856]  slab_reclaimable:22144 slab_unreclaimable:47230
Nov 29 15:43:25 bt-note kernel: [187781.943856]  mapped:726714 shmem:121252 pagetables:11568 bounce:0
Nov 29 15:43:25 bt-note kernel: [187781.943856]  free:91409 free_pcp:4011 free_cma:0
Nov 29 15:43:25 bt-note kernel: [187781.943864] Node 0 active_anon:3198320kB inactive_anon:935592kB active_file:323024kB inactive_file:287552kB unevictable:98112kB isolated(anon):0kB isolated(file):0kB mapped:29
06856kB dirty:272kB writeback:0kB shmem:485008kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
Nov 29 15:43:25 bt-note kernel: [187781.943866] Node 0 DMA free:15892kB min:136kB low:168kB high:200kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present
:15980kB managed:15892kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
Nov 29 15:43:25 bt-note kernel: [187781.943874] lowmem_reserve[]: 0 1126 7650 7650 7650
Nov 29 15:43:25 bt-note kernel: [187781.943880] Node 0 DMA32 free:200796kB min:9932kB low:12412kB high:14892kB active_anon:625108kB inactive_anon:101336kB active_file:34676kB inactive_file:34304kB unevictable:28
036kB writepending:0kB present:1270628kB managed:1204508kB mlocked:0kB kernel_stack:560kB pagetables:4384kB bounce:0kB free_pcp:8336kB local_pcp:648kB free_cma:0kB
Nov 29 15:43:25 bt-note kernel: [187781.943888] lowmem_reserve[]: 0 0 6523 6523 6523
Nov 29 15:43:25 bt-note kernel: [187781.943892] Node 0 Normal free:148948kB min:57512kB low:71888kB high:86264kB active_anon:2573212kB inactive_anon:834256kB active_file:288348kB inactive_file:253248kB unevictab
le:70076kB writepending:272kB present:6856704kB managed:6688204kB mlocked:48kB kernel_stack:19712kB pagetables:41888kB bounce:0kB free_pcp:7708kB local_pcp:320kB free_cma:0kB
Nov 29 15:43:25 bt-note kernel: [187781.943899] lowmem_reserve[]: 0 0 0 0 0
Nov 29 15:43:25 bt-note kernel: [187781.943903] Node 0 DMA: 3*4kB (U) 3*8kB (U) 3*16kB (U) 2*32kB (U) 2*64kB (U) 2*128kB (U) 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15892kB
Nov 29 15:43:25 bt-note kernel: [187781.943920] Node 0 DMA32: 11551*4kB (UME) 9428*8kB (UME) 4068*16kB (UME) 414*32kB (UME) 13*64kB (UME) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 200796kB
Nov 29 15:43:25 bt-note kernel: [187781.943933] Node 0 Normal: 4528*4kB (UME) 7538*8kB (UMEH) 2330*16kB (UMEH) 590*32kB (UME) 155*64kB (UMEH) 22*128kB (UMH) 1*256kB (H) 1*512kB (H) 1*1024kB (H) 0*2048kB 0*4096kB
 = 149104kB
Nov 29 15:43:25 bt-note kernel: [187781.943951] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Nov 29 15:43:25 bt-note kernel: [187781.943954] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Nov 29 15:43:25 bt-note kernel: [187781.943956] 283482 total pagecache pages
Nov 29 15:43:25 bt-note kernel: [187781.943959] 9586 pages in swap cache
Nov 29 15:43:25 bt-note kernel: [187781.943961] Swap cache stats: add 27028892, delete 27006293, find 21806292/23982592
Nov 29 15:43:25 bt-note kernel: [187781.943963] Free swap  = 120420kB
Nov 29 15:43:25 bt-note kernel: [187781.943964] Total swap = 999420kB
Nov 29 15:43:25 bt-note kernel: [187781.943966] 2035828 pages RAM
Nov 29 15:43:25 bt-note kernel: [187781.943967] 0 pages HighMem/MovableOnly
Nov 29 15:43:25 bt-note kernel: [187781.943968] 58677 pages reserved
Nov 29 15:43:25 bt-note kernel: [187781.943970] 0 pages cma reserved
Nov 29 15:43:25 bt-note kernel: [187781.943971] 0 pages hwpoisoned

This entry was originally posted at https://tobotras.dreamwidth.org/714266.html. Please comment there using OpenID.
Tags: рабочее, юниксовое
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 23 comments