ports/94610: rc.d file for mbmon daemon
Douglas K. Rand
rand at meridian-enviro.com
Fri Mar 17 16:10:21 UTC 2006
>Number: 94610
>Category: ports
>Synopsis: rc.d file for mbmon daemon
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 17 16:10:19 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Douglas K. Rand
>Release: FreeBSD 6.1-PRERELEASE i386
>Organization:
Meridian Environmental Technology, Inc.
>Environment:
System: FreeBSD athearn.meridian-enviro.com 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #3: Fri Mar 17 09:39:23 CST 2006 rand at athearn.meridian-enviro.com:/usr/obj/usr/src/sys/KATO i386
>Description:
We run mbmon as a daemon on all our systems. Well, those that mbmon
can extract data from at least. :)
Here's a rc.d script that starts mbmon in its daemon mode where it
listens on a TCP port and emits the current measurements on a connect.
>How-To-Repeat:
Want mbmon daemon on all your systems, have to write your own starup script.
>Fix:
Here's the rc.d mbmon script that we use. You can configure the port that
mbmon listens on by turning the mbmon_port knob. You can configure how
mbmon finds the hardware monitors with the mbmon_fags knob. And mbmon_enable
enables the daemon. I guess at the REQUIRE and BEFORE fields.
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mbmon
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: FreeBSD shutdown
# Add the following line to /etc/rc.conf to enable mbmon daemon:
#
# mbmon_enable="YES"
#
# See mbmon(1) for mbmon_flags
# Set mbmon_port to TCP port to listen to, default is 12999
#
. "/etc/rc.subr"
name="mbmon"
rcvar=`set_rcvar`
# read configuration and set defaults
load_rc_config "$name"
: ${mbmon_enable="NO"}
: ${mbmon_flags=""}
: ${mbmon_port="12999"}
command="/usr/local/bin/${name}"
command_args="-P ${mbmon_port}"
run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list