Table Of Contents
L Commands
logging #?
logging level
logging on
logging syslog
logout
L Commands
This chapter covers the following commands:
•
logging #?
•
logging level
•
logging on
•
logging syslog
•
logout
logging #?
To insert a routing rules entry into the logging table before the specified entry, use the logging #? command.
logging #?
logging #nn level notification-level from facility-name to destination1 [destination2...]
Syntax Description
#?
|
Request an indexed list of entries in the logging table.
|
#nn
|
The index number from the displayed list of entries. The new routing rule will be inserted before the specified logging table entry.
|
notification-level
|
Limit logging to messages of a specified level or lower levels. See Table 9-1 in the Usage Guidelines section for a list of valid names that can be used for the notification-level argument.
|
from facility-name
|
The name of the facility. A facility is the feature area from which the message is received. See Table 9-2 in the Usage Guidelines section for a list of valid facility names. Each facility can have eight notification levels. Each notification level can have up to seven destination.
|
to destination1 [destination2...]
|
At least one of the destinations described in Table 9-3.
|
Defaults
None.
Command Modes
Administrator.
Command History
Release
|
Modification
|
2.3.1
|
This command was introduced for the SN 5428.
|
3.2.1
|
This command was introduced.
|
Usage Guidelines
Event, trace and debug messages can be routed to various destinations, based on the notification level of the message and the application area (facility) that generated the message. When a log message is received by the storage router, the logging table rules are searched by facility name and by message level until a match is found. The log message is sent to all the destinations specified by the matching rule.
New routing rules are normally appended to the existing rules in the table. Use this command to insert a routing rule at a specific location within the table.
To display an indexed lists of entries in the logging table, use the number sign (#) character followed by a question mark (?). That action will cause the routing rules in the logging table to be displayed as a numbered (indexed) set of lines. The command is displayed at the prompt below the list to the point of the # keyword. Complete the command by entering the appropriate index number and the desired keywords and variables to compose the new routing rule. The new routing rule will be added to the table before the specified entry.
The level limits logging to messages of the specified notification level or lower levels, based on level number. Table 9-1 describes the available logging levels.
Table 9-1 Logging Level Notification Levels and Corresponding Numbers
Notification Level
|
Level Number
|
Description
|
emergency
|
0
|
System unusable
|
alert
|
1
|
Immediate action needed
|
critical
|
2
|
Critical conditions
|
error
|
3
|
Error conditions
|
warning
|
4
|
Non-fatal warning conditions
|
notice
|
5
|
Normal but significant conditions
|
info
|
6
|
Informational messages only
|
debug
|
7
|
Information for troubleshooting purposes
|
Note
The debug notification level should be used for specific troubleshooting purposes only. System performance and HA behavior may be adversely affected by logging at the debug notification level.
Each facility can have up to eight notification levels. Each facility and notification level pair can have up to seven destinations. Table 9-2 describes the available facility names.
Table 9-2 Logging Level Facilities
Facility Name
|
Description
|
all
|
All facilities.
|
AUTH
|
AAA authentication.
|
CDP
|
Cisco Discovery Protocol.
|
CONF
|
Configuration functions.
|
FC
|
Fibre Channel interfaces.
|
FCIP
|
FCIP functions.
|
GE
|
Gigabit Ethernet interfaces.
|
HA
|
High availability cluster functions.
|
IF
|
Interface manager.
|
INVALID
|
Generic functions.
|
IP
|
IP functions.
|
ISCSI
|
iSCSI functions.
|
MON
|
Hardware monitor.
|
SLP
|
Service Location Protocol service functions.
|
SNMP
|
Simple Network Management Protocol.
|
SYSLOG
|
Syslog functions.
|
UI
|
User interface functions.
|
VTP
|
VTP and VLAN functions.
|
Table 9-3 describes the available logging destinations.
Table 9-3 Logging Level Destinations
Destination
|
Description
|
all
|
Logs to all destinations.
|
none
|
No logging occurs.
|
console
|
Logs to serial console CLI sessions.
|
logfile
|
Logs messages to the storage router log file.
|
rslog
|
Logs messages to a remote syslog server. Use the logging syslog command to specify the IP address of the remote syslog server.
|
vty
|
Logs to all Telnet, SSH, or other virtual terminal CLI sessions.
|
Use the save system bootconfig or save all bootconfig commands to save the list of log route entries. To delete a log route entry by its index number, use the delete logging command.
Examples
The following example displays an indexed list of the routing rules in the logging table, and then inserts an entry to log anything from the HA facility with notification level of notice (or lower) to all logging destinations before the third entry. The show logging command displays the newly inserted entry.
Index Level Priority Facility Route
1 critical 2 all console vty logfile
[SN5428-2A]# logging #3 level notice from HA to all
[SN5428-2A]# show logging
Index Level Priority Facility Route
1 critical 2 all console vty logfile
Syslog host is enabled, ip-address is 10.1.1.144
Related Commands
Command
|
Description
|
clear logging table
|
Clear the storage router logging table of all entries, or to reset the table to factory defaults.
|
delete logging
|
Delete a rule from the logging table.
|
logging level
|
Add rule entries to route storage router event, debug and trace messages to various destinations based on facility and notification level.
|
logging on
|
Enable or temporarily disable logging of storage router event message.
|
logging syslog
|
Identify a remote syslog host to be used to log messages.
|
save all
|
Save all configuration information, including the log route entries list.
|
save system
|
Save selected system configuration information, including log route entries list.
|
show logging
|
Display the routing rules in the logging table and the contents of the storage router log file.
|
show system
|
Display selected system information.
|
logging level
To add a routing rule to the logging table, use the logging level command.
logging level notification-level from facility-name to destination1 [destination2...]
Syntax Description
notification-level
|
Limit logging to messages of a specified level or lower levels. See Table 9-4 in the Usage Guidelines section for a list of valid names that can be used for the notification-level argument.
|
from facility-name
|
The name of the facility. A facility is the feature area from which the message is received. See Table 9-5 in the Usage Guidelines section for a list of valid facility names. Each facility can have eight notification levels. Each notification level can have up to seven destination.
|
to destination1 [destination2...]
|
At least one of the destinations described in Table 9-6.
|
Defaults
The factory default logging rules are as follows:
•
All messages from all facilities at notice level or lower levels are logged to all destinations.
•
All messages from all facilities at info level or lower levels are logged to the storage router log file.
•
All messages from all facilities at debug level are not logged.
Command Modes
Administrator.
Command History
Release
|
Modification
|
2.3.1
|
This command was introduced for the SN 5428.
|
3.2.1
|
This command was introduced for the SN 5428-2.
|
Usage Guidelines
Event, trace and debug messages can be routed to various destinations, based on the notification level of the message and the application area (facility) that generated the message. When a log message is received by the storage router, the logging table rules are searched by facility name and by notification level until a match is found. The log message is sent to all the destinations specified by the matching rule. When a new routing rule is added, it is appended to the existing list of entries.
Messages are sent in the following format:
<timestamp>: %<facility>-<level_number>-<mnemonic>: <message text>
The following is an example log message, for the SNMP facility:
Mar 18 11:48:05: %SNMP-5-SASAS: SnmpApp starting...
Each facility can have up to eight notification levels. The notification level limits logging to messages of the specified level or lower levels, based on level number. Table 9-4 describes the available logging levels.
Each facility and notification level pair can have up to seven destinations. Table 9-5 describes the available facility names.
Table 9-4 Logging Level Notification Levels and Corresponding Numbers
Notification Level
|
Level Number
|
Description
|
emergency
|
0
|
System unusable
|
alert
|
1
|
Immediate action needed
|
critical
|
2
|
Critical conditions
|
error
|
3
|
Error conditions
|
warning
|
4
|
Non-fatal warning conditions
|
notice
|
5
|
Normal but significant conditions
|
info
|
6
|
Informational messages only
|
debug
|
7
|
Information for troubleshooting purposes
|
Note
The debug notification level should be used for specific troubleshooting purposes only. System performance and HA behavior may be adversely affected by logging at the debug notification level.
Table 9-5 Logging Level Facilities
Facility Name
|
Description
|
all
|
All facilities.
|
AUTH
|
AAA authentication.
|
CDP
|
Cisco Discovery Protocol.
|
CONF
|
Configuration functions.
|
FC
|
Fibre Channel interfaces.
|
FCIP
|
FCIP functions.
|
GE
|
Gigabit Ethernet interfaces.
|
HA
|
High availability cluster functions.
|
IF
|
Interface manager.
|
INVALID
|
Generic functions.
|
IP
|
IP functions.
|
ISCSI
|
iSCSI functions.
|
MON
|
Hardware monitor.
|
SLP
|
Service Location Protocol service functions.
|
SNMP
|
Simple Network Management Protocol.
|
SYSLOG
|
Syslog functions.
|
UI
|
User interface functions.
|
VTP
|
VTP and VLAN functions.
|
Table 9-6 describes the available logging destinations.
Table 9-6 Logging Level Destinations
Destination
|
Description
|
all
|
Logs to all destinations.
|
none
|
No logging occurs.
|
console
|
Logs to console CLI sessions.
|
logfile
|
Logs messages to the storage router log file.
|
rslog
|
Logs messages to a remote syslog server. Use the logging syslog command to specify the IP address of the remote syslog server.
|
vty
|
Logs to all Telnet, SSH, or other virtual terminal CLI sessions.
|
Use the save system bootconfig or save all bootconfig commands to save the logging table
To delete a routing rule from the logging table, use the delete logging command.
Note
Any message that does not have a matching rule in the logging table is discarded.
Examples
The following example logs anything from the HA facility with notification level of notice (or lower) to all logging destinations.
[SN5428-2A]# logging level notice from HA to all
The following example logs messages from all facilities with a notification level of warning or lower to all destinations. (If this is the only rule in the logging table, any message with a notification level of debug, info or notice is discarded and not logged.) The log route entries are saved to the bootable configuration of the storage router.
[SN5428-2A]# logging level warning from all to all
[SN5428-2A]# save system bootconfig
Related Commands
Command
|
Description
|
clear logging table
|
Clear the storage router logging table of all entries, or to reset the table to factory defaults.
|
delete logging
|
Delete a rule from the logging table.
|
logging #?
|
Insert a routing rule entry into the storage router logging table.
|
logging on
|
Enable or temporarily disable logging of storage router event message.
|
logging syslog
|
Identify a remote syslog host to be used to log messages.
|
save all
|
Save all configuration information, including the log route entries list.
|
save system
|
Save selected system configuration information, including log route entries list.
|
show logging
|
Display the routing rules in the logging table and the contents of the storage router log file.
|
show system
|
Display selected system information.
|
logging on
To enable logging of storage router event messages based on the rules in the logging table, use the logging on command. To temporarily disable logging of all event messages, use the no form of this command.
logging on
no logging on
Syntax Description
This command has no arguments or keywords.
Defaults
Logging is enabled by default. The factory default logging rules are as follows:
•
All messages from all facilities at notice level or lower levels are logged to all destinations.
•
All messages from all facilities at info level or lower levels are logged to the storage router log file.
•
All messages from all facilities at debug level are not logged.
Command Modes
Administrator.
Command History
Release
|
Modification
|
2.3.1
|
This command was introduced for the SN 5428.
|
3.2.1
|
This command was introduced for the SN 5428-2.
|
Usage Guidelines
Use the no form of this command to quickly disable logging of all messages. For example, if there is an error condition that is overwhelming the console with messages, enter no logging on to temporarily disable logging without changing the logging table. Use the logging on command to re-enable logging when the problem is resolved.
Examples
The following example temporarily disables logging of all event messages:
[SN5428-2A]# no logging on
Related Commands
Command
|
Description
|
clear logging table
|
Clear the storage router logging table of all entries, or to reset the table to factory defaults.
|
delete logging
|
Delete a rule from the logging table.
|
logging #?
|
Insert a routing rule entry into the storage router logging table.
|
logging level
|
Add rule entries to route storage router event, debug and trace messages to various destinations based on facility and notification level.
|
logging syslog
|
Identify a remote syslog host to be used to log messages.
|
save all
|
Save all configuration information, including the log route entries list.
|
save system
|
Save selected system configuration information, including log route entries list.
|
show logging
|
Display the routing rules in the logging table and the contents of the storage router log file.
|
show system
|
Display selected system information.
|
logging syslog
To identify a remote syslog host to be used to log storage router event messages, use the logging syslog command. Use the no form of this command to disable remote logging.
logging syslog A.B.C.D
no logging syslog
Syntax Description
A.B.C.D
|
The IP address of the syslog host to be used for remote logging.
|
Defaults
Remote logging is disabled by default.
Command Modes
Administrator.
Command History
Release
|
Modification
|
2.3.1
|
This command was introduced for the SN 5428.
|
3.2.1
|
This command was introduced for the SN 5428-2.
|
Usage Guidelines
This command identifies a remote syslog host to receive storage router event messages.
•
Use the logging level command with the destination keyword rslog to configure the messages to be logged to the remote host.
•
Use the no logging syslog command to disable remote logging.
•
Use the delete logging command to remove specific logging table entries.
•
Use the show logging command to display the status of remote logging and the IP address of the remote syslog server.
Examples
The following example identifies the IP address of the remote syslog host as 10.1.1.144 and adds a entry to the logging table to route all emergency level messages to that remote host.
[SN5428-2A]# logging syslog 10.1.1.144
[SN5428-2A]# logging level emergency from all to rslog
Related Commands
Command
|
Description
|
clear logging table
|
Clear the storage router logging table of all entries, or to reset the table to factory defaults.
|
delete logging
|
Delete a rule from the logging table.
|
logging #?
|
Insert a routing rule entry into the storage router logging table.
|
logging level
|
Add rule entries to route storage router event, debug and trace messages to various destinations based on facility and notification level.
|
logging on
|
Enable or temporarily disable logging of storage router event message.
|
save all
|
Save all configuration information, including the remote logging configuration.
|
save system
|
Save selected system configuration information, including remote logging information.
|
show logging
|
Display the routing rules in the logging table and the contents of the storage router log file.
|
show system
|
Display selected system information.
|
logout
To terminate the current CLI management session, use the logout command.
logout
Syntax Description
This command has no arguments or keywords.
Defaults
None.
Command Modes
Administrator or Monitor.
Command History
Release
|
Modification
|
2.2.1
|
This command was introduced for the SN 5428.
|
3.2.1
|
This command was introduced for the SN 5428-2.
|
Usage Guidelines
•
If you are connected to the storage router in Administrator mode or Monitor mode via a Telnet or SSH session, the logout command terminates the CLI management session. No CLI commands can be issued until you log in again.
•
If you are connected to the storage router in Administrator mode via the console interface, the logout command returns the session to Monitor mode (like the exit command).
•
If you are connected to the storage router in Monitor mode via the console interface, the logout command has no effect. If console passwords are enabled, you are immediately prompted for the Monitor mode password.
Related Commands
Command
|
Description
|
enable
|
Enter Administrator mode.
|
exit
|
Leave Administrator mode and enter Monitor mode.
|