Support shmem & file hugepages statistics.
Also fixes doc typo for /proc path. Also downcase Anon.label for consistency with other labels.
This commit is contained in:
parent
2f14a9b31e
commit
4f22f27347
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This plugin monitors the usage of the Linux kernel HugePages, on some
|
||||
# architectures also called Large Pages. It will show both pre-reserved
|
||||
# pages (via /prc/sys/vm/nr_hugepages), their usage and reserved size, as
|
||||
# pages (via /proc/sys/vm/nr_hugepages), their usage and reserved size, as
|
||||
# well as HugePages allocated by the khugepaged (activated by the
|
||||
# transparent_hugepages kernel command line parameter). All values are
|
||||
# shown in (KiBi/MeBi/GiBi)Bytes.
|
||||
|
@ -18,6 +18,7 @@
|
|||
#
|
||||
# --
|
||||
# Copyright 2012 Stefan Seidel <munin@stefanseidel.info>
|
||||
# Copyright 2020-2022 Simon Josefsson <simon@josefsson.org>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -55,9 +56,15 @@ BEGIN {
|
|||
print "Surp.label surplus"
|
||||
print "Surp.draw STACK"
|
||||
print "Surp.info Number of hugepages > nr_hugepages, as decided by nr_overcommit_hugepages or when the amount of Huge Pages is reduced while they are in use."
|
||||
print "Anon.label Transparent"
|
||||
print "Anon.label transparent"
|
||||
print "Anon.draw STACK"
|
||||
print "Anon.info Huge Pages that are in use by the transparent Huge Page allocator khugepaged."
|
||||
print "Shmem.label shmem"
|
||||
print "Shmem.draw STACK"
|
||||
print "Shmem.info Memory used by shared memory (shmem) and tmpfs(5) allocated with huge pages."
|
||||
print "File.label file"
|
||||
print "File.draw STACK"
|
||||
print "File.info Memory used for filesystem data (page cache) allocated with huge pages."
|
||||
CONF=1
|
||||
}
|
||||
if (ARGC > 1 && ARGV[1] == "autoconf") {
|
||||
|
@ -88,6 +95,6 @@ CONF == 2 {
|
|||
}
|
||||
|
||||
(CONF != 1 && CONF != 2) {
|
||||
if (match($0,"(anon)?hugepages(_([^:]+))?[^i]",mats))
|
||||
if (match($0,"(anon|shmem|file)?hugepages(_([^:]+))?[^i]",mats))
|
||||
print mats[1],mats[3],".value ",$2
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue