xref: /openbsd/usr.sbin/syslogc/syslogc.8 (revision 404b540a)
1.\"	$OpenBSD: syslogc.8,v 1.8 2008/09/10 22:17:33 sobrado 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: September 10 2008 $
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 s Ar reporting_socket
26.Ar logname
27.Nm syslogc
28.Fl q
29.Sh DESCRIPTION
30.Nm
31collects messages from the
32.Xr syslogd 8
33memory buffer specified by the
34.Ar logname
35argument.
36.Pp
37For
38.Nm
39to work,
40.Xr syslogd 8
41must be configured with one or more memory buffer logs (see
42.Xr syslog.conf 5
43for details) and have a reporting socket location specified on the
44commandline (using the
45.Fl s
46option to
47.Xr syslogd 8 ) .
48.Pp
49By default,
50.Nm
51will query the specified log and return it to standard output.
52.Pp
53The options are as follows:
54.Bl -tag -width Ds
55.It Fl C
56Request that the log buffer be cleared without reading it.
57.It Fl c
58Request that the log buffer be cleared once it has been read.
59.It Fl f
60Print out the last 10 lines and read from the buffer continuously.
61Like the
62.Fl f
63option in
64.Xr tail 1 .
65.It Fl o
66Check whether the specified log has overflowed.
67If the log has overflowed, then a message will be printed to
68.Xr stdout 4
69and the exit status will be set to 1.
70.It Fl q
71Request a list of available logs.
72If a log has overflowed an asterisk
73.Pq Ql *
74will be appended to its name.
75.It Fl s Ar reporting_socket
76Specify alternate reporting socket location (the default is
77.Pa /var/run/syslogd.sock ) .
78.El
79.Sh SEE ALSO
80.Xr syslog 3 ,
81.Xr syslog.conf 5 ,
82.Xr syslogd 8
83.Sh HISTORY
84The
85.Nm
86command first appeared in
87.Ox 3.5 .
88.Sh CAVEATS
89The buffer space used for writing logs through the socket is limited.
90Thus it is possible to lose logs when running in continuous mode.
91Losses are reported on standard error.
92