文檔 標題: 如何實現 Cisco事件記錄到HP-UX 主機上 作為根登錄到希望的日志 服務器 上。 # cd /etc # vi syslog.conf 用 vi 在syslog.conf中增加下面一行 local7.de bug /var/adm/syslog/cisco.log esc :wq! (指定的路徑可以是任意路徑,只要是您希望存放日
文檔
標題: 如何實現 Cisco事件記錄到HP-UX 主機上
作為根登錄到希望的日志
服務器上。
# cd /etc
# vi syslog.conf
用 vi 在syslog.conf中增加下面一行
local7.de
bug /var/adm/syslog/cisco.log
esc :wq!
(指定的路徑可以是任意路徑,只要是您希望存放日志的目錄)
# touch /var/adm/syslog/cisco.log
# chmod 666 /var/adm/syslog/cisco.log
Now you need to kill and restart syslogd
# ps -eaf | grep syslogd
root 470 1 0 Apr 13 ? 0:01 /usr/sbin/syslogd -D
# kill 470
# pwd
/etc
# syslogd
# ps -eaf | grep syslogd
root 27159 1 0 14:21:00 ? 0:00 syslogd
在啟用模式下登錄到Cisco 路由器上
conf t
logging 10.1.1.1
logging trap
(10.1.1.1 只是一個地址示例,請使用您希望存放日志的系統的IP地址)
ctrl z
write mem
您應當重新登錄到您的unix 系統上。
# more /var/adm/syslog/cisco.log
May 1 14:24:54 hpas5200a 2726: .May 1 14:25:21: %SYS-5-CONFIG_I: Configured
from console by vty0 (156.152.8.134)
#
.........following with all English text ....
Cisco Event Logging to an HP-UX Host
Updated: 20000113
DOCUMENT
Title: How do I turn on Cisco Event Logging to an HPUX Host
===========================================================
Login to your intended log server as root.
# cd /etc
# vi syslog.conf
using vi add this line to syslog.conf
local7.debug /var/adm/syslog/cisco.log
esc :wq!
(the path specified can be any path as long as thats where you want the log
to be)
# touch /var/adm/syslog/cisco.log
# chmod 666 /var/adm/syslog/cisco.log
Now you need to kill and restart syslogd
# ps -eaf | grep syslogd
root 470 1 0 Apr 13 ? 0:01 /usr/sbin/syslogd -D
# kill 470
# pwd
/etc
# syslogd
# ps -eaf | grep syslogd
root 27159 1 0 14:21:00 ? 0:00 syslogd
Log into your Cisco router in enable mode
conf t
logging 10.1.1.1
logging trap
(10.1.1.1 is just an example address.. use the IP address of the system you
intend to log to)
ctrl z
write mem
You should be able to log back into your unix system,
# more /var/adm/syslog/cisco.log
May 1 14:24:54 hpas5200a 2726: .May 1 14:25:21: %SYS-5-CONFIG_I: Configured
from console by vty0 (156.152.8.134)
#