/* $Id: SnmpGetTable.java,v 1.1 2002/06/15 14:41:18 ram Exp $ */ /* SnmpGetTable.java * Copyright (c) 2012 ZOHO Corp. All Rights Reserved. * Please read the associated COPYRIGHTS file for more details. */ * * */ import com.adventnet.snmp.beans.*; public class SnmpGetTable { public static void main(String args[]) { if (args.length < 1) { System.out.println ("Usage : java SnmpGetTable tableoid"); System.exit (0); } String tableoid = args[0]; SnmpTable table = new SnmpTable(); table.setTargetHost("localhost); try { table.loadMibs("RFC1213-MIB"); table.setTableOID(tableoid); } catch (Exception ex) { System.err.println("Error: "+ex); } System.out.println("Getting table. Table items:"); // allow some time to get all rows Thread.sleep(5000); StringBuffer sb = new StringBuffer(); try { // allow some time to get all rows Thread.sleep(10000); } catch (InterruptedException ex) { } for (int i=0;i