1.\" $OpenBSD: syslogc.8,v 1.10 2015/11/05 09:48:05 jmc Exp $ 2.\" 3.\" Copyright (c) 2004 Damien Miller 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.Dd $Mdocdate: November 5 2015 $ 17.Dt SYSLOGC 8 18.Os 19.Sh NAME 20.Nm syslogc 21.Nd collect messages from syslog memory buffer 22.Sh SYNOPSIS 23.Nm syslogc 24.Op Fl Ccfo 25.Op Fl n Ar lines 26.Op Fl s Ar reporting_socket 27.Ar logname 28.Nm syslogc 29.Fl q 30.Sh DESCRIPTION 31.Nm 32collects messages from the 33.Xr syslogd 8 34memory buffer specified by the 35.Ar logname 36argument. 37.Pp 38For 39.Nm 40to work, 41.Xr syslogd 8 42must be configured with one or more memory buffer logs (see 43.Xr syslog.conf 5 44for details) and have a reporting socket location specified on the 45command line (using the 46.Fl s 47option to 48.Xr syslogd 8 ) . 49.Pp 50By default, 51.Nm 52will query the specified log and return all entries to standard output. 53.Pp 54The options are as follows: 55.Bl -tag -width Ds 56.It Fl C 57Request that the log buffer be cleared without reading it. 58.It Fl c 59Request that the log buffer be cleared once it has been read. 60.It Fl f 61Print out the last 10 lines and read from the buffer continuously. 62Like the 63.Fl f 64option in 65.Xr tail 1 . 66.It Fl n Ar lines 67Print the specified number of lines from the end of the buffer. 68.It Fl o 69Check whether the specified log has overflowed. 70If the log has overflowed, then a message will be printed to 71.Xr stdout 4 72and the exit status will be set to 1. 73.It Fl q 74Request a list of available logs. 75If a log has overflowed an asterisk 76.Pq Ql * 77will be appended to its name. 78.It Fl s Ar reporting_socket 79Specify alternate reporting socket location (the default is 80.Pa /var/run/syslogd.sock ) . 81.El 82.Sh SEE ALSO 83.Xr syslog 3 , 84.Xr syslog.conf 5 , 85.Xr syslogd 8 86.Sh HISTORY 87The 88.Nm 89command first appeared in 90.Ox 3.5 . 91.Sh CAVEATS 92The buffer space used for writing logs through the socket is limited. 93Thus it is possible to lose logs when running in continuous mode. 94Losses are reported on standard error. 95