Bug 210494 - [patch] sysutils/munin-node: Fix swap accounting if there are multiple devices
Summary: [patch] sysutils/munin-node: Fix swap accounting if there are multiple devices
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-23 14:05 UTC by Fabian Keil
Modified: 2016-08-04 14:48 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
sysutils/munin-node: Fix swap accounting if there are multiple devices (1.97 KB, patch)
2016-06-23 14:05 UTC, Fabian Keil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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