ACC Utilities Reference Guide

ZMLOG - Diagnostic Message Logging
ZCOM Diagnostic Message Logging Mechanism
Chapter 6164
Format of ZMLOG Messages
Usually, ZMLOG extracts and prints the error log messages generated by
the ZCOM subsystem. However a user application can be used in the
place of ZMLOG if specialized processing of the messages is required.
To replace ZMLOG with user supplied program it is necessary to
understand the format of the binary message buffer output from the
device file /dev/zmlog.
The binary buffer format read from device file /dev/zmlog is in the
following table.
Buffer block length is the total block length of the message read form
/dev/zmlog.
Buffer block length counts the number of messages that were generated
but not read by the program reading from /dev/zmlog. There is usually
room for up to 1000 messages in the internal LDM buffer so it is unusual
for messages to be lost.
When a program issues a read to the /dev/zmlog device file, the program
will block until a message is put in the LDM buffer. Once a message is
put into the buffer, the blocked read will returned. The program must
then process the message and then reread the device file.
The following table shows the format of each binary message record.
Note that the record is delimited by the record length at the start and
end of the record.
Buffer block
length (4
bytes)
Number
messages lost (4
bytes)
Message
record #1
Message
record # 2
...
Field Description Length in bytes
Binary record length 1
Driver time stamp 4
Originating program name 6
Severity code (from message
file)
1
Number of variables - n 1