Hi Philippe,

as I wrote, there is a STATUS identifier that indicates the timeout.
Counting VBs is not enough. You get the status value with TableEvent.getStatus()

Best regards,
Frank

Am 27.10.2016 um 08:55 schrieb FLORENT Philippe:
What if I get an empty table ?

How to differentiate a timeout with a table that should actually be empty

-----Original Message-----
From: SNMP4J [mailto:snmp4j-boun...@agentpp.org] On Behalf Of Frank Fock
Sent: jeudi 27 octobre 2016 00:51
To: snmp4j@agentpp.org
Subject: Re: [SNMP4J] detect timeout ?

Hi Philippe,

The (last) TableEvent object will indicate the timeout in its status field.

Best regards,
Frank

Am 26.10.2016 um 15:05 schrieb FLORENT Philippe:
Hi,

I use this function to read infos on my host,

But if the host (or the snmp service) is down, how do I detect it ?

So far I check the table size must be >0 but what if table is 0 size and the 
host is not down ?

thanks

public ArrayList<TableRow> getTable(Mib mib)
      {
          final PDUFactory pduFactory = new DefaultPDUFactory(PDU.GETBULK);
          pduFactory.createPDU(target);
          final TableUtils utils = new TableUtils(snmp, pduFactory);
          List<TableEvent> table = utils.getTable(target, new OID[]{ new 
OID(mib.oid) }, null, null);
          for(TableEvent a:table)
          {
              if(a.getColumns()!=null)
              {
....
              }
          }
     }
_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

Reply via email to