diff --git a/plugins/system/hugepages b/plugins/system/hugepages index 40d1b4e3..2fa56217 100755 --- a/plugins/system/hugepages +++ b/plugins/system/hugepages @@ -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 +# Copyright 2020-2022 Simon Josefsson # # 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 }