We are having trouble with the snmpwalk truncating output to 100 lines
when using the
"extend" or the "exec" facility. Looks like I am missing something in
the setup ?
Greatly appreciate if someone can point out troubleshooting tips..
Platform: SuSE 10.1
net-snmp: net-snmp-5.3.0.1-25.5
#grep extend /etc/snmp/snmpd.conf
extend .1.3.6.1.4.1.26579.1.2.4 testextend /tmp/test.sh
#cat /tmp/test.sh
#!/bin/sh
counter=120
i=0
while [ $i -le $counter ]
do
echo line$i
i=`expr $i + 1`;
done
# snmpwalk -v2c -c public localhost .1.3.6.1.4.1.26579.1.2.4
SNMPv2-SMI::enterprises.26579.1.2.4.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.2.10.116.101.115.116.101.120.116
.101.110.100 = STRING: "/tmp/test.sh"
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.3.10.116.101.115.116.101.120.116
.101.110.100 = ""
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.4.10.116.101.115.116.101.120.116
.101.110.100 = ""
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.5.10.116.101.115.116.101.120.116
.101.110.100 = INTEGER: 5
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.6.10.116.101.115.116.101.120.116
.101.110.100 = INTEGER: 1
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.7.10.116.101.115.116.101.120.116
.101.110.100 = INTEGER: 1
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.20.10.116.101.115.116.101.120.11
6.101.110.100 = INTEGER: 4
SNMPv2-SMI::enterprises.26579.1.2.4.2.1.21.10.116.101.115.116.101.120.11
6.101.110.100 = INTEGER: 1
SNMPv2-SMI::enterprises.26579.1.2.4.3.1.1.10.116.101.115.116.101.120.116
.101.110.100 = STRING: "line0"
SNMPv2-SMI::enterprises.26579.1.2.4.3.1.2.10.116.101.115.116.101.120.116
.101.110.100 = STRING: "line0
line1
line2
line3
line4
line5
line6
line7
line8
line9
line10
line11
line12
line13
line14
line15
line16
line17
line18
line19
line20
line21
line22
line23
line24
line25
line26
line27
line28
line29
line30
line31
line32
line33
line34
line35
line36
line37
line38
line39
line40
line41
line42
line43
line44
line45
line46
line47
line48
line49
line50
line51
line52
line53
line54
line55
line56
line57
line58
line59
line60
line61
line62
line63
line64
line65
line66
line67
line68
line69
line70
line71
line72
line73
line74
line75
line76
line77
line78
line79
line80
line81
line82
line83
line84
line85
line86
line87
line88
line89
line90
line91
line92
line93
line94
line95
line96
line97
line98
line99"
SNMPv2-SMI::enterprises.26579.1.2.4.3.1.3.10.116.101.115.116.101.120.116
.101.110.100 = INTEGER: 100
SNMPv2-SMI::enterprises.26579.1.2.4.3.1.4.10.116.101.115.116.101.120.116
.101.110.100 = INTEGER: 0
#
The script itself produces 120 lines
# /tmp/test.sh | wc -l
121
#
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Problem confirmed.
I'll have a look at this on the train tonight (assuming I get a seat!)
and report back tomorrow.
Dave
RKK> We are having trouble with the snmpwalk truncating output to 100
RKK> lines when using the "extend" or the "exec" facility. Looks like
RKK> I am missing something in the setup ?
That's a hard coded limit you're hitting as the exec/extend stuff was
designed for fairly short scripts (during a time period where
memory/cpu-power was more expensive too). If you want to change that,
you'll have to manually edit the include/net-snmp/net-snmp-config.h
file to change the following definition:
#define MAXREADCOUNT 100 /* max times to loop reading output from execs. */
Now days, that should be run-time configurable but it dates back to
code written before configuration files were in place.
--
Wes Hardaker
Sparta, Inc.
I have access to test Suse system, so feel free to fire test cases away
and I can help you out.
rajeev
> -----Original Message-----
> From: dave....@googlemail.com
> [mailto:dave....@googlemail.com] On Behalf Of Dave Shield
> Sent: Wednesday, May 09, 2007 11:45 AM
> To: Karamchedu, Rajeev K.
> Cc: net-snm...@lists.sourceforge.net
> Subject: Re: snmpwalk truncated output with "extend" or "exec"
>
> On 09/05/07, Karamchedu, Rajeev K. <raj...@jcvi.org> wrote:
> > We are having trouble with the snmpwalk truncating output
> to 100 lines
> > when using the "extend" or the "exec" facility.
>
> Problem confirmed.
> I'll have a look at this on the train tonight (assuming I get
> a seat!) and report back tomorrow.
>
> Dave
>
-------------------------------------------------------------------------
Would it apply to "extend" also ?
> -----Original Message-----
> From: Wes Hardaker [mailto:hard...@users.sourceforge.net]
> Sent: Wednesday, May 09, 2007 12:41 PM
> To: Karamchedu, Rajeev K.
> Cc: net-snm...@lists.sourceforge.net
> Subject: Re: snmpwalk truncated output with "extend" or "exec"
>
> >>>>> "RKK" == Rajeev K Karamchedu <Karamchedu> writes:
>
> RKK> We are having trouble with the snmpwalk truncating output to 100
> RKK> lines when using the "extend" or the "exec" facility.
> Looks like I
> RKK> am missing something in the setup ?
>
> That's a hard coded limit you're hitting as the exec/extend
> stuff was designed for fairly short scripts (during a time
> period where memory/cpu-power was more expensive too). If
> you want to change that, you'll have to manually edit the
> include/net-snmp/net-snmp-config.h
> file to change the following definition:
>
> #define MAXREADCOUNT 100 /* max times to loop reading
> output from execs. */
>
> Now days, that should be run-time configurable but it dates
> back to code written before configuration files were in place.
> --
> Wes Hardaker
> Sparta, Inc.
>
-------------------------------------------------------------------------
>> #define MAXREADCOUNT 100 /* max times to loop reading output from
RKK> execs. */
RKK> Would it apply to "extend" also ?
Yep. It actually applies to all the code that uses that particular
function to capture data from.