Print messages from the system log


sloginfo [-chtw] [-m major[:minor]] [-s num] [filename]

Runs on:

QNX Neutrino


Clear the log buffer after displaying all waiting events.
Print unformatted entries in hexadecimal. By default, they're printed in decimal.
-m major[:minor]
Display only the events with the given major code and (optionally) minor code. The default is to display all events.
-s num
Display events whose severity is in the range from 0 through num. Level 0 is the most severe, and level 7 is the least.
Print time for events with millisecond resolution.
Wait for more events to arrive.
The name of the file containing raw events (default: /dev/slog).


The sloginfo utility prints the contents of the system log buffer managed by slogger, which must be running to record these messages.

By default, sloginfo prints all messages and exits. You can use the -w option to have it wait for more messages.

You can use the -m and -s options to filter the messages to print. There are 16 million major codes, with 4096 minor codes for each major code. Selecting just a major code displays messages with any of the minor codes for the specified major code; specifying major and minor codes filters the output even more. You can use the major codes to display messages for a specific area, such as TCP/IP. The major codes are defined in the file <sys/slogcodes.h>.

If a filename is specified, sloginfo takes its input from that file instead of /dev/slog. It's assumed that the file contains raw system log data saved by a program or is the file specified in the -l option to slogger.


Print out all system log messages and exit:


Print out all system log messages and wait for more to arrive, printing them as they do:

sloginfo -w

Print out all system log messages, clear the log, and exit:

sloginfo -c

Display only system log messages with a severity of 0, 1, 2, 3, or 4:

sloginfo -s 4

Display the system log messages stored in a specific file:

sloginfo /var/logs/slog0


The default system log file.