clog.8: break line after a sentence
[dragonfly.git] / usr.sbin / clog / clog.8
CommitLineData
534b2416
MD
1.\" Copyright (c) 2001
2.\" Jeffrey D. Wheelhouse. All rights reserved.
3.\"
4.\" This code was originally developed by Jeff Wheelhouse (jdw@wwwi.com).
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\"
1bf4b486
SW
15.\" THIS SOFTWARE IS PROVIDED BY JEFF WHEELHOUSE ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
534b2416 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1bf4b486 18.\" NO EVENT SHALL JEFF WHEELHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT,
534b2416
MD
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
20.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
1bf4b486
SW
21.\" OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
534b2416
MD
23.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $Id: clog.8,v 1.2 2001/10/02 04:41:21 jdw Exp $
534b2416 27.\"
a9e9a60d 28.Dd May 6, 2006
534b2416 29.Dt CLOG 8
a9e9a60d 30.Os
534b2416
MD
31.Sh NAME
32.Nm clog
3ca50e1d 33.Nd display or initialize a circular system log
534b2416
MD
34.Sh SYNOPSIS
35.Nm
36.Op Fl f
37.Op Fl i Fl s Ar size
38.Ar logfile
39.Sh DESCRIPTION
3ca50e1d 40.Nm
534b2416
MD
41displays or initializes a circular log file.
42.Pp
43The options are as follows:
44.Bl -tag -width indent
45.It Fl f
46Display the contents of the circular logfile
47.Ar logfile ,
3ca50e1d
FF
48then go into a loop waiting for new material to arrive.
49This is essentially the same as using the
534b2416 50.Fl f
1bf4b486 51option of the
534b2416
MD
52.Xr tail 1
53command on a standard syslog file.
54.It Fl i
1bf4b486 55Initialize
534b2416 56.Ar logfile
3ca50e1d
FF
57rather than reading it.
58This option requires the
534b2416 59.Fl s
3ca50e1d
FF
60option.
61If
534b2416
MD
62.Ar logfile
63already exists, it will be truncated and recreated by this command.
64.It Fl s
1bf4b486 65This option specifies the size in bytes of the circular logfile that should
3ca50e1d
FF
66be created.
67This option requires the
534b2416
MD
68.Fl i
69option.
70.El
71.Sh ABOUT CIRCULAR LOGFILES
72The
73.Nm
1bf4b486 74command supports circular logfiles for
534b2416
MD
75.Xr syslogd 8 .
76A circular logfile differs from a standard syslog file in that is has a fixed
3ca50e1d
FF
77size.
78It does not grow, and does not need to be rotated.
79When
1bf4b486 80.Xr syslogd 8
534b2416 81reaches the end of a circular logfile, it simply begins again at the beginning,
3ca50e1d
FF
82overwriting the oldest data.
83The circular logfile also contains information allowing
534b2416
MD
84.Nm
85to establish what parts of the file are valid, and in what order they should
86be displayed.
87.Pp
88Circular logfiles are primarily useful for their ability to control the amount
3ca50e1d
FF
89of storage devoted to logfiles.
90This may be valuable when storage space is at a premium or when the
91consequences of running out of storage space are unacceptable.
92Circular logfiles can safely be used on a memory disk (see
a9e9a60d 93.Xr md 4 ) .
534b2416
MD
94.Pp
95Circular logfiles are also useful to catch messages that are generated rapidly
96but soon lose relevance, such as messages logged at debug priority.
534b2416 97.Sh SEE ALSO
375d1659
SW
98.Xr syslog.conf 5 ,
99.Xr syslogd 8
534b2416
MD
100.Sh HISTORY
101The
102.Nm
b5ac91c1
SW
103command was written for
104.Fx 4.3
105and was imported into
a9e9a60d 106.Dx 1.1 .