Print messages from the system log
sloginfo [options] [filename]
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 a major code displays messages with any of the minor codes for the specified major code. 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 /usr/include/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:
sloginfo
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
slogb(), slogf(), slogi(), vslogf() in the Library Reference