BroadView™ API Guide and Reference Manual
Checking the logs

The default logging implementation for the Agent uses syslog. However, it may be desirable to integrate the logging into an existing logging mechanism.

There is a single function log_post() that needs to be re-implemented as per the desired needs. The function prototype is as follows.

void log_post(BVIEW_SEVERITY severity, char * format, ...);

The enumeration BVIEW_SEVERITY indicates the syslog-like severity level for the messaged being logged. This is presented below.

Log.jpg

Both the agent (BroadViewAgent) and the reference application (BroadViewBstApp and BroadViewPacketTraceApp) log all messages to syslog. These logs are available at /var/log/messages and can be checked using any editor. A sample log is shown below:

logs_check_1.jpg

The BroadViewBstApp logs response data from agent to the file /tmp/bstapp_communication.log. Each time BroadViewBstApp starts, the file /tmp/bstapp_communication.log is overwritten.

A sample text from the file is shown below:

logs_check_2.jpg

Note: If local syslog server is not available (e.g. BL2.0) then the log messages from agent are written to a log file in /var/log/agent_log_latest. The maximum limit of agent_log_latest is defined as 1 MB. If the size of the file exceeds its defined limit then the file is backed up as /var/log/agent_log_latest.bkp and latest log is written to new file /var/log/agent_log_latest. Any existing /var/log/agent_log_latest.bkp is removed while creating /var/log/agent_log_latest.bkp file.

The BroadViewPacketTraceApp logs response data from agent to the file /tmp/ptapp_communication_new.log. Each time BroadViewPackeTraceApp starts, the file /tmp/ptapp_communication_new.log is overwritten. There is a file size limit of 10KB exceeding which the file is renamed as /tmp/ptapp_communication_old.log and recent communications are written to /tmp/ptapp_communication_new.log. A sample text from the file is shown below:

logs_check_3.jpg

The BroadViewBstApp carries out the following tasks.

Reads the configuration file.
Enables BST feature on Agent.
Read BST feature configuration from Agent
Configure BST tracking
Read BST tracking configuration from Agent
Send command to read BST report
Send command to clear statistics
Configure BST threshold
Send command to clean BST threshold
Send command to Agent for periodic asynchronous report

The BroadViewPacketTraceApp carries out the following tasks.

Reads the configuration file.
Configures Packet Trace feature
Gets the Trace Profile for given packet
Gets the LAG-ECMP Profile for given packet
Cancels Packet Trace Profile request