Re: Problems to get DISMAN-PING-MIB results (Problem is resolved)

Madhan Merugu <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Charles,

I am also trying to compile DISMAN PING on RHEL4(2.6.9-78.0.13.ELsmp)  but
it fails with following error. Please let me know if you have any clue on
what is going wrong with ipv6hdr.

make[1]: Entering directory `/tmp/net-snmp-5.5/agent'
/bin/sh ../libtool  --mode=compile gcc -I../include -I. -I../agent
-I../agent/mibgroup -I../snmplib   -g -O2 -Ulinux -Dlinux=linux
-I/usr/include/rpm  -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE   -c -o snmp_vars.lo
snmp_vars.c
libtool: compile:  gcc -I../include -I. -I../agent -I../agent/mibgroup
-I../snmplib -g -O2 -Ulinux -Dlinux=linux -I/usr/include/rpm -D_REENTRANT
-D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE -c snmp_vars.c  -fPIC
-DPIC -o .libs/snmp_vars.o
In file included from ../agent/mibgroup/mib_module_includes.h:12,
                 from snmp_vars.c:151:
mibgroup/disman/ping/pingCtlTable.h:116:2: #error >."Please fix
<asm/byteorder.h>"
In file included from ../agent/mibgroup/mib_module_includes.h:12,
                 from snmp_vars.c:151:
mibgroup/disman/ping/pingCtlTable.h:120: syntax error before "__be16"
mibgroup/disman/ping/pingCtlTable.h:120: warning: no semicolon at end of
struct or union
mibgroup/disman/ping/pingCtlTable.h:126: syntax error before '}' token
make[1]: *** [snmp_vars.lo] Error 1
make[1]: Leaving directory `/tmp/net-snmp-5.5/agent'
make: *** [subdirs] Error 1

Thanks.
Madhan

On Tue, Sep 29, 2009 at 12:30 PM, Charles Liu
<[email protected]>wrote:

> Here are what I did to make DISMAN-PING-MIB to work under Net-SNMP
>
> (1) wget
> http://downloads.sourceforge.net/project/net-snmp/net-snmp/5.5/net-snmp-5.5.tar.gz?use_mirror=voxel
> (2) tar -xzvf net-snmp-5.5.tar.gz
> (3) cd net-snmp-5.5
> (4)
>
> #include <linux/in6.h>
> #include <linux/ipv6.h>
>
> //#include "in6.h"
> //#include "ipv6.h"
>
> /*
>  *>.IPv6 fixed header
>  *
>  *>.BEWARE, it is incorrect. The first 4 bits of flow_lbl
>  *>.are glued to priority now, forming "class".
>  */
>
> struct ipv6hdr {
> #if defined(__LITTLE_ENDIAN_BITFIELD)
>     __u8    priority:4,
>     version:4;
> #elif defined(__BIG_ENDIAN_BITFIELD)
>     __u8    version:4,
>             priority:4;
> #else
> #error>."Please fix <asm/byteorder.h>"
> #endif
>     __u8    flow_lbl[3];
>
>     __be16  payload_len;
>     __u8    nexthdr;
>     __u8    hop_limit;
>
>     struct  in6_addr    saddr;
>     struct  in6_addr    daddr;
> };
>
> (5) ./configure --with-mib-modules="disman/expression-mib
> disman/nslookup-mib disman/ping-mib"
> (6) vi agent/mibgroup/disman/ping/pingCtlTable.h
> //#include <linux/in6.h>
> //#include <linux/ipv6.h>
>
> //#include "in6.h"
> //#include "ipv6.h"
> (7)make
> (8)(As root) make install
> (9) ldconfig
> (10) snmpd -c /etc/snmp/snmpd.conf
>
> (11) Test DISMAN-PING-MIB
>
> snmpset -v 2c -c private localhost
> pingCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 6
> snmpset -v 2c -c private localhost
> pingCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 5
> snmpset -v 2c -c private localhost
> pingCtlTargetAddressType.6.107.97.106.116.122.117.3.65.66.67 = 16
> snmpset -v 2c -c private localhost
> pingCtlTargetAddress.6.107.97.106.116.122.117.3.65.66.67 = "www.google.com
> "
> snmpset -v 2c -c private localhost
> pingCtlProbeCount.6.107.97.106.116.122.117.3.65.66.67 = 2
> snmpset -v 2c -c private localhost
> pingCtlDataSize.6.107.97.106.116.122.117.3.65.66.67 = 64
> snmpset -v 2c -c private localhost
> pingCtlFrequency.6.107.97.106.116.122.117.3.65.66.67 = 4
> snmpset -v 2c -c private localhost
> pingCtlAdminStatus.6.107.97.106.116.122.117.3.65.66.67 = 1
> snmpset -v 2c -c private localhost
> pingCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 1
> snmpwalk -v 2c -c public localhost pingMIB
>
>
>
> parvusnoc:/home/charles/src/Net-SNMP/net-snmp-5.5# snmpwalk -v 2c -c public
> localhost pingMIB
> DISMAN-PING-MIB::pingCtlTargetAddressType."kajtzu"."ABC" = INTEGER: dns(16)
> DISMAN-PING-MIB::pingCtlTargetAddress."kajtzu"."ABC" = STRING: "
> www.google.com"
> DISMAN-PING-MIB::pingCtlDataSize."kajtzu"."ABC" = Gauge32: 64 octets
> DISMAN-PING-MIB::pingCtlTimeOut."kajtzu"."ABC" = Gauge32: 3 seconds
> DISMAN-PING-MIB::pingCtlProbeCount."kajtzu"."ABC" = Gauge32: 2 probes
> DISMAN-PING-MIB::pingCtlAdminStatus."kajtzu"."ABC" = INTEGER: enabled(1)
> DISMAN-PING-MIB::pingCtlDataFill."kajtzu"."ABC" = STRING: "00"
> DISMAN-PING-MIB::pingCtlFrequency."kajtzu"."ABC" = Gauge32: 4 seconds
> DISMAN-PING-MIB::pingCtlMaxRows."kajtzu"."ABC" = Gauge32: 50 rows
> DISMAN-PING-MIB::pingCtlStorageType."kajtzu"."ABC" = INTEGER: other(1)
> DISMAN-PING-MIB::pingCtlTrapGeneration."kajtzu"."ABC" = BITS:
> DISMAN-PING-MIB::pingCtlTrapProbeFailureFilter."kajtzu"."ABC" = Gauge32: 1
> DISMAN-PING-MIB::pingCtlTrapTestFailureFilter."kajtzu"."ABC" = Gauge32: 1
> DISMAN-PING-MIB::pingCtlType."kajtzu"."ABC" = OID: SNMPv2-SMI::zeroDotZero
> DISMAN-PING-MIB::pingCtlDescr."kajtzu"."ABC" = STRING:
> DISMAN-PING-MIB::pingCtlSourceAddressType."kajtzu"."ABC" = INTEGER: ipv4(1)
> DISMAN-PING-MIB::pingCtlSourceAddress."kajtzu"."ABC" = ""
> DISMAN-PING-MIB::pingCtlIfIndex."kajtzu"."ABC" = INTEGER: 0
> DISMAN-PING-MIB::pingCtlByPassRouteTable."kajtzu"."ABC" = INTEGER: false(2)
> DISMAN-PING-MIB::pingCtlDSField."kajtzu"."ABC" = Gauge32: 0
> DISMAN-PING-MIB::pingCtlRowStatus."kajtzu"."ABC" = INTEGER: active(1)
> DISMAN-PING-MIB::pingResultsOperStatus."kajtzu"."ABC" = INTEGER: enabled(1)
> DISMAN-PING-MIB::pingResultsIpTargetAddressType."kajtzu"."ABC" = INTEGER:
> ipv4(1)
> DISMAN-PING-MIB::pingResultsIpTargetAddress."kajtzu"."ABC" = STRING:
> "64.233.169.147"
> DISMAN-PING-MIB::pingResultsMinRtt."kajtzu"."ABC" = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingResultsMaxRtt."kajtzu"."ABC" = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingResultsAverageRtt."kajtzu"."ABC" = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingResultsProbeResponses."kajtzu"."ABC" = Gauge32: 2
> responses
> DISMAN-PING-MIB::pingResultsSentProbes."kajtzu"."ABC" = Gauge32: 2 probes
> DISMAN-PING-MIB::pingResultsRttSumOfSquares."kajtzu"."ABC" = Gauge32: 9084
> milliseconds
> DISMAN-PING-MIB::pingResultsLastGoodProbe."kajtzu"."ABC" = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485851523250484857
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".1 = Gauge32: 31
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".2 = Gauge32: 31
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".3 = Gauge32: 26
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".4 = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".5 = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".6 = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".7 = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".8 = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".9 = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".10 = Gauge32: 31
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".11 = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".12 = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".13 = Gauge32: 24
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryResponse."kajtzu"."ABC".14 = Gauge32: 23
> milliseconds
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".1 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".2 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".3 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".4 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".5 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".6 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".7 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".8 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".9 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".10 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".11 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".12 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".13 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryStatus."kajtzu"."ABC".14 = INTEGER:
> responseReceived(1)
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".1 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".2 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".3 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".4 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".5 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".6 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".7 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".8 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".9 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".10 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".11 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".12 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".13 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryLastRC."kajtzu"."ABC".14 = INTEGER: 0
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".1 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849483250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".2 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849483250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".3 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849523250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".4 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849523250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".5 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849563250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".6 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485849563250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".7 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485850503250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".8 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485850503250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".9 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485850543250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".10 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485850543250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".11 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485851483250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".12 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485851483250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".13 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485851523250484857
> DISMAN-PING-MIB::pingProbeHistoryTime."kajtzu"."ABC".14 = STRING:
> 21621-101-32,83:101:112.32,257:3249555850485851523250484857
>
>
>
>
> (12) Test DISMAN-NSLOOKUP-MIB
> snmpset -v 2c -c private localhost
> lookupCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 6
> snmpset -v 2c -c private localhost
> lookupCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 5
> snmpset -v 2c -c private localhost
> lookupCtlTargetAddressType.6.107.97.106.116.122.117.3.65.66.67 = 16
> snmpset -v 2c -c private localhost
> lookupCtlTargetAddress.6.107.97.106.116.122.117.3.65.66.67 = "
> www.google.com"
> snmpset -v 2c -c private localhost
> lookupCtlRowStatus.6.107.97.106.116.122.117.3.65.66.67 = 1
>
> snmpwalk -v 2c -c public localhost lookupCtlEntry
> snmpwalk -v 2c -c public localhost lookupResultsTable
> DISMAN-NSLOOKUP-MIB::lookupCtlRowStatus."kajtzu"."ABC" = INTEGER: active(1)
> parvusnoc:/home/charles/src/Net-SNMP/net-snmp-5.5# snmpwalk -v 2c -c public
> localhost lookupCtlEntry
> DISMAN-NSLOOKUP-MIB::lookupCtlTargetAddressType."kajtzu"."ABC" = INTEGER:
> dns(16)
> DISMAN-NSLOOKUP-MIB::lookupCtlTargetAddress."kajtzu"."ABC" = STRING: "
> www.google.com"
> DISMAN-NSLOOKUP-MIB::lookupCtlOperStatus."kajtzu"."ABC" = INTEGER:
> completed(3)
> DISMAN-NSLOOKUP-MIB::lookupCtlTime."kajtzu"."ABC" = Gauge32: 13
> milliseconds
> DISMAN-NSLOOKUP-MIB::lookupCtlRc."kajtzu"."ABC" = INTEGER: 0
> DISMAN-NSLOOKUP-MIB::lookupCtlRowStatus."kajtzu"."ABC" = INTEGER: active(1)
> parvusnoc:/home/charles/src/Net-SNMP/net-snmp-5.5# snmpwalk -v 2c -c public
> localhost lookupResultsTable
> DISMAN-NSLOOKUP-MIB::lookupResultsAddressType."kajtzu"."ABC".1 = INTEGER:
> ipv4(1)
> DISMAN-NSLOOKUP-MIB::lookupResultsAddressType."kajtzu"."ABC".2 = INTEGER:
> ipv4(1)
> DISMAN-NSLOOKUP-MIB::lookupResultsAddressType."kajtzu"."ABC".3 = INTEGER:
> ipv4(1)
> DISMAN-NSLOOKUP-MIB::lookupResultsAddressType."kajtzu"."ABC".4 = INTEGER:
> ipv4(1)
> DISMAN-NSLOOKUP-MIB::lookupResultsAddress."kajtzu"."ABC".1 = STRING:
> "64.233.169.103"
> DISMAN-NSLOOKUP-MIB::lookupResultsAddress."kajtzu"."ABC".2 = STRING:
> "64.233.169.99"
> DISMAN-NSLOOKUP-MIB::lookupResultsAddress."kajtzu"."ABC".3 = STRING:
> "64.233.169.147"
> DISMAN-NSLOOKUP-MIB::lookupResultsAddress."kajtzu"."ABC".4 = STRING:
> "64.233.169.104"
>
>
>
> On Thu, Sep 24, 2009 at 7:24 AM, Charles Liu <[email protected]>wrote:
>
>> Thank you Poggs:
>>
>> Yes, I have tried
>>
>> snmpwalk -v 2c -c public localhost DISMAN-PING-MIB::pingResultsTable
>>
>> or
>>
>> snmpwalk -v 2c -c public localhost pingResultsTable
>>
>> They both gave the same error:
>>
>> DISMAN-PING-MIB::pingResultsTable = No Such Object available on this agent
>> at this OID
>>
>>
>>
>> On Thu, Sep 24, 2009 at 12:28 AM, Peter Hicks <[email protected]>wrote:
>>
>>> Charles Liu wrote:
>>>
>>> (4) The problem is that there is no information about the Ping Results.
>>>>
>>>> Does someone know how to get the ping results?
>>>>
>>>
>>> Have you tried looking in DISMAN-PING-MIB::pingResultsTable?
>>>
>>>
>>> Poggs
>>>
>>
>>
>>
>>
>>
>
>
> --
> Charles Liu
>
> Stonewater Control Systems Inc.
> 1007 Church Street, Suite 101
> Evanston, Illinois 60201
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.