ablog

不器用で落着きのない技術者のメモ

プロセス別の PTE は /proc/[pid]/status の VmPTE で確認できる

$ cat /proc/1741/status
Name:   bash
State:  S (sleeping)
Tgid:   1741
Pid:    1741
PPid:   1740
TracerPid:      0
Uid:    1200    1200    1200    1200
Gid:    54321   54321   54321   54321
FDSize: 256
Groups: 54321 54322 54323 54324 54325 54326 54327 
VmPeak:   108516 kB
VmSize:   108516 kB
VmLck:         0 kB
VmHWM:      1968 kB
VmRSS:      1968 kB
VmData:      468 kB
VmStk:       136 kB
VmExe:       848 kB
VmLib:      1876 kB
VmPTE:        72 kB ★
VmSwap:        0 kB
Threads:        1
SigQ:   0/47806
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000384004
SigCgt: 000000004b813efb
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: ffffffffffffffff
Cpus_allowed:   f
Cpus_allowed_list:      0-3
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        97
nonvoluntary_ctxt_switches:     34

1年前に自分で書いてた。。。
Linux のページテーブルのサイズの見方と見積式 - ablog