aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-node
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2004-12-14 01:44:54 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2004-12-14 01:44:54 +0000
commit738dbaa8abdbb501014f6879255f2eebf3aac18d (patch)
treedab03ce9630e24ad79847929798a9f9981b722b4 /sysutils/munin-node
parentd1fe1cbc7c11aea833498ee115fe885fad59b5ba (diff)
downloadports-738dbaa8abdbb501014f6879255f2eebf3aac18d.tar.gz
ports-738dbaa8abdbb501014f6879255f2eebf3aac18d.zip
Notes
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r--sysutils/munin-node/files/munin_node.sh28
-rw-r--r--sysutils/munin-node/files/patch-cpu.in15
-rw-r--r--sysutils/munin-node/files/patch-vmstat.in29
-rw-r--r--sysutils/munin-node/files/pkg-message.412
4 files changed, 84 insertions, 0 deletions
diff --git a/sysutils/munin-node/files/munin_node.sh b/sysutils/munin-node/files/munin_node.sh
new file mode 100644
index 000000000000..1a174ec64c14
--- /dev/null
+++ b/sysutils/munin-node/files/munin_node.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+
+# PROVIDE: munin-node
+# REQUIRE: DAEMON
+# BEFORE: cron
+# KEYWORD: FreeBSD
+
+#
+# Add the following lines to /etc/rc.conf to enable munin-node:
+# munin_node_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable munin-node
+# munin_node_config (path): Set to "%PREFIX%/etc/munin/munin-node.conf" by default.
+#
+
+. /etc/rc.subr
+
+name="munin_node"
+rcvar=`set_rcvar`
+
+[ -z "$munin_node_enable" ] && munin_node_enable="NO"
+[ -z "$munin_node_config" ] && munin_node_config="/usr/local/etc/munin/munin-node.conf"
+
+command="/usr/local/sbin/munin-node"
+pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config`
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/munin-node/files/patch-cpu.in b/sysutils/munin-node/files/patch-cpu.in
new file mode 100644
index 000000000000..4dbe91a6bf79
--- /dev/null
+++ b/sysutils/munin-node/files/patch-cpu.in
@@ -0,0 +1,15 @@
+--- munin-1.0.4.orig/node/node.d.freebsd/cpu.in Sun May 9 21:18:35 2004
++++ munin-1.0.4/node/node.d.freebsd/cpu.in Sat Nov 20 15:32:50 2004
+@@ -59,10 +59,10 @@
+ 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
++ 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}'`
++ 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
diff --git a/sysutils/munin-node/files/patch-vmstat.in b/sysutils/munin-node/files/patch-vmstat.in
new file mode 100644
index 000000000000..8aa3288e8b10
--- /dev/null
+++ b/sysutils/munin-node/files/patch-vmstat.in
@@ -0,0 +1,29 @@
+--- munin-1.0.4.orig/node/node.d.freebsd/vmstat.in Sun Feb 1 19:59:54 2004
++++ munin-1.0.4/node/node.d.freebsd/vmstat.in Sat Nov 20 14:14:54 2004
+@@ -32,7 +32,7 @@
+ OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
+
+ if [ "$1" = "autoconf" ]; then
+- if [ "$OSV" = "5" ]; then
++ if [ "$OSV" -ge "5" ]; then
+ /sbin/sysctl -n vm.vmtotal 2>/dev/null >/dev/null
+ RESULT=$?
+ NAME=/sbin/sysctl
+@@ -59,7 +59,7 @@
+ echo 'graph_title VMstat'
+ echo 'graph_args --base 1000 -l 0'
+ echo 'graph_vlabel process states'
+- if [ "$OSV" = "5" ]; then
++ if [ "$OSV" -ge "5" ]; then
+ echo 'running.label running'
+ echo 'running.type GAUGE'
+ echo 'diskwait.label diskwait'
+@@ -77,7 +77,7 @@
+ exit 0
+ fi
+
+-if [ "$OSV" = "5" ]; then
++if [ "$OSV" -ge "5" ]; then
+ sysctl -n vm.vmtotal | awk '
+ /^Processes:/ {
+ print "running.value", $3;
diff --git a/sysutils/munin-node/files/pkg-message.4 b/sysutils/munin-node/files/pkg-message.4
new file mode 100644
index 000000000000..206a44057599
--- /dev/null
+++ b/sysutils/munin-node/files/pkg-message.4
@@ -0,0 +1,12 @@
+
+********************************************************************
+Unless this file already existed, a sample configuration file
+has been placed in %%PREFIX%%/etc/munin/munin-node.conf.
+
+Please edit it according to your needs.
+
+The Munin client will be started at system boot automatically.
+You can start it manually with:
+ %%PREFIX%%/etc/rc.d/munin-node.sh start
+********************************************************************
+