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 contains information used to direct events, alarms, traps, and debug information to their respective destinations. One or more event sources can be specified. File IDs, SNMP trap groups, or syslog IDs must be configured before they can be applied to an event log ID.
Use the following CLI syntax to configure a log file:
The following displays an example of the 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.
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. For information on associating an accounting policy with a SAP, see the 7705 SAR OS Services Guide.
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 can be defined as default. If statistics collection is enabled on a SAP and no accounting policy is applied, then the respective default policy is used. If no default policy is defined, then 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. Note that 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 following displays an example of an event control configuration command syntax:
The following displays the event control configuration:
This command configures the number of events and interval length to be applied to all event types that have throttling enabled by the event-control command.
Use the following CLI syntax to configure the throttle rate.
The following displays an example of the configuration command syntax:
The following displays the 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:
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 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: