1534b2416SMatthew Dillon.\" Copyright (c) 2001 2534b2416SMatthew Dillon.\" Jeffrey D. Wheelhouse. All rights reserved. 3534b2416SMatthew Dillon.\" 4534b2416SMatthew Dillon.\" This code was originally developed by Jeff Wheelhouse (jdw@wwwi.com). 5534b2416SMatthew Dillon.\" 6534b2416SMatthew Dillon.\" Redistribution and use in source and binary forms, with or without 7534b2416SMatthew Dillon.\" modification, are permitted provided that the following conditions 8534b2416SMatthew Dillon.\" are met: 9534b2416SMatthew Dillon.\" 1. Redistributions of source code must retain the above copyright 10534b2416SMatthew Dillon.\" notice, this list of conditions and the following disclaimer. 11534b2416SMatthew Dillon.\" 2. Redistributions in binary form must reproduce the above copyright 12534b2416SMatthew Dillon.\" notice, this list of conditions and the following disclaimer in the 13534b2416SMatthew Dillon.\" documentation and/or other materials provided with the distribution. 14534b2416SMatthew Dillon.\" 15534b2416SMatthew Dillon.\" THIS SOFTWARE IS PROVIDED BY JEFF WHEELHOUSE ``AS IS'' AND ANY EXPRESS OR 16534b2416SMatthew Dillon.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17534b2416SMatthew Dillon.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18534b2416SMatthew Dillon.\" NO EVENT SHALL JEFF WHEELHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT, 19534b2416SMatthew Dillon.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT 20534b2416SMatthew Dillon.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21534b2416SMatthew Dillon.\" OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22534b2416SMatthew Dillon.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23534b2416SMatthew Dillon.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24534b2416SMatthew Dillon.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25534b2416SMatthew Dillon.\" 26534b2416SMatthew Dillon.\" $Id: clog.8,v 1.2 2001/10/02 04:41:21 jdw Exp $ 27534b2416SMatthew Dillon.\" 28a9e9a60dSSascha Wildner.Dd May 6, 2006 29534b2416SMatthew Dillon.Dt CLOG 8 30a9e9a60dSSascha Wildner.Os 31534b2416SMatthew Dillon.Sh NAME 32534b2416SMatthew Dillon.Nm clog 333ca50e1dSFranco Fichtner.Nd display or initialize a circular system log 34534b2416SMatthew Dillon.Sh SYNOPSIS 35534b2416SMatthew Dillon.Nm 36534b2416SMatthew Dillon.Op Fl f 37534b2416SMatthew Dillon.Op Fl i Fl s Ar size 38534b2416SMatthew Dillon.Ar logfile 39534b2416SMatthew Dillon.Sh DESCRIPTION 403ca50e1dSFranco Fichtner.Nm 41534b2416SMatthew Dillondisplays or initializes a circular log file. 42534b2416SMatthew Dillon.Pp 43534b2416SMatthew DillonThe options are as follows: 44534b2416SMatthew Dillon.Bl -tag -width indent 45534b2416SMatthew Dillon.It Fl f 46534b2416SMatthew DillonDisplay the contents of the circular logfile 47534b2416SMatthew Dillon.Ar logfile , 483ca50e1dSFranco Fichtnerthen go into a loop waiting for new material to arrive. 493ca50e1dSFranco FichtnerThis is essentially the same as using the 50534b2416SMatthew Dillon.Fl f 51534b2416SMatthew Dillonoption of the 52534b2416SMatthew Dillon.Xr tail 1 53534b2416SMatthew Dilloncommand on a standard syslog file. 54534b2416SMatthew Dillon.It Fl i 55534b2416SMatthew DillonInitialize 56534b2416SMatthew Dillon.Ar logfile 573ca50e1dSFranco Fichtnerrather than reading it. 583ca50e1dSFranco FichtnerThis option requires the 59534b2416SMatthew Dillon.Fl s 603ca50e1dSFranco Fichtneroption. 613ca50e1dSFranco FichtnerIf 62534b2416SMatthew Dillon.Ar logfile 63534b2416SMatthew Dillonalready exists, it will be truncated and recreated by this command. 64534b2416SMatthew Dillon.It Fl s 65534b2416SMatthew DillonThis option specifies the size in bytes of the circular logfile that should 663ca50e1dSFranco Fichtnerbe created. 673ca50e1dSFranco FichtnerThis option requires the 68534b2416SMatthew Dillon.Fl i 69534b2416SMatthew Dillonoption. 70534b2416SMatthew Dillon.El 71534b2416SMatthew Dillon.Sh ABOUT CIRCULAR LOGFILES 72534b2416SMatthew DillonThe 73534b2416SMatthew Dillon.Nm 74534b2416SMatthew Dilloncommand supports circular logfiles for 75534b2416SMatthew Dillon.Xr syslogd 8 . 76*27ea30e3SSascha WildnerA circular logfile differs from a standard syslog file in that it has a fixed 773ca50e1dSFranco Fichtnersize. 783ca50e1dSFranco FichtnerIt does not grow, and does not need to be rotated. 793ca50e1dSFranco FichtnerWhen 80534b2416SMatthew Dillon.Xr syslogd 8 81534b2416SMatthew Dillonreaches the end of a circular logfile, it simply begins again at the beginning, 823ca50e1dSFranco Fichtneroverwriting the oldest data. 833ca50e1dSFranco FichtnerThe circular logfile also contains information allowing 84534b2416SMatthew Dillon.Nm 85534b2416SMatthew Dillonto establish what parts of the file are valid, and in what order they should 86534b2416SMatthew Dillonbe displayed. 87534b2416SMatthew Dillon.Pp 88534b2416SMatthew DillonCircular logfiles are primarily useful for their ability to control the amount 893ca50e1dSFranco Fichtnerof storage devoted to logfiles. 903ca50e1dSFranco FichtnerThis may be valuable when storage space is at a premium or when the 913ca50e1dSFranco Fichtnerconsequences of running out of storage space are unacceptable. 923ca50e1dSFranco FichtnerCircular logfiles can safely be used on a memory disk (see 93534b2416SMatthew Dillon.Xr md 4 ) . 94534b2416SMatthew Dillon.Pp 95534b2416SMatthew DillonCircular logfiles are also useful to catch messages that are generated rapidly 96534b2416SMatthew Dillonbut soon lose relevance, such as messages logged at debug priority. 97534b2416SMatthew Dillon.Sh SEE ALSO 98375d1659SSascha Wildner.Xr syslog.conf 5 , 99375d1659SSascha Wildner.Xr syslogd 8 100534b2416SMatthew Dillon.Sh HISTORY 101534b2416SMatthew DillonThe 102534b2416SMatthew Dillon.Nm 103b5ac91c1SSascha Wildnercommand was written for 104b5ac91c1SSascha Wildner.Fx 4.3 105b5ac91c1SSascha Wildnerand was imported into 106a9e9a60dSSascha Wildner.Dx 1.1 . 107