Date: Fri, 17 Mar 2006 10:07:45 -0600 (CST) From: "Douglas K. Rand" <rand@meridian-enviro.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: kaz@kobe1995.net Subject: ports/94610: rc.d file for mbmon daemon Message-ID: <200603171607.k2HG7jkZ000957@athearn.meridian-enviro.com> Resent-Message-ID: <200603171610.k2HGAKx9030481@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603171607.k2HG7jkZ000957>