NAME

truncate_log - eliminate old lines in a log file.

SYNOPSIS

truncate_log [-cfrv] [-d ndays] [-h max-history] [-m max] [-s min] log
                [log..]

DESCRIPTION

Logs from the real time system may grow without bound unless trimmed occasionally. This script trims logs by inspecting the time tags which are by default placed on every log line (from the elog(3) routines).

In addition, it trims the rtsys database, which contains a few tables which can otherwise grow with every execution. These files are less of an issue, but might still cause problems on long-running systems, especially where certain cron jobs run multiple times per day.

truncate_log is most safely run when the system is down, but may be run on a live system. However, this should be done cautiously as truncate_log pauses and continues each process associated with a log file in an attempt to avoid losing output.

truncate_log also removes the old log directories (created by restarting rtexec) and old core files if they are older than the specified threshold.

OPTIONS

EXAMPLE


% truncate_log -d 7 -r -v logs/*

SEE ALSO

rtexec(1)
elog(3)

BUGS AND CAVEATS

AUTHOR

Daniel M. Quinlan, danq@brtt.com

Table of Contents
Antelope Release 4.9 Darwin 8.10.0 2007-10-19
Boulder Real Time Technologies, Inc For more information, contact support@brtt.com