The combo message enables Big Brother to send more than one status message at a time. This can be useful if an external script has to send a lot of status messages (for example, if it is doing some network tests against all hosts). There are three steps to using a combo message in an external script:
Before you can start using the combo message in your script, you must initialize its processing; add these lines at the beginning of your script:
BBCOMBOID="$$"
export BBCOMBOID
$BBHOME/bin/bb-combo.sh
start
The BBCOMBOID variable acts as a unique tag for a particular run of your script. This is needed because many scripts might be executing at the same time.
Instead of calling $BBHOME/bin/bb to send each status message to a BBDISPLAY server, you use a bb-combo.sh call:
$BBHOME/bin/bb-combo.sh add "status $MACHINE.cpu $COLOR `date` DATA..."
This builds a combo message. When the message reaches the MAXLINE size then the message is sent to the BBDISPLAY(s) and a new message is started.
Note. Only green status reports are saved in a combo message. All non-green statuses are sent immediately.
The script may need to send a partial combo message to a BBDISPLAY(s) when it is done. At the end of your script, add this line:
$BBHOME/bin/bb-combo.sh end
This will also remove temporary files that were used.
You can find sample uses of combo messages in the bb-local.sh and bb-network.sh scripts.