Bug 210494

Summary: [patch] sysutils/munin-node: Fix swap accounting if there are multiple devices
Product: Ports & Packages Reporter: Fabian Keil <fk>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch
Priority: --- Flags: bugzilla: maintainer-feedback? (mat)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
sysutils/munin-node: Fix swap accounting if there are multiple devices none

Description Fabian Keil 2016-06-23 14:05:37 UTC
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
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2016-06-23 14:19:08 UTC
Have you reported that problem upstream ? If no, please do.
Comment 2 Fabian Keil 2016-06-23 17:55:03 UTC
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
repository criteria:
https://www.gnu.org/software/repo-criteria-evaluation.html

Therefore I did not report this issue upstream.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-08-04 14:27:04 UTC
A commit references this bug:

Author: mat
Date: Thu Aug  4 14:26:56 UTC 2016
New revision: 419615
URL: https://svnweb.freebsd.org/changeset/ports/419615

Log:
  Fix swap accounting if there are multiple devices [1]
  Add a few zfs related plugins [2]

  PR:		210494 [1]
  Submitted by:	bcr [2]
  Reported by:	Fabian Keil [1]
  Sponsored by:	Absolight

Changes:
  head/sysutils/munin-common/files/patch-plugins_node.d.freebsd_memory.in
  head/sysutils/munin-node/Makefile
  head/sysutils/munin-node/plugins/
  head/sysutils/munin-node/plugins/zfs_compress
  head/sysutils/munin-node/plugins/zpool_chksum
  head/sysutils/munin-node/plugins/zpool_dedup