Porting NET-SNMP to the Development Board (MINI210)

Source: Internet
Author: User
Tags snmp snmpwalk

1. Install the cross-compilation tool ARM-LINUX-GCC

2. Download NET-SNMP Source installation package

3. Unzip the installation package

4../configure--build=i686-linux--host=arm-linux CC=ARM-LINUX-GCC--with-endianness=little--enable-mini-agent-- With-install-prefix=/usr/local/snmp_arm_install--with-ar=arm-linux-ar ldflags= "-static"--disable-embedded-perl- -without-perl-modules specifically to add or remove the view./configure--help

5.make compiled source code

6.make Install

7. Move example.conf to Intstall_dir/usr/local/share/snmp (Install_dir is the specified installation path) for snmpd.conf, modify snmpd.conf

# Sec.name Source Community

Com2sec local localhost COMMUNITY

Com2sec mynetwork network/24 COMMUNITY

Switch

# Sec.name Source Community

#com2sec local localhost COMMUNITY

Com2sec mynetwork 210.38.235.173 Public

Where 210.38.235.173 is the IP of the Development Board

8. Before the transplant, determine SNMPD (Install_dir/usr/local/sbin), SNMPD (INSTALL_DIR/USR/LOCAL/SHARE/SNMP), MIBs (install_dir/usr/local/ SHARE/SNMP), Snmpwalk and other commands (Install_dir/usr/local/bin) exist

Compress commands such as Snmpd,snmpwalk with the Arm-linux-strip command before porting

9. Copy the Snmpd,snmpwalk to the Development Board/usr/bin, snmpd.conf and MiB folder and folder contents to the Development Board/usr/local/share/snmp/

No folders created by yourself, note using chmod 777 Snmpd,snmpwalk

10. Running snmpd-cc/usr/local/share/snmp/snmpd.conf

If snmpd:error while loading shared libraries:libgcc_s.so.1:cannot open Shared object file:no such file or directory class The library file above the computer to the/lib directory of the Development Board.

11.ps-w|grep SNMP to see if SNMPD is running successfully

12. Test the Snmpwalk command

[Email protected] snmp]# Snmpwalk-c public-v 2c 210.38.235.173
snmpv2-mib::sysdescr.0 = String:linux friendlyarm 3.0.8-friendlyarm #1 PREEMPT Sun Jul 6 20:51:22 EDT armv7l
snmpv2-mib::sysobjectid.0 = oid:snmpv2-smi::enterprises.8072.3.2.10
snmpv2-mib::sysuptime.0 = timeticks: (4243) 0:00:42.43
snmpv2-mib::syscontact.0 = string:g. S. Marzot <[email protected]>
snmpv2-mib::sysname.0 = String:friendlyarm
snmpv2-mib::syslocation.0 = String:unknown
snmpv2-mib::sysorlastchange.0 = Timeticks: (0) 0:00:00.00
Snmpv2-mib::sysorid.1 = Oid:snmpv2-mib::snmpmib
Snmpv2-mib::sysorid.2 = Oid:snmp-view-based-acm-mib::vacmbasicgroup
Snmpv2-mib::sysorid.3 = Oid:snmp-mpd-mib::snmpmpdcompliance
Snmpv2-mib::sysorid.4 = Oid:snmp-user-based-sm-mib::usmmibcompliance
Snmpv2-mib::sysorid.5 = Oid:snmp-framework-mib::snmpframeworkmibcompliance
Snmpv2-mib::sysordescr.1 = string:the MIB module for SNMPV2 entities
Snmpv2-mib::sysordescr.2 = string:view-based Access Control Model for SNMP.
SNMPV2-MIB::SYSORDESCR.3 = string:the MIB for Message processing and dispatching.
SNMPV2-MIB::SYSORDESCR.4 = string:the Management Information definitions for the SNMP user-based Security Model.
SNMPV2-MIB::SYSORDESCR.5 = string:the SNMP Management Architecture MIB.
Snmpv2-mib::sysoruptime.1 = Timeticks: (0) 0:00:00.00
SNMPV2-MIB::SYSORUPTIME.2 = Timeticks: (0) 0:00:00.00
Snmpv2-mib::sysoruptime.3 = Timeticks: (0) 0:00:00.00
snmpv2-mib::sysoruptime.4 = Timeticks: (0) 0:00:00.00
snmpv2-mib::sysoruptime.5 = Timeticks: (0) 0:00:00.00
snmpv2-mib::snmpinpkts.0 = counter32:23
snmpv2-mib::snmpoutpkts.0 = counter32:23
snmpv2-mib::snmpinbadversions.0 = counter32:0
snmpv2-mib::snmpinbadcommunitynames.0 = counter32:0
snmpv2-mib::snmpinbadcommunityuses.0 = counter32:0
snmpv2-mib::snmpinasnparseerrs.0 = counter32:0
snmpv2-mib::snmpintoobigs.0 = counter32:0
snmpv2-mib::snmpinnosuchnames.0 = counter32:0
snmpv2-mib::snmpinbadvalues.0 = counter32:0
snmpv2-mib::snmpinreadonlys.0 = counter32:0
snmpv2-mib::snmpingenerrs.0 = counter32:0
snmpv2-mib::snmpintotalreqvars.0 = counter32:33
snmpv2-mib::snmpintotalsetvars.0 = counter32:0
snmpv2-mib::snmpingetrequests.0 = counter32:0
snmpv2-mib::snmpingetnexts.0 = counter32:37
snmpv2-mib::snmpinsetrequests.0 = counter32:0
snmpv2-mib::snmpingetresponses.0 = counter32:0
snmpv2-mib::snmpintraps.0 = counter32:0
snmpv2-mib::snmpouttoobigs.0 = counter32:0
snmpv2-mib::snmpoutnosuchnames.0 = counter32:0
snmpv2-mib::snmpoutbadvalues.0 = counter32:0
snmpv2-mib::snmpoutgenerrs.0 = counter32:0
snmpv2-mib::snmpoutgetrequests.0 = counter32:0
snmpv2-mib::snmpoutgetnexts.0 = counter32:0
snmpv2-mib::snmpoutsetrequests.0 = counter32:0
snmpv2-mib::snmpoutgetresponses.0 = counter32:47
snmpv2-mib::snmpouttraps.0 = counter32:0
snmpv2-mib::snmpenableauthentraps.0 = integer:disabled (2)
snmpv2-mib::snmpsilentdrops.0 = counter32:0
snmpv2-mib::snmpproxydrops.0 = counter32:0

Okay, the transplant was successful.

Reference article: http://fajun1216.blog.163.com/blog/static/207405106201262104843794/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.