This section provides information to configure logging using the command line interface.
Configure logging parameters to save information in a log file or direct the messages to other devices. Logging does the following:
Logs can be configured in the following contexts:
The most basic log configuration must have the following:
The following is a sample log configuration output.
The following sections are basic system tasks that must be performed.
A 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 syntax to configure a log file.
The following is a sample log file configuration output.
To create a log file, a file ID is defined, the target CF or USB drive is specified, and the rollover retention interval period for the log file is defined. 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 storage device before it is deleted.
Use the following syntax to configure a log file.
For the 7210 SAS-T:
The following is a sample log file configuration output.
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 of compact flash (cf1:) 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 service SAP or service interface, or applied to a network port.
The default accounting policy statement cannot be applied to LDP nor RSVP statistics collection records.
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 access, one access port, one network, one network interface and one SDP accounting policy can be defined as default. If statistics collection is enabled on an accounting object, and no accounting policy is applied, then the respective default accounting 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 syntax to configure an accounting policy.
The following is a sample accounting policy configuration output.
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 is a sample event control configuration output.
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 syntax to configure the throttle rate.
The following is a sample throttle rate configuration output.
Use the following syntax to configure a log filter.
The following is a sample log filter configuration output.
The associated log-id does not have to be configured before an 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 syntax to configure an SNMP trap group.
The following is a sample basic SNMP trap group configuration output.
Note:
|
Use the following syntax to configure SNMP dying gasp.
Sample Configuration
The system does not try to resolve the ARP when it needs to send out the SNMP dying-gasp trap, since the amount of time available during power loss event is very less. Instead, the system assumes that ARP entry to the gateway used to reach the SNMP trap server is always available. Nokia recommends that users run a periodic ping query to the SNMP trap server in the background using the cron utility.
The following is a sample configuration output of a cron job which initiates a ping to the server mentioned in the pingscript file every one minute.
Log events cannot be sent to a syslog target host until a valid syslog ID exists.
Use the following syntax to configure a syslog file.
The following is a sample syslog configuration output.
This section describes the logging tasks.
Use the following syntax to modify a log file.
The following is a sample current log configuration output.
The following shows the command usage to modify log file parameters.
The following is a sample modified log file configuration output.
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 syntax to delete a log file.
The following shows the command usage to delete 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 not cleared, the old location remains in effect. |
The location can be CF (cflash-id) or USB (usb-flash-id).
Use the following syntax to modify a log file.
The following is a sample current log configuration output.
The following shows the command usage to modify log file parameters.
The following is are sample file modifications.
Note: All references to the file ID must be deleted before the file ID can be removed. |
Use the following syntax to delete a log ID.
The following shows the command usage to delete a file ID.
Note: All references to the syslog ID must be deleted before the syslog ID can be removed. |
Use the following syntax to modify a syslog ID parameters.
The following shows the command usage to modify the syslog ID parameters.
The following is a sample syslog configuration output.
Use the following syntax to delete a syslog file.
The following shows the command usage to delete a syslog ID.
Use the following syntax to modify an SNMP trap group.
The following is a sample current SNMP trap group configuration output.
The following shows the command usage to modify an SNMP trap group.
The following is a sample SNMP trap group configuration output.
Use the following syntax to delete a trap target and SNMP trap group.
The following is a sample SNMP trap group configuration output.
The following shows the command usage to delete a trap target and an SNMP trap group.
Use the following syntax to modify a log filter.
The following is a sample current log filter configuration output.
The following shows the command usage to modify the log filter.
The following is a sample log filter configuration output.
Use the following syntax to delete a log filter.
The following is a sample current log filter configuration output.
The following shows the command usage to delete a log filter.
Use the following syntax to modify event control parameters.
The following is a sample current event control configuration output.
The following shows the command usage to modify event control.
The following is a sample log filter configuration output.
The no form of the event-control command returns modified values back to the default values.
Use the following syntax to modify event control parameters.
The following shows the command usage to return to the default values.