ucd-snmp »ç¿ëÇϱâ
ÀúÀÚ: ÀÌÁ¾Çõ(Internet Management Technology Lab, Sungkyunkwan University. webmaster at hurryon.org)
¸ñÂ÷
1. ucd-snmp ¼Ò °³ ¶¸Á°ü¸® ÇÁ·ÎÅäÄÝÀÎ snmpÀ» ÀÌ¿ëÇÒ¼ö ÀÖµµ·Ï ÇØÁÖ´Â °ø°³ ¼ÒÇÁÆ®¿þ¾îÀÌ´Ù. ucd-snmp ´Â ÇöÀç ¹öÀü 5´ë·Î ¿Ã¶ó°¡¸é¼ ÇÁ·ÎÁ§Æ®ÀÇ À̸§À» net-snmp ·Î º¯°æÇÑ »óÅÂÀÌ´Ù. ÀϹÝÀûÀ¸·Î ¸¹ÀÌ »ç¿ëµÇ°í ÀÖ´Â ucd-snmpÀÇ ¹öÀüÀº 4´ëÀÌ´Ù.
3. ucd-snmp ¼³ Á¤ ¶/usr/local/share/snmp/snmpd.conf
com2sec local localhost private com2sec mynetwork 192.168.119.128/29 public sysservices 76 syslocation skku syscontact leejonghyouk <webmaster@hurryon.org> 4.1. ¶óÀ̺귯¸® ÀÌ¿ëÇϱ⠶-I/usr/local/include/ucd-snmp -lsnmp -lcrypto ¿É¼ÇÀ» ºÙ¿©¼ ÄÄÆÄÀÏÇØ¾ß ÇÑ´Ù.
4.2.1. snmptest ¶snmptest ¸í·É¾îÀ» ÀÌ¿ëÇÏ¿© Á¦´ë·Î ¼³Ä¡°¡ µÇ¾ú´ÂÁö Å×½ºÆ®ÇØ º¼¼ö ÀÖ´Ù.
[root@note snmp]# snmptest 192.168.119.128 public Variable: system.sysDescr.0 Variable: system.sysName.0 Variable: Received Get Response from 192.168.119.128 requestid 0x456B696C errstat 0x0 errindex 0x0 system.sysDescr.0 = Linux note.wmware.org 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 system.sysName.0 = note.wmware.org Variable: [root@note snmp]# 4.2.2. snmpget ¶snmpget ¸í·É¾î´Â ¸í·É¾î À̸§¿¡¼ ¾Ë¼ö ÀÖµíÀÌ ¿¡ÀÌÀüÆ®·ÎºÎÅÍ Á¤º¸À» ¾ò¾î ¿À´Âµ¥ »ç¿ëµÇ´Â ¸í·É¾î ÀÖ´Ù. ÀÎÀÚ°ªÀ¸·Î MIBÀÇ °èÃþÀ̸§À̳ª OID ¹øÈ£À» ³ÖÀ»¼ö ÀÖ´Ù. snmpget ¸í·É¾î´Â snmp getÀÇ ±â´ÉÀ» ±¸ÇöÇÑ ¸í·É¾îÀ̱⠶§¹®¿¡ ÇÏÀ§ °èÃþÀÇ Á¤º¸´Â °¡Á® ¿ÀÁö ¾Ê´Â´Ù.
[root@note bin]# snmpget localhost public system.sysDescr.0 system.sysDescr.0 = Linux note.wmware.org 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 [root@note bin]# snmpget localhost public 1.1.0 system.sysDescr.0 = Linux note.wmware.org 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 [root@note bin]# snmpget localhost public 1.2.0 system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux [root@note bin]# snmpget localhost public 1.3.0 system.sysUpTime.0 = Timeticks: (837696) 2:19:36.96 [root@note bin]# snmpget localhost public 1.4.0 system.sysContact.0 = root@ [root@note bin]# snmpget localhost public 1.5.0 system.sysName.0 = note.wmware.org [root@note bin]# snmpget localhost public 1.6.0 system.sysLocation.0 = Unknown [root@note bin]# snmpget localhost public 1.7.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysServices.0 [root@note bin]# snmpget localhost public 1.8.0 system.sysORLastChange.0 = Timeticks: (1) 0:00:00.01 [root@note bin]# snmpget localhost public 1.9.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysORTable.0 [root@note bin]# snmpget localhost public 1.10.0 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.10.0 [root@note bin]# 4.2.3. snmpgetnext ¶snmpgetnext ¸í·É¾î´Â snmp nextÀÇ ±â´ÉÀ» ±¸ÇöÇÑ ¸í·É¾îÀÌ´Ù. ÇÏÁö¸¸ ÇÏÀ§ °èÃþÀÇ Á¤º¸À» ¸ðµÎ °¡Á® ¿À´Â°ÍÀÌ ¾Æ´Ï¶ó ¹Ù·Î ´ÙÀ½ °èÃþÀÇ Á¤º¸À» °¡Á®¿À°Ô µÈ´Ù. °á·ÐÀûÀ¸·Î 1°³ÀÇ Á¤º¸À» °¡Á®¿À°Ô µÇ´Â°ÍÀÌ´Ù. ¿¹À» µé¾î system.sysDescr.0 ¿¡ ´ëÇÑ Á¤º¸À» ¿äûÇϸé ÇÏÀ§ °èÃþÀÇ Á¤º¸ÀÎ system.sysObjectID.0 ÀÇ Á¤º¸À» °¡Á® ¿Â´Ù.
[root@note bin]# snmpgetnext localhost public 1.1.0 system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux 4.2.4. snmpwalk ¶snmpwalk ¸í·É¾îµµ snmp nextÀÇ ±â´ÉÀ» ±¸ÇöÇÑ ¸í·É¾î·Î ÇÏÀ§ °èÃþÀÇ Á¤º¸À» ¸ðµÎ °¡Á® ¿Â´Ù. -Of ¿É¼ÇÀº Full OID output -On ¿É¼ÇÀº OID number output ÀÌ´Ù.
[root@note bin]# snmpwalk localhost public 1 system.sysDescr.0 = Linux note.wmware.org 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux system.sysUpTime.0 = Timeticks: (47405) 0:07:54.05 system.sysContact.0 = root@ system.sysName.0 = note.wmware.org system.sysLocation.0 = Unknown system.sysORLastChange.0 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORID.1 = OID: ifMIB system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB system.sysORTable.sysOREntry.sysORID.3 = OID: tcpMIB system.sysORTable.sysOREntry.sysORID.4 = OID: ip system.sysORTable.sysOREntry.sysORID.5 = OID: udpMIB system.sysORTable.sysOREntry.sysORID.6 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup system.sysORTable.sysOREntry.sysORID.7 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance system.sysORTable.sysOREntry.sysORID.8 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance system.sysORTable.sysOREntry.sysORID.9 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance system.sysORTable.sysOREntry.sysORDescr.1 = The MIB module to describe generic objects for network interface sub-layers system.sysORTable.sysOREntry.sysORDescr.2 = The MIB module for SNMPv2 entities system.sysORTable.sysOREntry.sysORDescr.3 = The MIB module for managing TCP implementations system.sysORTable.sysOREntry.sysORDescr.4 = The MIB module for managing IP and ICMP implementations system.sysORTable.sysOREntry.sysORDescr.5 = The MIB module for managing UDP implementations system.sysORTable.sysOREntry.sysORDescr.6 = View-based Access Control Model for SNMP. system.sysORTable.sysOREntry.sysORDescr.7 = The SNMP Management Architecture MIB. system.sysORTable.sysOREntry.sysORDescr.8 = The MIB for Message Processing and Dispatching. system.sysORTable.sysOREntry.sysORDescr.9 = The management information definitions for the SNMP User-based Security Model. system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.2 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.3 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.4 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.5 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.6 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.7 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.8 = Timeticks: (0) 0:00:00.00 system.sysORTable.sysOREntry.sysORUpTime.9 = Timeticks: (0) 0:00:00.00 [root@note snmp]# snmpwalk -Of localhost private memory .iso.org.dod.internet.private.enterprises.ucdavis.memory.memIndex.0 = 0 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memErrorName.0 = swap .iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalSwap.0 = 264560 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memAvailSwap.0 = 261656 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalReal.0 = 191272 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memAvailReal.0 = 13140 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalFree.0 = 274796 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memMinimumSwap.0 = 16000 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memShared.0 = 0 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memBuffer.0 = 28148 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memCached.0 = 129248 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memSwapError.0 = 0 .iso.org.dod.internet.private.enterprises.ucdavis.memory.memSwapErrorMsg.0 = [root@note snmp]# snmpwalk -On localhost private memory .1.3.6.1.4.1.2021.4.1.0 = 0 .1.3.6.1.4.1.2021.4.2.0 = swap .1.3.6.1.4.1.2021.4.3.0 = 264560 .1.3.6.1.4.1.2021.4.4.0 = 261656 .1.3.6.1.4.1.2021.4.5.0 = 191272 .1.3.6.1.4.1.2021.4.6.0 = 13132 .1.3.6.1.4.1.2021.4.11.0 = 274788 .1.3.6.1.4.1.2021.4.12.0 = 16000 .1.3.6.1.4.1.2021.4.13.0 = 0 .1.3.6.1.4.1.2021.4.14.0 = 28152 .1.3.6.1.4.1.2021.4.15.0 = 129248 .1.3.6.1.4.1.2021.4.100.0 = 0 .1.3.6.1.4.1.2021.4.101.0 = [root@note snmp]# 5.1. ½Ã½ºÅÛÀÇ »óÅÂÀ» È®ÀÎÇϱâ À§ÇØ »ç¿ëµÇ´Â OID ¶
5.2. ÀÎÅÍÆäÀ̽º Ä«µå¿Í °ü·ÃµÈ OID ¶6.3. ¿øº» ¹®¼ ¶ |
Executive ability is prominent in your make-up. |