1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
23 HREF="net-snmp-ecos-port.html"><LINK
25 TITLE="Configuring eCos"
26 HREF="net-snmp-configuring-ecos.html"><LINK
28 TITLE="SNMP clients and package use"
29 HREF="net-snmp-clients-and-package-use.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-snmp-configuring-ecos.html"
65 >Chapter 47. SNMP for <SPAN
77 HREF="net-snmp-clients-and-package-use.html"
91 NAME="NET-SNMP-TEST-CASES">Test cases</H1
93 >Currently only one test program is provided which uses SNMP.</P
95 >"snmpping" in the SNMP agent package runs the ping test from
96 the TCPIP package, with the snmpd running also. This allows you
97 to interrogate it using host tools of your choice. It supports MIBs
98 as documented above, so eg. <B
108 Linux/UNIX should have the desired effect.</P
110 >For serious testing, you should increase the length of time
111 the test runs by setting CYGNUM_SNMPAGENT_TESTS_ITERATIONS
112 to something big (e.g., 999999). Build the test
115 >make -C net/snmp/agent/current tests</B
117 and run it on the target.</P
119 >Then start several jobs, some for pinging the board (to make
120 the stats change) and some for interrogating the snmpd. Set $IP
121 to whatever IP address the board has:</P
129 CLASS="PROGRAMLISTING"
130 ># in a root shell, for flood ping
133 ping -f -c 3001 $IP
135 ping -c 32 -s 2345 $IP
147 CLASS="PROGRAMLISTING"
148 ># have more than one of these going at once
151 snmpwalk -OS $IP public
158 >Leave to run for a couple of days or so to test stability.</P
160 >The test program can also test snmpd.conf support. It tries to build a minimal
161 snmpd.conf file on a RAM filesystem and passes it to the snmp sub-system. With
162 this profile on target, the following snmp[cmd] (cmd=walk, get, set) should
171 CLASS="PROGRAMLISTING"
172 >snmp[cmd] -v1 $IP crux $OID
173 snmp[cmd] -v2 $IP crux $OID
174 snmp[cmd] -v3 $IP -u root -L noAuthNoPriv $OID
175 snmp[cmd] -v3 $IP -u root -L authNoPriv -A MD5 -a md5passwd $OID</PRE
180 >The following commands would however fail since they violate the access model :</P
188 CLASS="PROGRAMLISTING"
189 >snmp[cmd] $IP public $OID
190 snmp[cmd] -v1 $IP public $OID
191 snmp[cmd] -v2c $IP public $OID
192 snmp[cmd] -v3 $IP -u no_user -L noAuthNoPriv $OID
193 snmp[cmd] -v3 $IP -u root -L authNoPriv -A MD5 -a badpasswd $OID</PRE
203 SUMMARY="Footer navigation table"
214 HREF="net-snmp-configuring-ecos.html"
232 HREF="net-snmp-clients-and-package-use.html"
242 >Configuring eCos</TD
248 HREF="net-snmp-ecos-port.html"
256 >SNMP clients and package use</TD