- 论坛徽章:
- 0
|
请问在Cisco路由器里如何查看系统最后一次被修改是什么时候?
Logging Messages to a UNIX Syslog Server
To log messages to the syslog server host, use the logging router configuration command. The full syntax of this command follows:
logging ip-address
no logging ip-address
The logging command identifies a syslog server host to receive logging messages. The ip-address argument is the IP address of the host. By issuing this command more than once, you build a list of syslog servers that receive logging messages.
The no logging command deletes the syslog server with the specified address from the list of syslogs.
Limiting Messages to a Syslog Server
To limit how many messages are sent to the syslog servers, use the logging trap router configuration command. The full syntax of this command follows:
logging trap level
no logging trap
The logging trap command limits the logging messages sent to syslog servers to messages with a level up to and including the specified level argument. The level argument is one of the keywords listed in Table 1-1.
To send logging messages to a syslog server, specify its host address with the logging command.
The default trap level is informational.
The no logging trap command disables logging to syslog servers.
The current software generates four categories of syslog messages:
Error messages about software or hardware malfunctions, displayed at the errors level.
Interface up/down transitions and system restart messages, displayed at the notification level.
Reload requests and low-process stack messages, displayed at the informational level.
Output from the debug commands, displayed at the debugging level.
The privileged EXEC command show logging displays the addresses and levels associated with the current logging setup. The command output also includes ancillary statistics.
Example of Setting Up a UNIX Syslog Daemon
To set up the syslog daemon on a 4.3 BSD UNIX system, include a line such as the following in the file /etc/syslog.conf:
local7.debugging /usr/adm/logs/tiplog
The local7 keyword specifies the logging facility to be used.
The debugging keyword specifies the syslog level. See Table 1-1 for other keywords that can be listed.
The UNIX system sends messages at or above this level to the specified file, in this case /usr/adm/logs/tiplog. The file must already exist, and the syslog daemon must have permission to write to it.
For the System V UNIX systems, the line should read as follows:
local7.debug /usr/admin/logs/cisco.log |
|