[no] file-id file-id
config>log
Supported on all 7210 SAS platforms as described in this document
Commands in this context configure a file ID template to be used as a destination for an event log or billing file.
This command defines the file location and characteristics that are to be used as the destination for a log event message stream or accounting/billing information. The file defined in this context is subsequently specified in the to command under log-id or accounting-policy to direct specific logging or billing source streams to the file destination.
A file ID can only be assigned to either one log-id or one accounting-policy. It cannot be reused for multiple instances. A file ID and associated file definition must exist for each log and billing file that must be stored in the file system.
A file is created when the file ID defined in this command is selected as the destination type for a specific log or accounting record. Log files are collected in a ‟log” directory. Accounting files are collected in an ‟act” directory.
The filenames for a log are created by the system as summarized in the following table.
File type |
File name |
---|---|
Log File |
log lff-timestamp |
Accounting File |
act aaff-timestamp |
where:
ll is the log-id
aa is the accounting policy-id
ff is the file-id
The timestamp is the actual timestamp when the file is created. The format for the timestamp is yyyymmdd-hhmmss where:
yyyy is the year (for example, 2022)
mm is the month number (for example, 12 for December)
dd is the day of the month (for example, 03 for the 3rd of the month)
hh is the hour of the day in 24 hour format (for example, 04 for 4 a.m.)
mm is the minutes (for example, 30 for 30 minutes past the hour)
ss is the number of seconds (for example, 14 for 14 seconds)
The accounting file is compressed and has a .gz extension.
When initialized, each file contains the following:
the log-id description
the time the file was opened
the reason the file was created
if the event log file was closed properly, the sequence number of the last event stored on the log is recorded
If the process of writing to a log file fails (for example, the compact flash card is full) and a backup location is not specified or fails, the log file does not become operational even if the compact flash card is replaced. Enter either a clear log command or a shutdown/no shutdown command to reinitialize the file.
If the primary location fails (for example, the compact flash card fills up during the write process), a trap is sent and logging continues to the specified backup location. This can result in truncated files in different locations.
The no form of this command removes the file-id from the configuration. A file-id can only be removed from the configuration if the file is not the designated output for a log destination. The actual file remains on the file system.
The file identification number, expressed as a decimal integer.
location [cflash-id | usb-flash-id]
no location
config>log>file file-id
Supported on all 7210 SAS platforms as described in this document
This command specifies the primary location where the log or billing file is created.
When creating files, the primary location is used as long as there is available space. If no space is available, an attempt is made to delete unnecessary files that are past their retention date.
If sufficient space is not available, an attempt is made to remove the oldest to newest closed log or accounting files. After each file is deleted, the system attempts to create the new file.
A medium severity trap is issued to indicate that a compact flash is either not available or that no space is available on the specified flash and that the backup location is being used.
A high priority alarm condition is raised if none of the configured compact flash devices for this file ID are present or if there is insufficient space available. If space becomes available, the alarm condition is cleared.
The no form of this command reverts to default settings.
Log files are created on cf1: and accounting files are created on cf1:.
Specifies the primary location.
Specifies the USB location.
The usb-flash-id parameter is applicable only to platforms that support USB port and USB storage devices.
rollover minutes [retention hours]
no rollover
config>log
Supported on all 7210 SAS platforms as described in this document
This command configures how often an event or accounting log is rolled over or partitioned into a new file.
An event or accounting log is actually composed of multiple individual files. The system creates a new file for the log based on the rollover time, expressed in minutes.
The retention option, expressed in hours, allows you to modify the default time to keep the file in the system. The retention time is based on the rollover time of the file.
When multiple rollover commands for a file-id are entered, the last command overwrites the previous command.
rollover 1440 retention 12
Specifies the rollover time, in minutes.
Specifies the retention, period in hours, expressed as a decimal integer. The retention time is based on the creation time of the file. The file becomes a candidate for removal when the creation datestamp, rollover time, and retention time added together is less than the current timestamp.