The BLACKBOX feature provides an enhanced means for tracing and can be configured into or out of the system independently of the LOG feature.
The black box feature relies on multiple in-memory circular buffers that are managed by the system. One circular buffer is active at any time, which means that traces are added sequentially to that buffer. The buffer then wraps around when full. A buffer can be frozen through an explicit request indicating to the system which other buffer will be activated next. Records can be read from a frozen black box. Filtering control routines enables black box records to be discarded without the producer of such traces knowing about this filtering. Black box buffers are always part of the system dump in the case of a node failure leading to a dump.
The ChorusOS black box feature closely resembles the black box feature of the the Solaris operating environment.
For details, see BLACKBOX(5FEA).
The black box API common with the Solaris operating environment is summarized in the following table:
Function |
Description |
---|---|
bb_event() |
Write a record in the current black box |
bb_freeze() |
Freeze the current black box |
bb_list() |
Get the list and status of system black boxes |
bb_open() |
Open a frozen black box |
bb_read() |
Read the content of an open black box |
bb_close() |
Close an open black box |
bb_release() |
Unfreeze a frozen black box |
bb_getfilters() |
Retrieve current filters |
bb_setfilters() |
Set filters |
bb_getseverity() |
Retrieve severity level filter |
bb_setseverity() |
Set severity level filter |
bb_getprodids() |
Retrieve producer ID filter list |
bb_setprodids() |
Set producer ID filter list |
The ChorusOS microkernel-specific API for BLACKBOX is as follows:
Function |
Description |
---|---|
bbEvent() |
Adds an event to the black box |
bbFreeze() |
Freezes the currently active black box and directs all future events to another black box |
bbRelease() |
Frees up a frozen black box |
bbSeverity() |
Gets and/or sets the global severity bitmap for the node |
bbGetNbb() |
Gets the number of black boxes configured on the node |
bbList() |
Gives information about the set of black boxes on the node |
bbFilters() |
Gets and/or sets the filter list and the filtered severity bitmap for the node |
bbProdids() |
Gets and/or sets the list of producers that have been registered to use the filter list and the filtered severity bitmap on this node |
bbOpen() |
Obtains access to a frozen black box |
bbClose() |
Releases access to a frozen black box |
bbReset() |
Resets a frozen black box |
bbName() |
Gets and/or sets the symbolic name of a persistent store used to hold the given black box |