如何实现Cisco事件记录到HP-UX主机

发表于:2007-07-04来源:作者:点击数: 标签:
文档 标题: 如何实现 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.debug /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)
  
  #
  

原文转自:http://www.ltesting.net