linux log中大量 Received SNMP packet(s) from UDP
rh系列的機器
radhat、fedora、rhel、centos等
系統自帶的snmpd是會預設往syslogd裡打log的
而且遺憾的是:預設的log級別是debug
所以
如果你開著snmpd
然後還有機器來連snmpd埠(mrtg、cacti等多半如此)
你會發現/var/log/messages裡充斥著大堆的無用資訊
像這樣:
Nov 2 04:17:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:50841
Nov 2 04:17:21 sohu snmpd[1748]: Received SNMP packet(s) from UDP: [127.0.0.1]:50841
Nov 2 04:17:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:50841
Nov 2 04:22:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:51720
Nov 2 04:22:21 sohu snmpd[1748]: Received SNMP packet(s) from UDP: [127.0.0.1]:51720
Nov 2 04:22:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:51720
Nov 2 04:27:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:52622
Nov 2 04:27:21 sohu snmpd[1748]: Received SNMP packet(s) from UDP: [127.0.0.1]:52622
Nov 2 04:27:21 sohu snmpd[1748]: Connection from UDP: [127.0.0.1]:52622
這樣一來
就有可能將有用的重要的log資訊給沖掉
解決辦法如下:
編輯一個檔案/etc/snmp/snmpd.options(這個檔案是在snmp的啟動指令碼/etc/rc.d/init.d/snmpd裡啟動時會去讀的)
內容如下:
OPTIONS=”-LS 2 d -Lf /dev/null -p /var/run/snmpd.pid -a”
然後再重起snmpd
/etc/rc.d/init.d/snmpd restart
這樣一來
就將snmpd預設的log級別debug改成了2
再看/var/log/messages
裡面再也沒有snmpd的廢話了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-629549/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 消除linux log中的大量Received SNMP packet(s) from UDPLinuxUDP
- Linux Log中大量snmpd[10932]: Received SNMP packet(s) from UDP[final]LinuxUDP
- 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
- 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
- oldwain's blogAI
- biti's blog
- Linux-使用snmp監控郵件佇列Linux佇列
- 使用 SNMP 和 Cacti 監控 Linux 伺服器Linux伺服器
- 使用SNMP來監控Linux伺服器(zt)Linux伺服器
- rac2節點上配置iscsi 遇到iscsiadm: failing authentication, received incorrect username from targetAI
- SNMP協議協議
- snmp安裝
- SNMP 協議協議
- Linux中RM快速刪除大量檔案/資料夾方法Linux
- Linux| |對於UDP的學習LinuxUDP
- Linux From Scratch(介紹)Linux
- SQLite中的FROM子句SQLite
- Got fatal error 1236 from master when reading data from binary logGoErrorAST
- golang 使用 iota from cnblogser ghj1976GolangGse
- Slave failed to initialize relay log info structure from the repositoryAIStruct
- Snmp學習總結(二)——WinXP安裝和配置SNMP
- Snmp學習總結(七)——SNMP4J介紹