Safety Black Box (SBB)
The Safety Black Box (SBB) is the audit trail of Safety Core. Components write their errors,
fault decisions and safety-event traces to it, for compliance auditing and post-incident
analysis. SBB is a small library, libnvpsb.so, that writes each record to the Linux syslog.
Who writes to SBB
The client library that event sources use to talk to the SEI daemon also writes its errors
through SBB. In SAIM and PCM, which do not set a tag, those lines carry the program name. SAIM,
PCM, the reference SDMs, the command receivers and fsicom-agent write their own logs to
standard output, standard error or a log file instead; see their component pages.
Record format
Each record is one syslog message with facility LOG_USER, the tag above and the process ID:
Timestampis the local wall-clock time with microseconds.Endpointnames the component role:NVPSB_PSS_DAEMONfor the SEI daemon,NVPSB_PSD_CLIENTfor the gateway,NVPSB_PSS_SOURCEfor the MDX client.- The message and its detail are joined with no separator, for example
registration refusedreason=table_full, peer=3. - The syslog priority is the record’s level, from
EMERGtoDEBUG.EMERGandALERTare reserved for the SEI daemon; any other component’s record at those levels is written atCRIT. SBB itself does not filter by level.
The fields of each audit record are listed in Causes and records.
Where the records land
- On a host, the package installs the rule and an empty
/var/log/psf/pss.log(mode0666), but does not restart rsyslog. Restart rsyslog after installing the package so that the rule takes effect. - On a host, the SBB records and the process output of the same component are in two files:
pss.logandpsf.log. Read both when you investigate a fault. - Transport diagnostics, such as a refused peer GID or a socket-buffer shortfall, are written to standard error, not to SBB.
- Where each component’s own log lands is listed in Troubleshooting.
Library interface
libnvpsb.so has three functions:
The endpoint roles are NVPSB_PSS_SOURCE, NVPSB_PSS_SINK, NVPSB_PSS_DAEMON,
NVPSB_PSD_CLIENT and NVPSB_SDM_CLIENT. The functions return an NvPSBErr
(NVPSB_SUCCESS, NVPSB_FAIL, NVPSB_NO_RSP or NVPSB_UNINITIALIZED); the levels are the
syslog severities, NVPSB_LOG_EMERG to NVPSB_LOG_DEBUG. The SBB header is not part of the
development package, so the library is for Safety Core components; a custom component can write
to syslog directly.