lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 17:03:46 +0300
From:	Oleg <lego12239@...dex.ru>
To:	linux-kernel@...r.kernel.org
Subject: /proc/meminfo: relations of values

  Hi, all!

Google has many explanations of what each value mean, but nothing about
relations of values (the same for Documentation/filesystems/proc.txt).

For example, i have qemu vm with x86_64 kernel:

~# dd if=/dev/zero of=tmpdata bs=$((1024*1024)) count=10; sleep 1s; \
free; cat /proc/meminfo; grep Pss: /proc/*/smaps | awk '{s+=$2} END {print s}'
             total       used       free     shared    buffers     cached
Mem:        509728      64172     445556          0       2696      38848
-/+ buffers/cache:      22628     487100
Swap:            0          0          0
MemTotal:         509728 kB
MemFree:          445556 kB
Buffers:            2696 kB
Cached:            38848 kB
SwapCached:            0 kB
Active:            18708 kB
Inactive:          28108 kB
Active(anon):       5284 kB
Inactive(anon):       28 kB
Active(file):      13424 kB
Inactive(file):    28080 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                32 kB
Writeback:          7640 kB
AnonPages:          5292 kB
Mapped:             4232 kB
Shmem:                40 kB
Slab:               8384 kB
SReclaimable:       3232 kB
SUnreclaim:         5152 kB
KernelStack:         424 kB
PageTables:          472 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      254864 kB
Committed_AS:      56380 kB
VmallocTotal:   34359738367 kB
VmallocUsed:        2092 kB
VmallocChunk:   34359732272 kB
DirectMap4k:       10232 kB
DirectMap2M:      514048 kB
10070

If i understand correctly, 10070K is userspace size, but i don't know how can i
get this value from /proc/meminfo - AnonPages + ? ...
A part of 10070K are code segments; are they included in Cached value?
If not, then 22628K(used) - 100070K = 12558K - is this kernel memory?
Which values are compose it(Slab + ?...)?

The only relations i know are:

Active = Active(anon) + Active(file)
Inactive = Inactive(anon) + Inactive(file)
Slab = SReclaimable + SUnreclaim

Others are unknown. For example, i don't know how to get used value - 64172;
and why AnonPages is not equal nor Active(anon) nor Active(anon) + Inactive(anon)?

If anyone have the time for an answer, I will be grateful.

Thanks.

-- 
Неманов Олег (Nemanov Oleg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ