Created attachment 171714 [details]
sysutils/munin-node: Fix swap accounting if there are multiple devices
If there's more than one swap device, swapinfo adds the totals
in the last line:
[fk@elektrobier ~]$ swapinfo -k
Device 1K-blocks Used Avail Capacity
/dev/gpt/swap-ada0.eli 4194304 1775064 2419240 42%
/dev/gpt/swap-ada1.eli 4194304 1714180 2480124 41%
/dev/gpt/swap-ada3.eli 4194304 1012152 3182152 24%
/dev/gpt/swap-ada2.eli 4194304 1012636 3181668 24%
Total 16777216 5514032 11263184 33%
munin's memory plugin currently simply adds the columns
and therefore reports inflated values.
The attached patch fixes this by letting the memory plugin
filter out the "Total" line before adding the columns.
Obtained from: ElectroBSD
Have you reported that problem upstream ? If no, please do.
Unless I missed something, upstream only accepts patches
and problem reports through GitHub.
I don't have a GitHub account and don't intend to get one
until it gets a C or better according to the GNU ethical
Therefore I did not report this issue upstream.
A commit references this bug:
Date: Thu Aug 4 14:26:56 UTC 2016
New revision: 419615
Fix swap accounting if there are multiple devices 
Add a few zfs related plugins 
PR: 210494 
Submitted by: bcr 
Reported by: Fabian Keil 
Sponsored by: Absolight