Creating a service manifest for BigBrother under Solaris

BigBrother (www.bb4.org/features.html) is designed to let anyone see how their network is doing in near real-time, from any web browser, anywhere. It's been around a long time {I first came across it whilst working at ESOC/ESA in Germany back in 1994 and we found it useful then}

The only shortfall has been that the method to start/stop bigbro has never changed, not ever with Solaris 10, therefore I've created this simple manifest in order to bring the start/shutdown of bigbro into the 21st century :-)

Create a service directory for the monitoring application

How to configure BigBrother service manifest under Solaris 10

# mkdir /var/svc/manifest/application/monitoring
# cd /var/svc/manifest/application/monitoring

Create the contents of the bigbrother manifest (bigbrother.xml)

<?xml version='1.0'?>
< !DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
< !-- bigbrother.xml : BigBrother manifest, Martin Churchill 2006-06-01 -->
<service_bundle type='manifest' name='bigbrother'>
< service name='application/monitoring/bigbrother' type='service' version='1'>
<single_instance />
<dependency name='multi-user-server' grouping='require_any' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/multi-user-server:default' />
</dependency>
<exec_method type='method' name='start' exec='/export/home/bigbro/bbc/runbb.sh start' timeout_seconds='120' >
<method_context>
<method_credential user='bigbro' group='bigbro' />
</method_context>
</exec_method>
<exec_method type='method' name='stop' exec='/export/home/bigbro/bbc/runbb.sh stop' timeout_seconds='120' >
<method_context>
<method_credential user='bigbro' group='bigbro' />
</method_context>
</exec_method>
<instance name='default' enabled='false' />
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>Big Brother</loctext>
</common_name>
</template>
</service>
< /service_bundle>

In the example able, my user and group for running bigbrother is bigbro/bigbro, and I have it installed under /export/home/bigbro/..., to you may want to change the manifest file to suite your needs.

Next we need validate the manifest

# svccfg validate /var/svc/manifest/application/monitoring/bigbrother.xml

This validates the syntax of the xml file. If it returns the message: “svccfg: couldn’t parse document”, then try running: xmllint /var/svc/manifest/application/monitoring/bigbrother.xml for more detailed error messages).

And finally all we need to do is import and enable the service

# svccfg import /var/svc/manifest/application/monitoring/bigbrother.xml
# svcadm enable svc:/application/monitoring/bigbrother:default