1*41ce3b17Snaddy.\" $OpenBSD: syslogc.8,v 1.11 2022/03/31 17:27:32 naddy Exp $ 2ffb9ed4eSdjm.\" 3ffb9ed4eSdjm.\" Copyright (c) 2004 Damien Miller 4ffb9ed4eSdjm.\" 5ffb9ed4eSdjm.\" Permission to use, copy, modify, and distribute this software for any 6ffb9ed4eSdjm.\" purpose with or without fee is hereby granted, provided that the above 7ffb9ed4eSdjm.\" copyright notice and this permission notice appear in all copies. 8ffb9ed4eSdjm.\" 9ffb9ed4eSdjm.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10ffb9ed4eSdjm.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11ffb9ed4eSdjm.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12ffb9ed4eSdjm.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13ffb9ed4eSdjm.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14ffb9ed4eSdjm.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15ffb9ed4eSdjm.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*41ce3b17Snaddy.Dd $Mdocdate: March 31 2022 $ 17ffb9ed4eSdjm.Dt SYSLOGC 8 18ffb9ed4eSdjm.Os 19ffb9ed4eSdjm.Sh NAME 20ffb9ed4eSdjm.Nm syslogc 21ffb9ed4eSdjm.Nd collect messages from syslog memory buffer 22ffb9ed4eSdjm.Sh SYNOPSIS 23ffb9ed4eSdjm.Nm syslogc 2485b719f4Ssobrado.Op Fl Ccfo 252cb6e4c6Ssthen.Op Fl n Ar lines 26ffb9ed4eSdjm.Op Fl s Ar reporting_socket 27ffb9ed4eSdjm.Ar logname 28ffb9ed4eSdjm.Nm syslogc 29ffb9ed4eSdjm.Fl q 30ffb9ed4eSdjm.Sh DESCRIPTION 31ffb9ed4eSdjm.Nm 32ffb9ed4eSdjmcollects messages from the 33ffb9ed4eSdjm.Xr syslogd 8 34ffb9ed4eSdjmmemory buffer specified by the 35ffb9ed4eSdjm.Ar logname 36ffb9ed4eSdjmargument. 37ffb9ed4eSdjm.Pp 38ffb9ed4eSdjmFor 39ffb9ed4eSdjm.Nm 40ffb9ed4eSdjmto work, 41ffb9ed4eSdjm.Xr syslogd 8 42ffb9ed4eSdjmmust be configured with one or more memory buffer logs (see 43ffb9ed4eSdjm.Xr syslog.conf 5 44ffb9ed4eSdjmfor details) and have a reporting socket location specified on the 45ffb9ed4eSdjmcommand line (using the 46ffb9ed4eSdjm.Fl s 47ffb9ed4eSdjmoption to 48ffb9ed4eSdjm.Xr syslogd 8 ) . 49ffb9ed4eSdjm.Pp 50ffb9ed4eSdjmBy default, 51ffb9ed4eSdjm.Nm 522cb6e4c6Ssthenwill query the specified log and return all entries to standard output. 53ffb9ed4eSdjm.Pp 54ffb9ed4eSdjmThe options are as follows: 55ffb9ed4eSdjm.Bl -tag -width Ds 56ffb9ed4eSdjm.It Fl C 57ffb9ed4eSdjmRequest that the log buffer be cleared without reading it. 58ffb9ed4eSdjm.It Fl c 59ffb9ed4eSdjmRequest that the log buffer be cleared once it has been read. 60c5dd883eSmpf.It Fl f 61c5dd883eSmpfPrint out the last 10 lines and read from the buffer continuously. 620c51c6f3SjmcLike the 630c51c6f3Sjmc.Fl f 640c51c6f3Sjmcoption in 650c51c6f3Sjmc.Xr tail 1 . 662cb6e4c6Ssthen.It Fl n Ar lines 672cb6e4c6SsthenPrint the specified number of lines from the end of the buffer. 685b27f617Sdjm.It Fl o 695b27f617SdjmCheck whether the specified log has overflowed. 705b27f617SdjmIf the log has overflowed, then a message will be printed to 715b27f617Sdjm.Xr stdout 4 725b27f617Sdjmand the exit status will be set to 1. 73ffb9ed4eSdjm.It Fl q 74ffb9ed4eSdjmRequest a list of available logs. 75*41ce3b17SnaddyIf a log has overflowed, an asterisk 76661a0813Sdjm.Pq Ql * 77661a0813Sdjmwill be appended to its name. 78ffb9ed4eSdjm.It Fl s Ar reporting_socket 79ffb9ed4eSdjmSpecify alternate reporting socket location (the default is 80ffb9ed4eSdjm.Pa /var/run/syslogd.sock ) . 81ffb9ed4eSdjm.El 82ffb9ed4eSdjm.Sh SEE ALSO 83ffb9ed4eSdjm.Xr syslog 3 , 84b4f82bf3Sxsa.Xr syslog.conf 5 , 85b4f82bf3Sxsa.Xr syslogd 8 86ffb9ed4eSdjm.Sh HISTORY 87ffb9ed4eSdjmThe 88ffb9ed4eSdjm.Nm 89ffb9ed4eSdjmcommand first appeared in 90ffb9ed4eSdjm.Ox 3.5 . 910c51c6f3Sjmc.Sh CAVEATS 920c51c6f3SjmcThe buffer space used for writing logs through the socket is limited. 930c51c6f3SjmcThus it is possible to lose logs when running in continuous mode. 940c51c6f3SjmcLosses are reported on standard error. 95