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 mate rial to arrive. This is essentially 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 al ready 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. |
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 contains 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 priority. |
syslogd(8), syslog.conf(5) |
The clog command was written for FreeBSD 4.3 but is not yet part of a BSD distribution. |
4th Berkeley Distribution |