DragonFly On-Line Manual Pages
CLOG(8) DragonFly System Manager's Manual CLOG(8)
clog -- display or initialize a circular system log
clog [-f] [-i -s size] logfile
clog displays or initializes a circular log file.
The options are as follows:
-f Display the contents of the circular logfile logfile, then go
into a loop waiting for new material to arrive. This is essen-
tially the same as using the -f option of the tail(1) command on
a standard syslog file.
-i Initialize logfile rather than reading it. This option requires
the -s option. If logfile already exists, it will be truncated
and recreated by this command.
-s This option specifies the size in bytes of the circular logfile
that should be created. This option requires the -i option.
ABOUT CIRCULAR LOGFILES
The clog command supports circular logfiles for syslogd(8). A circular
logfile differs from a standard syslog file in that is has a fixed size.
It does not grow, and does not need to be rotated. When syslogd(8)
reaches the end of a circular logfile, it simply begins again at the
beginning, overwriting the oldest data. The circular logfile also con-
tains information allowing clog to establish what parts of the file are
valid, and in what order they should be displayed.
Circular logfiles are primarily useful for their ability to control the
amount of storage devoted to logfiles. This may be valuable when storage
space is at a premium or when the consequences of running out of storage
space are unacceptable. Circular logfiles can safely be used on a memory
disk (see md(4)).
Circular logfiles are also useful to catch messages that are generated
rapidly but soon lose relevance, such as messages logged at debug prior-
The clog command was written for FreeBSD 4.3 and was imported into
DragonFly 4.7 May 6, 2006 DragonFly 4.7