/* $Id: GetRow.java,v 1.1 2002/06/15 14:41:18 ram Exp $ */ * /* GetRow.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 GetRow { public static void main(String args[]) { if (args.length < 1) { System.out.println ("Usage : java getrow 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); } String sb = table.getRow(2); System.out.println("Getting 2nd row: " + sb); System.exit(0); } }