trace_rotate - Rotates trace files
trace_rotate
trace_file
SUNWsamfs
The
trace_rotate
script rotates trace files generated by StorageTek QFS or Oracle HSM daemons.
It is executed by
sam-fsd
when a daemon trace file has aged or grown beyond
parameters specified in the
defaults.conf
file.
The process of rotating trace files assumes that you want to keep
no more than seven generations of a trace file in your directories at one time.
When the trace files are rotated, the newest trace file is renamed
trace_file.1
, the next-newest trace file is renamed
trace_file.2
, and so on. The oldest trace file in the directory is
deleted as new ones are added, so the oldest trace file in the directory at
any time is always called trace_file.7
.
This process provides two benefits:
A given trace file never becomes so large that it is unwieldy to copy or view.
Entries are expired after a period of time. This prevents file systems from filling up due to the volume of trace entries.
This command accepts the following arguments:
The full path name of the trace file.
By default, trace files are rotated by the
sam-fsd
daemon according to parameters specified in the
∕etc∕opt∕SUNWsamfs∕defaults.conf
file. If no parameters are specified, the trace files
are rotated when their size reaches 10 megabytes.
The current parameters can be displayed by executing the
∕opt∕SUNWsamfs∕sbin∕sam-fsd
command.
You could use the following command line to invoke the script manually:
# trace_rotate ∕var∕opt∕SUNWsamfs∕trace∕sam-archiverd
You can enable this script's trace file rotation mechanism automatically in one of the following ways:
By using the daemon_name.age=
age or the daemon_name.size=
size
directive in the defaults.conf
(4) file.
For more information, see the defaults.conf
(4) man page.
By setting up a crontab
(1) entry to run the trace_rotate
script.
The following crontab
(1) entry
maintains eight back-up files, sam-archiverd.0
through sam-archiverd.7
, plus the original:
10 3 * * 0 ∕opt∕SUNWsamfs∕sbin∕trace_rotate ∕var∕opt∕SUNWsamfs∕trace∕sam-archiverd