Linux Log中大量snmpd[10932]: Received SNMP packet(s) from UDP[final]
Linux AS 5.3 64bit, 核心 2.6.18-128.el5
RH系列的機器 , radhat、fedora、rhel、centos等, 系統自帶的snmpd是會預設往syslogd裡打log的
而且遺憾的是:預設的log級別是debug
所以如果你開著snmpd , 然後還有機器來連snmpd埠(mrtg、cacti等多半如此) , 你會發現/var/log/messages裡充斥著大堆的無用資訊 :
Log的各種級別 :
1 或 a —- LOG_ALERT,
2 或 c —- LOG_CRIT,
3 或 e —- LOG_ERR,
4 或 w —- LOG_WARNING,
5 或 n —- LOG_NOTICE,
6 或 i —- LOG_INFO,
7 或 d —- LOG_DEBUG.
Log中的大量無用資訊 :
Sep 12 04:03:03 dfmsrac01 syslogd 1.4.1: restart.
Sep 12 06:33:46 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45370
Sep 12 06:33:46 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45370
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45579
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45579
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45579
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45579
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45580
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45580
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45580
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45580
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45581
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45581
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45581
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45582
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45582
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45582
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45583
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45583
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45583
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45584
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Received SNMP packet(s) from UDP: [10.13.8.122]:45584
Sep 12 06:33:52 dfmsrac01 snmpd[10932]: Connection from UDP: [10.13.8.122]:45584
Sep 12 06:33:52 dfmsrac01 last message repeated 22 times
"messages" 227L, 18881C
這樣一來 , 就有可能將有用的重要的log資訊給沖掉
解決辦法如下: 編輯一個檔案/etc/snmp/snmpd.options(這個檔案是在snmp的啟動指令碼/etc/rc.d/init.d/snmpd裡啟動時會去讀的) 內容如下:
OPTIONS="-Ls2d -d -Lf /dev/null -p /var/run/snmpd.pid -a"
備註: 在Linux AS 5.3 中預設的snmpd.option 的路徑變成了 /etc/sysconfig/snmpd.options
或者修改為 :
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" 直接關閉
然後再重起snmpd , /etc/rc.d/init.d/snmpd stop , start 這樣一來
就將snmpd預設的log級別debug改成了2 , 再看/var/log/messages
裡面再也沒有snmpd的無用資訊了 。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-673743/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux log中大量 Received SNMP packet(s) from UDPLinuxUDP
- 消除linux log中的大量Received SNMP packet(s) from UDPLinuxUDP
- Slave: received 0 length packet from server, apparent master shutdownServerAPPAST
- MySQL報錯Slave: received end packet from server, apparent master shutdownMySqlServerAPPAST
- PostgreSQL DBA(140) - PG 12(Don't log incomplete startup packet if it's empty)SQL
- ORA-16198: LGWR received timedout error from KSRError
- Linux中的UDP通訊LinuxUDP
- ORA - 12502 TNS:listener received no CONNECT_DATA from clientclient
- From CORBA technology To Thrift technologyORB
- Catalog archivelog from file system to Asmdg;HiveASM
- Unknown initial character set index ‘255‘ received from server. Initial client character set can beIndexServerclient
- EM 12c Cloud Control - Agent Unreachable : Received Key Mismatch from OMS - 3Cloud
- EM 12c Cloud Control - Agent Unreachable : Received Key Mismatch from OMS - 2Cloud
- EM 12c Cloud Control - Agent Unreachable : Received Key Mismatch from OMS - 1Cloud
- 【Linux】Linux開啟snmp及查詢Linux
- Linux下SNMP的安裝配置Linux
- 修改WebLogic中Managed Server及Admin Server JVM大小 [final]WebServerJVM
- java中final類 跟final方法Java
- udp 500 D.O.S攻擊 (轉)UDP
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- What's new in C# from 2.0 to 5.0C#
- ACE中UDP通訊UDP
- Java中static、final、static final的區別Java
- Java中final與static final的區別Java
- oldwain's blogAI
- biti's blog
- java中的Static、final、Static final各種用法Java
- Linux-使用snmp監控郵件佇列Linux佇列
- 使用 SNMP 和 Cacti 監控 Linux 伺服器Linux伺服器
- 使用SNMP來監控Linux伺服器(zt)Linux伺服器
- rac2節點上配置iscsi 遇到iscsiadm: failing authentication, received incorrect username from targetAI
- SNMP協議協議
- snmp安裝
- SNMP 協議協議
- 常見Logical Standby異常處理[final]
- Oracle10g Supplemental Log(追加日誌) [final]Oracle
- 在Ubuntu 8.04安裝設定snmpd筆記Ubuntu筆記
- Linux中RM快速刪除大量檔案/資料夾方法Linux