syslogc(8)

syslogc8

Collect messages from syslog memory buffer

Usage

syslogc [-Ccfo] [-n lines] [-s reporting_socket] logname

syslogc -q

Overview

syslogc collects messages from the syslogd(8) memory buffer specified by the logname argument.

For syslogc to work, syslogd(8) must be configured with one or more memory buffer logs (see syslog.conf(5) for details) and have a reporting socket location specified on the command line (using the -s option to syslogd(8)).

By default, syslogc will query the specified log and return all entries to standard output.

The options are as follows:

-C

Request that the log buffer be cleared without reading it.

-c

Request that the log buffer be cleared once it has been read.

-f

Print out the last 10 lines and read from the buffer continuously. Like the -f option in tail(1).

-n lines

Print the specified number of lines from the end of the buffer.

-o

Check whether the specified log has overflowed. If the log has overflowed, then a message will be printed to stdout(4) and the exit status will be set to 1.

-q

Request a list of available logs. If a log has overflowed, an asterisk (‘*’) will be appended to its name.

-s reporting_socket

Specify alternate reporting socket location (the default is /var/run/syslogd.sock).

Caveats

The buffer space used for writing logs through the socket is limited. Thus it is possible to lose logs when running in continuous mode. Losses are reported on standard error.

Releases

47 releases since OpenBSD 3.5; the text changed 8 times.

  1. 3.5
  2. 3.6–3.8
  3. 3.9–4.0
  4. 4.1
  5. 4.2–4.4
  6. 4.5–4.9
  7. 5.0–5.8
  8. 5.9–7.0
  9. 7.1–8.0

-f since OpenBSD 4.1; -n since OpenBSD 5.0; -o since OpenBSD 3.6.

History

The syslogc command first appeared in OpenBSD 3.5.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.