public static void main(String[] args) throws Exception { if(args.length != 3) { System.out.println("Usage: java PrintPerfMgr " + "<url> <username> <password>"); return; } ServiceInstance si = new ServiceInstance( new URL(args[0]), args[1], args[2], true); PerformanceManager perfMgr = si.getPerformanceManager(); System.out.println("***Print All Descriptions:"); PerformanceDescription pd = perfMgr.getDescription(); printPerfDescription(pd); System.out.println("\n***Print All Historical Intervals:"); PerfInterval[] pis = perfMgr.getHistoricalInterval(); printPerfIntervals(pis); System.out.println("\n***Print All Perf Counters:"); PerfCounterInfo[] pcis = perfMgr.getPerfCounter(); printPerfCounters(pcis); si.getServerConnection().logout(); }
static void printPerfDescription(PerformanceDescription pd) { ElementDescription[] eds = pd.getCounterType(); printElementDescriptions(eds); ElementDescription[] statsTypes = pd.getStatsType(); printElementDescriptions(statsTypes); }
PerformanceDescription getDescription();