Login  
Search All Forums
Dart Home | PowerSNMP for .NET | Custom Development Reply | PowerSNMP for .NET Topics | Forums   
AuthorForum: PowerSNMP for .NET
Topic: GetTable does not return all rows
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 1, 2011 11:12 AM

The Variables array does not contain all the data. To validate, I used iReasoning MIB Browser to fetch the table which successfully produced the correct results.

Sample code:

private void button1_Click(object sender, EventArgs e)
{
  manager1 = new Dart.Snmp.Manager();
  manager1.Start(SendGetRequest, manager1.Mib.CreateVariable(NodeName.sysDescr));

}

private void SendGetRequest(Dart.Snmp.ManagerSlave slave, object state)
{

Variable[,] response = slave.GetTable("1.3.6.1.2.1.6.13", SnmpVersion.Two, "public", null, new System.Net.IPEndPoint(IPAddress.Parse("127.0.0.1"), 161));
      

}


Whenever I try above, I always get a maximum of 5 rows of data only. I tried all the GeTable overloads and increased value of Socket read timeout just for testing.

please advise. 
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 3, 2011 10:25 AM

Hello,

I just tested this with our Agent and Manager samples - I set a variable 8 times on the agent from the manager to populate the agent's 'Dart Set Request Table', and then checked the return value of the GetTable method (in the doGetDartRequestTable method), and the full table was returned by the method (8 table rows). Does that table in our included Agent and Manager samples work for you?

I noticed that you're using the loopback address for your agentEP argument - is the behavior any different if you use the network IP? (something like 192.168.x.x?)
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 3, 2011 3:05 PM

Hello

I tried with a local standard ip 192.1681.152 and the behavior is still the same. I also tried other Table OIDs which seam to behave correctly. The probelem appears to be limited to tcpConnTable (OID 1.3.6.1.2.1.6.13). Can you try that on your side to see if you are able to fetch all connections? (i.e. results matching command line netstat -na -p tcp).
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 3, 2011 4:08 PM

Hello,

What agent are you working against? Our agent sample isn't coded to respond to a request for that table. If you've added some code for it to our Agent sample, could you please reply with it?
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 4, 2011 6:50 AM

I am Querying windows server itself. This is the Microsoft snmp service.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 4, 2011 3:41 PM

Hello,

I'm sorry for the delay, for some reason I'm not able to get the Microsoft SNMP agent working, so I'm unable to test that.

Please create a trace during the GetTable call: hook up Manager.Log, and log e.Message.EncodedMessage to file, with 2 crlfs in between each message, so I can see the requests and responses. This should be mostly binary data interspersed with human-readable text.
Can you please also provide the values of what you're getting from our manager, and what you're getting from your iReasoning MIB Browser?

Are you able to use GetNextMessage to get the full table? (Basically a manual GetTable) Is any exception thrown? You can use this code (you could put this in the GetDartSetRequestTable in the manager sample):

(slave is a ManagerSlave)

Variable var = new Variable("1.3.6.1.2.1.6.13");
GetNextMessage gtnxtMessage = new GetNextMessage();
gtnxtMessage.Variables.Add(var);
List<ResponseMessage> rmlist = new List<ResponseMessage>();
ResponseMessage rm = slave.GetResponse(gtnxtMessage, "your agent ip address here");
rmlist.Add(rm);
  while (rm.Variables[0].Id.Contains("1.3.6.1.2.1.6.13"))
  {
    gtnxtMessage = new GetNextMessage();
    var = new Variable(rm.Variables[0].Id);
    gtnxtMessage.Variables.Add(var);
    rm = slave.GetResponse(gtnxtMessage, "192.168.0.192");
    rmlist.Add(rm);
  }
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 5, 2011 12:41 PM

How should I send you the dump file? please provide an email or an upload area.

Thx
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 5, 2011 12:56 PM

I just tried the manual approach using GetNextMessage which seams to work. from a quick look I got 95 messages back which is consistent with iReasoning table lookup. The only issue is now why GetTable is now consistent.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 5, 2011 1:22 PM

Hello,

You can use that workaround for now, then. You can send the log file into support@dart.com
dhajjar

From: Beirut, Lebanon
Posts: 8
Member Since: 10/01/11
posted October 5, 2011 2:54 PM

Dump files sent to support email.

Can you provide sample function that I can use to abstract GetTable functionality for the time been using GetBulkMessage? i.e. it takes the OID and returns a two dimensional array of the table?
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted October 7, 2011 12:05 PM

This issue needs to be handled through our administrative procedures prior to response. Please contact sales@dart.com directly regarding this issue.

Thank you.
Reply | PowerSNMP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX