From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Oct 25 00:00:48 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09AEA16A4CF for ; Mon, 25 Oct 2004 00:00:48 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC16C43D4C for ; Mon, 25 Oct 2004 00:00:47 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i9P00lY7078571 for ; Mon, 25 Oct 2004 00:00:47 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9P00lth078557; Mon, 25 Oct 2004 00:00:47 GMT (envelope-from gnats) Resent-Date: Mon, 25 Oct 2004 00:00:47 GMT Resent-Message-Id: <200410250000.i9P00lth078557@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tom Uffner Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7283516A4CE for ; Sun, 24 Oct 2004 23:58:49 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A7A343D48 for ; Sun, 24 Oct 2004 23:58:49 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9ONwnq2046992 for ; Sun, 24 Oct 2004 23:58:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i9ONwm8b046991; Sun, 24 Oct 2004 23:58:48 GMT (envelope-from nobody) Message-Id: <200410242358.i9ONwm8b046991@www.freebsd.org> Date: Sun, 24 Oct 2004 23:58:48 GMT From: Tom Uffner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/73097: [sysutils/munin-node] cpu and vmstat plugins do not work on 6.0-Current (patch included) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 00:00:48 -0000 >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: