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 BigBrother has never changed, not ever under Solaris 10. Therefore, I've created this simple manifest in order to bring the start/shutdown of BigBrother into the 21st century :-)
How to configure BigBrother service manifest under Solaris 10?
Create a service directory for the monitoring application
# 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 above, the user and group for running BigBrother are bigbro/bigbro, and I have it installed under /export/home/bigbro/, so 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 documentthen try running the following
xmllint for more detailed error messages::
# xmllint /var/svc/manifest/application/monitoring/bigbrother.xml
Then 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