Date: Sun, 24 Oct 2004 23:58:48 GMT From: Tom Uffner <tom@uffner.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/73097: [sysutils/munin-node] cpu and vmstat plugins do not work on 6.0-Current (patch included) Message-ID: <200410242358.i9ONwm8b046991@www.freebsd.org> Resent-Message-ID: <200410250000.i9P00lth078557@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410242358.i9ONwm8b046991>