This section provides information to configure logging using the command line interface.
Topics in this section include:
Logging on the 7705 SAR is used to provide the operator with logging information for monitoring and troubleshooting. You can configure logging parameters to save information in a log file or direct the messages to other devices. Logging commands allow you to:
Logs can be configured in the following contexts:
The most basic log configuration must have the following:
The following displays a log configuration example.
The following sections describe basic system tasks that must be performed.
An event log file is identified by a log-id and contains information used to direct messages generated by system applications (such as events, alarms, traps, and debug information) to their respective destinations. One or more event sources can be specified using the from command. Event destinations (such as file IDs, SNMP trap groups, or syslog IDs) must be configured using the to command before they can be applied to an event log ID. Only one destination can be specified.
Use the file-id log-file-id command to specify the destination compact flash. See Configuring a File ID.
Use the following CLI syntax to configure a log file:
The following displays an example of the event log file configuration command syntax:
The following displays a log file configuration:
To create a log file, a file ID is defined that specifies the target compact flash drive and the rollover and retention interval period for the file. The rollover interval is defined in minutes and determines how long a file will be used before it is closed and a new log file is created. The retention interval determines how long the file will be stored on the compact flash drive before it is deleted.
The minimum amount of free space for log files on a compact flash drive is the lesser of 10% of the compact flash disk capacity or 5 Mb (5 242 880).
Use the following CLI syntax to configure a log file ID:
The following displays an example of the log file ID configuration command syntax:
The following displays the file ID configuration:
Before an accounting policy can be created, a target log file must be created to collect the accounting records. The files are stored in system memory on the compact flash drive in a compressed (tar) XML format and can be retrieved using FTP or SCP. See Configuring an Event Log and Configuring a File ID.
Accounting policies must be configured in the config>log context before they can be applied to a SAP or service interface, or applied to a network port. For information on associating an accounting policy with a SAP or a network port, see the 7705 SAR Services Guide or the 7705 SAR Interface Configuration Guide (respectively).
An accounting policy must define a record type and collection interval. Only one record type can be configured per accounting policy.
When creating accounting policies, one service accounting policy and one network accounting policy can be defined as default. If statistics collection is enabled on a SAP or network port and no accounting policy is applied, the respective default policy is used. If no default policy is defined, no statistics are collected unless a specifically defined accounting policy is applied.
Use the following CLI syntax to configure an accounting policy:
The following displays an example of the accounting policy configuration command syntax:
The following displays the accounting policy configuration:
Use the following CLI syntax to configure event control. The throttle parameter used in the event-control command syntax enables throttling for a specific event type. The config>log>throttle-rate command configures the number of events and interval length to be applied to all event types that have throttling enabled by this event-control command. The throttling rate can also be configured independently for each log event by using the specific-throttle-rate parameter; this rate overrides the globally configured throttle rate for the specified log event.
The following displays an example of throttle rate configuration for all events that have throttling enabled:
The following displays the throttle rate configuration:
The following displays an example of throttle rate configuration for a specific event. The specific-throttle-rate configured for application aps, event 2003, overrides the globally configured throttle-rate.
The following displays the specific throttle rate configuration:
Use the following CLI syntax to configure a log filter:
The following displays an example of the log filter configuration command syntax:
The following displays the log filter configuration:
The associated log-id does not have to be configured before a snmp-trap-group can be created; however, the snmp-trap-group must exist before the log-id can be configured to use it.
Use the following CLI syntax to configure an SNMP trap group:
The following displays an example of the SNMP trap group configuration command syntax:
The following displays the SNMP trap group configuration:
Log events cannot be sent to a syslog target host until a valid syslog ID exists.
Use the following CLI syntax to configure a syslog file:
The following displays an example of the syslog file configuration command syntax:
The following displays the syslog configuration:
This section discusses the following logging tasks:
If the log destination needs to be changed or if the size of an SNMP log or memory log needs to be modified, the log ID must be removed and then recreated.
Use the following CLI syntax to modify a log file:
The following displays the current log configuration:
The following displays an example of modifying log file parameters:
The following displays the modified log file configuration:
The log ID must be shut down first before it can be deleted. In a previous example, file 1 is associated with log-id 2.
Use the following CLI syntax to delete a log file:
The following displays an example of deleting a log file:
![]() | Note: When the file-id location parameter is modified, log files are not written to the new location until a rollover occurs or the log is manually cleared. A rollover can be forced by using the clear>log command. Subsequent log entries are then written to the new location. If a rollover does not occur or the log is not cleared, the old location remains in effect. |
Use the following CLI syntax to modify a file ID:
The following displays the current file ID configuration:
The following displays an example of modifying file ID parameters:
The following displays the file ID modifications:
![]() | Note: All references to the file ID must be deleted before the file ID can be removed. |
Use the following CLI syntax to delete a file ID:
The following displays an example of deleting a file ID:
Use the following CLI syntax to modify syslog ID parameters:
The following displays an example of the syslog ID modifications:
The following displays the syslog configuration:
![]() | Note: All references to the syslog ID must be deleted before the syslog ID can be removed. Use the show>log>log-id command to view syslog references. |
Use the following CLI syntax to delete a syslog ID:
The following displays an example of deleting a syslog ID:
Use the following CLI syntax to modify an SNMP trap group:
The following displays the current SNMP trap group configuration:
The following displays an example of the command usage to modify an SNMP trap group:
The following displays the SNMP trap group configuration:
Use the following CLI syntax to delete a trap target and SNMP trap group:
The following displays the SNMP trap group configuration:
The following displays an example of deleting a trap target and an SNMP trap group.
Use the following CLI syntax to modify a log filter:
The following output displays the current log filter configuration:
The following displays an example of the log filter modifications:
The following displays the log filter configuration:
Use the following CLI syntax to delete a log filter:
The following displays an example of the command to delete a log filter:
Use the following CLI syntax to modify event control parameters:
The following displays the current event control configuration:
The following displays an example of event control modifications:
The following displays the log filter configuration:
The no form of the event-control command returns modified values back to the default values.
Use the following CLI syntax to return to the default event control configuration:
The following displays an example of the command usage to return to the default values: