ports/73097: [sysutils/munin-node] cpu and vmstat plugins do not work on 6.0-Current (patch included)
Tom Uffner
tom at uffner.com
Mon Oct 25 00:00:48 UTC 2004
>Number: 73097
>Category: ports
>Synopsis: [sysutils/munin-node] cpu and vmstat plugins do not work on 6.0-Current (patch included)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 25 00:00:47 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Tom Uffner
>Release: FreeBSD 6.0-CURRENT
>Organization:
Tom Uffner & Associates, Inc.
>Environment:
FreeBSD xiombarg.uffner.com 6.0-CURRENT FreeBSD 6.0-CURRENT #6: Fri Oct 22 18:48:27 EDT 2004 tom at xiombarg.uffner.com:/usr/obj/usr/src/sys/XIOMBARG i386
>Description:
cpu and vmstat plugins do not work on 6.0-Current. they are shell scripts that test for version == 4 or 5
>How-To-Repeat:
install munin-node on current
>Fix:
*** munin-1.0.2/node/node.d.freebsd/cpu.in.orig Sun May 9 15:18:35 2004
--- munin-1.0.2/node/node.d.freebsd/cpu.in Sun Oct 24 19:39:17 2004
***************
*** 59,69 ****
OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
if [ "$OSV" = "4" ]; then
STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f16 -d' '`
! elif [ "$OSV" = "5" ]; then
STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f13 -d' '`
fi
# PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'`
! SCALE=`echo 'scale=5;' $PERCENT/$STATUNITS | bc -q `
NCPU=`/sbin/sysctl -n hw.ncpu`
if [ "$scaleto100" = yes ]; then
PERCENT=100
--- 59,69 ----
OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
if [ "$OSV" = "4" ]; then
STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f16 -d' '`
! elif [ "$OSV" -ge "5" ]; then
STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f13 -d' '`
fi
# PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'`
! # SCALE=`echo 'scale=5;' $PERCENT/$STATUNITS | bc -q `
NCPU=`/sbin/sysctl -n hw.ncpu`
if [ "$scaleto100" = yes ]; then
PERCENT=100
*** munin-1.0.2/node/node.d.freebsd/vmstat.in.orig Sun Feb 1 13:59:54 2004
--- munin-1.0.2/node/node.d.freebsd/vmstat.in Sun Oct 24 19:40:42 2004
***************
*** 32,38 ****
OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
if [ "$1" = "autoconf" ]; then
! if [ "$OSV" = "5" ]; then
/sbin/sysctl -n vm.vmtotal 2>/dev/null >/dev/null
RESULT=$?
NAME=/sbin/sysctl
--- 32,38 ----
OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
if [ "$1" = "autoconf" ]; then
! if [ "$OSV" -ge "5" ]; then
/sbin/sysctl -n vm.vmtotal 2>/dev/null >/dev/null
RESULT=$?
NAME=/sbin/sysctl
***************
*** 59,65 ****
echo 'graph_title VMstat'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel process states'
! if [ "$OSV" = "5" ]; then
echo 'running.label running'
echo 'running.type GAUGE'
echo 'diskwait.label diskwait'
--- 59,65 ----
echo 'graph_title VMstat'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel process states'
! if [ "$OSV" -ge "5" ]; then
echo 'running.label running'
echo 'running.type GAUGE'
echo 'diskwait.label diskwait'
***************
*** 77,83 ****
exit 0
fi
! if [ "$OSV" = "5" ]; then
sysctl -n vm.vmtotal | awk '
/^Processes:/ {
print "running.value", $3;
--- 77,83 ----
exit 0
fi
! if [ "$OSV" -ge "5" ]; then
sysctl -n vm.vmtotal | awk '
/^Processes:/ {
print "running.value", $3;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list