mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
new plugin to monitor HugePages (or Large Pages) usage under Linux
This commit is contained in:
parent
580f586dbb
commit
f9000cdc7a
47
plugins/system/hugepages
Executable file
47
plugins/system/hugepages
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/gawk --exec
|
||||
BEGIN {
|
||||
if (ARGC > 1 && ARGV[1] == "config") {
|
||||
print "graph_args --base 1024 -l 0"
|
||||
print "graph_vlabel Bytes"
|
||||
print "graph_title HugePages usage"
|
||||
print "graph_category system"
|
||||
print "graph_info This graph shows the usage of the kernel Huge Pages."
|
||||
print "graph_order Total Rsvd Free Surp Anon"
|
||||
print "Total.label used"
|
||||
print "Total.draw AREA"
|
||||
print "Total.info In-use Huge Page Memory"
|
||||
print "Free.label free"
|
||||
print "Free.draw STACK"
|
||||
print "Free.info Unused Huge Page Memory."
|
||||
print "Rsvd.label reserved"
|
||||
print "Rsvd.draw STACK"
|
||||
print "Rsvd.info Huge Pages that have been reserved but are not used."
|
||||
print "Surp.label surplus"
|
||||
print "Surp.draw STACK"
|
||||
print "Surp.info Huge Pages that are in excess of the reserved amount, usually only greater than zero when the amount of Huge Pages is reduced while they are in use."
|
||||
print "Anon.label anonymous"
|
||||
print "Anon.draw STACK"
|
||||
print "Anon.info Huge Pages that are in use by the transparent Huge Page allocator khugepaged."
|
||||
CONF=1
|
||||
}
|
||||
ARGV[1] = "/proc/meminfo"
|
||||
ARGC = 2
|
||||
FS = "[: ]+"
|
||||
OFS = ""
|
||||
IGNORECASE = 1
|
||||
}
|
||||
|
||||
CONF == 1 {
|
||||
if (/Hugepagesize/) {
|
||||
print "Total.cdef Total,Free,-,1024,",$2,",*,*"
|
||||
print "Free.cdef Free,1024,",$2,",*,*,Rsvd,-"
|
||||
print "Rsvd.cdef Rsvd,1024,",$2,",*,*"
|
||||
print "Surp.cdef Surp,1024,",$2,",*,*"
|
||||
print "Anon.cdef Anon,1024,*"
|
||||
}
|
||||
}
|
||||
|
||||
(CONF != 1) {
|
||||
if (match($0,"(anon)?hugepages(_([^:]+))?[^i]",mats))
|
||||
print mats[1],mats[3],".value ",$2
|
||||
}
|
Loading…
Reference in New Issue
Block a user