1.\"	$OpenBSD: syslogc.8,v 1.3 2004/07/11 12:11:54 xsa 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 November 2, 2003
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 Ccoq
25.Op Fl s Ar reporting_socket
26.Ar logname
27.Nm syslogc
28.Op Fl Cc
29.Ar logname
30.Nm syslogc
31.Fl q
32.Sh DESCRIPTION
33.Nm
34collects messages from the
35.Xr syslogd 8
36memory buffer specified by the
37.Ar logname
38argument.
39.Pp
40For
41.Nm
42to work,
43.Xr syslogd 8
44must be configured with one or more memory buffer logs (see
45.Xr syslog.conf 5
46for details) and have a reporting socket location specified on the
47commandline (using the
48.Fl s
49option to
50.Xr syslogd 8 ) .
51.Pp
52By default,
53.Nm
54will query the specified log and return it to standard output.
55.Pp
56The options are as follows:
57.Bl -tag -width Ds
58.It Fl C
59Request that the log buffer be cleared without reading it.
60.It Fl c
61Request that the log buffer be cleared once it has been read.
62.It Fl o
63Check whether the specified log has overflowed.
64If the log has overflowed, then a message will be printed to
65.Xr stdout 4
66and the exit status will be set to 1.
67.It Fl q
68Request a list of available logs.
69.It Fl s Ar reporting_socket
70Specify alternate reporting socket location (the default is
71.Pa /var/run/syslogd.sock ) .
72.El
73.Sh SEE ALSO
74.Xr syslog 3 ,
75.Xr syslog.conf 5 ,
76.Xr syslogd 8
77.Sh HISTORY
78The
79.Nm
80command first appeared in
81.Ox 3.5 .
82