OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [net-snmp-test-cases.html] - Blame information for rev 28

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- 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.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Test cases</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="SNMP for eCos"
23
HREF="net-snmp-ecos-port.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Configuring eCos"
26
HREF="net-snmp-configuring-ecos.html"><LINK
27
REL="NEXT"
28
TITLE="SNMP clients and package use"
29
HREF="net-snmp-clients-and-package-use.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="net-snmp-configuring-ecos.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 47. SNMP for <SPAN
66
CLASS="emphasis"
67
><I
68
CLASS="EMPHASIS"
69
>eCos</I
70
></SPAN
71
></TD
72
><TD
73
WIDTH="10%"
74
ALIGN="right"
75
VALIGN="bottom"
76
><A
77
HREF="net-snmp-clients-and-package-use.html"
78
ACCESSKEY="N"
79
>Next</A
80
></TD
81
></TR
82
></TABLE
83
><HR
84
ALIGN="LEFT"
85
WIDTH="100%"></DIV
86
><DIV
87
CLASS="SECT1"
88
><H1
89
CLASS="SECT1"
90
><A
91
NAME="NET-SNMP-TEST-CASES">Test cases</H1
92
><P
93
>Currently only one test program is provided which uses SNMP.</P
94
><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
99
CLASS="COMMAND"
100
>snmpwalk
101
<TT
102
CLASS="REPLACEABLE"
103
><I
104
>&lt;hostname&gt;</I
105
></TT
106
> public dot3</B
107
> under
108
Linux/UNIX should have the desired effect.</P
109
><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
113
(<B
114
CLASS="COMMAND"
115
>make -C net/snmp/agent/current tests</B
116
>)
117
and run it on the target.</P
118
><P
119
>Then start several jobs, some for pinging the board (to make
120
the stats change) and some for interrogating the snmpd. Set &#0036;IP
121
to whatever IP address the board has:</P
122
><TABLE
123
BORDER="5"
124
BGCOLOR="#E0E0F0"
125
WIDTH="70%"
126
><TR
127
><TD
128
><PRE
129
CLASS="PROGRAMLISTING"
130
># in a root shell, for flood ping
131
while(1)
132
date
133
ping -f -c 3001 &#0036;IP
134
sleep 5
135
ping -c 32 -s 2345 &#0036;IP
136
end</PRE
137
></TD
138
></TR
139
></TABLE
140
><TABLE
141
BORDER="5"
142
BGCOLOR="#E0E0F0"
143
WIDTH="70%"
144
><TR
145
><TD
146
><PRE
147
CLASS="PROGRAMLISTING"
148
># have more than one of these going at once
149
setenv MIBS all
150
while (1)
151
snmpwalk -OS &#0036;IP  public
152
date
153
end</PRE
154
></TD
155
></TR
156
></TABLE
157
><P
158
>Leave to run for a couple of days or so to test stability.</P
159
><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
163
work :</P
164
><TABLE
165
BORDER="5"
166
BGCOLOR="#E0E0F0"
167
WIDTH="70%"
168
><TR
169
><TD
170
><PRE
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
176
></TD
177
></TR
178
></TABLE
179
><P
180
>The following commands would however fail since they violate the access model :</P
181
><TABLE
182
BORDER="5"
183
BGCOLOR="#E0E0F0"
184
WIDTH="70%"
185
><TR
186
><TD
187
><PRE
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
194
></TD
195
></TR
196
></TABLE
197
></DIV
198
><DIV
199
CLASS="NAVFOOTER"
200
><HR
201
ALIGN="LEFT"
202
WIDTH="100%"><TABLE
203
SUMMARY="Footer navigation table"
204
WIDTH="100%"
205
BORDER="0"
206
CELLPADDING="0"
207
CELLSPACING="0"
208
><TR
209
><TD
210
WIDTH="33%"
211
ALIGN="left"
212
VALIGN="top"
213
><A
214
HREF="net-snmp-configuring-ecos.html"
215
ACCESSKEY="P"
216
>Prev</A
217
></TD
218
><TD
219
WIDTH="34%"
220
ALIGN="center"
221
VALIGN="top"
222
><A
223
HREF="ecos-ref.html"
224
ACCESSKEY="H"
225
>Home</A
226
></TD
227
><TD
228
WIDTH="33%"
229
ALIGN="right"
230
VALIGN="top"
231
><A
232
HREF="net-snmp-clients-and-package-use.html"
233
ACCESSKEY="N"
234
>Next</A
235
></TD
236
></TR
237
><TR
238
><TD
239
WIDTH="33%"
240
ALIGN="left"
241
VALIGN="top"
242
>Configuring eCos</TD
243
><TD
244
WIDTH="34%"
245
ALIGN="center"
246
VALIGN="top"
247
><A
248
HREF="net-snmp-ecos-port.html"
249
ACCESSKEY="U"
250
>Up</A
251
></TD
252
><TD
253
WIDTH="33%"
254
ALIGN="right"
255
VALIGN="top"
256
>SNMP clients and package use</TD
257
></TR
258
></TABLE
259
></DIV
260
></BODY
261
></HTML
262
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.