slog2info

QNX SDP8.0Utilities ReferenceUtilities

Display messages from the system log

Syntax:

slog2info [-acfinSstVvWw] [-b bset1,bset2,...] [-d path]
          [-e code1,code2,...] [-l filename] [-r [resetfilename]]

Runs on:

QNX OS

Options:

-a
Highlight logs with ANSI terminal color-codes. Logs of different severity levels are shown with different text/background colors for readability. This might not be formatted correctly on all terminals and emulators.
-b bset1,bset2,...
Parse only the logs of the given buffer set names. You can also specify this as:
-b bset1 -b bset2 -b ...
-c
Clear the live slog2 buffers. You can use this option with -b to clear specific buffer sets.
-d path
Specify the directory that contains slogger2 buffer sets. This is only for static snapshots.
-f
Format the timestamp as epoch_seconds.milliseconds.
-e code1,code2,...
Parse only the logs that match one of the specified event code numbers.
-i
Display information about a buffer set specified by the -l option.
-l filename
(el) The buffer set file to parse. This lets you select a PID-specific buffer set. The filename argument can be the relative path of a file under /dev/shmem/slogger2/.
-n
Discard newline ('\n') characters from logs. Display each line in a multiline log as a separate log line in the output.
-r resetfilename
Display logs preserved through the most recent reset. Optionally specify a reset file to display logs from another reset.
-S
Show the severity level for each log line as one of: SLOG2_SHUTDOWN, SLOG2_CRITICAL, SLOG2_ERROR, SLOG2_WARNING, SLOG2_NOTICE, SLOG2_INFO, SLOG2_DEBUG1, SLOG2_DEBUG2.
-s
Show the numeric severity level for each log line, where 0 corresponds to SLOG2_SHUTDOWN, and 7 corresponds to SLOG2_DEBUG2.
-t
Display the thread ID.
-V <verbosity>
Ask slogger2 to change the verbosity on buffer sets.
  • Combined with [-b]: by name.
  • Combined with [-l]: by filename.
  • With neither [-b] nor [-l]: all buffer sets.
Permissions are checked against the ACLs on the shmem files. A user can thus safely ask for all buffer sets, but slogger2 will only modify the verbosity on the ones created by that specific user or group.
root can change the verbosity on all buffers.
Valid <verbosity> values include the range from 0 (SLOG2_SHUTDOWN) to 7 (SLOG2_DEBUG2) and the value -2 (SLOG2_NO_LOG_VERBOSITY).
This only has an effect on buffer sets created with the SLOG2_DYNAMIC_VERBOSITY flag (either globally or for the buffer set itself).
In the case slogger2 runs with the -G flag, setting the verbosity this way is subject to the same restrictions as calling slog2_set_verbosity(). Refer to slogger2's -G option for details.
-v
Parse buffers that were registered with the series of SLOG2_HINT_SKIP_BUFFER_* flags for slog2_register().
-W, -w
Wait mode; listen for new prints. Press Ctrl C to stop. The -w option prints all available older logs and then starts live streaming; -W ignores all older logs and starts live streaming from the current moment.

Description:

The slog2info utility displays the contents of the system log buffer managed by slogger2, which must be running to record these messages.

If you don't specify any options, slog2info displays all the logs.

Examples:

Dump all logs for a live system:
slog2info
Dump the logs only from a given buffer_set file:
slog2info -l /dev/shmem/slogger2/my_test_buff.86749364
Dump the logs from all buffer_sets with a matching name:
slog2info -b my_test_buff
Dump all logs from the latest reset:
slog2info -r
Dump the logs from all buffer_sets with a matching name from the latest reset:
slog2info -r -b my_test_buff
Dump information pertaining to a given buffer set file:
slog2info -i -l /dev/shmem/slogger2/my_test_buff.86749364
Dump all logs from a live system, and then wait:
slog2info -w
Set verbosity to CRITICAL for all instances of the my_test program that use the my_test buffer set name, owned by the current user:
slog2info -V1 -b my_test
Set verbosity to INFO for the one instance of the my_test program with PID 1234 that uses the my_test buffer set name:
slog2info -V5 -l my_test.1234
Page updated: