Add files forgoten with the last commit.

This commit is contained in:
Sergey Matveychuk 2004-12-14 01:44:54 +00:00
parent d1fe1cbc7c
commit 738dbaa8ab
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123976
4 changed files with 84 additions and 0 deletions

View file

@ -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"

View file

@ -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

View file

@ -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;

View file

@ -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
********************************************************************