Commit d873e5f5 d873e5f5ca1c4cffeb1ab0ad005bac1db000c50f by Christian Gerdes

Ny version som hämtar GC info

Dock räknar den fel på Allocation Rate när heap size minskar från
föregående sampling.
1 parent f95dafd9
1 javaw.exe -Dcom.sun.management.jmxremote.ssl=false -cp "wls-10.3.6.0.161018.2/wljmxclient.jar;jconsole.1.8.0_91.jar" sun.tools.jconsole.JConsole "service:jmx:rmi:///jndi/iiop://u01891.ef.kap.rsv.se:17020/weblogic.management.mbeanservers.runtime"
...\ No newline at end of file ...\ No newline at end of file
1 javaw.exe -Dcom.sun.management.jmxremote.ssl=false -cp "wls-10.3.6.0.161018.2/wljmxclient.jar;jconsole.1.8.0_91.jar" sun.tools.jconsole.JConsole "service:jmx:rmi:///jndi/iiop://u02878.ht.kap.rsv.se:17040/weblogic.management.mbeanservers.runtime"
...\ No newline at end of file ...\ No newline at end of file
...@@ -19,9 +19,12 @@ public class TestRunner { ...@@ -19,9 +19,12 @@ public class TestRunner {
19 19
20 Long ts1 = System.currentTimeMillis(); 20 Long ts1 = System.currentTimeMillis();
21 21
22 JmxMon mon1 = new JmxMon("service:jmx:iiop:///jndi/iiop://u30457:29722/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2 22 //JmxMon mon1 = new JmxMon("service:jmx:iiop:///jndi/iiop://u30457:29722/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2
23 //JmxMon mon1 = new JmxMon("service:jmx:rmi:///jndi/iiop://u30128:23032/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2 23 //JmxMon mon1 = new JmxMon("service:jmx:rmi:///jndi/iiop://u30128:23032/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2
24 //JmxMon mon2 = new JmxMon("service:jmx:rmi:///jndi/iiop://u30009:26732/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.12.1 24 //JmxMon mon2 = new JmxMon("service:jmx:rmi:///jndi/iiop://u30009:26732/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.12.1
25 //JmxMon mon1 = new JmxMon("service:jmx:rmi:///jndi/iiop://u02878.ht.kap.rsv.se:17040/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2 PS
26 //JmxMon mon1 = new JmxMon("service:jmx:rmi:///jndi/iiop://u01891.ef.kap.rsv.se:17020/weblogic.management.mbeanservers.runtime"); // 10.3.6.0.161018.2 CMS
27 JmxMon mon1 = new JmxMon("service:jmx:rmi:///jndi/iiop://u30450:34502/weblogic.management.mbeanservers.runtime"); // CMS
25 mon1.open(); 28 mon1.open();
26 //mon2.open(); 29 //mon2.open();
27 jmxList.add(mon1); 30 jmxList.add(mon1);
...@@ -41,16 +44,33 @@ public class TestRunner { ...@@ -41,16 +44,33 @@ public class TestRunner {
41 mon.getData(); 44 mon.getData();
42 time = System.currentTimeMillis() - ts1; 45 time = System.currentTimeMillis() - ts1;
43 System.out.println(mon.getServerName() + " called in " + time + "ms"); 46 System.out.println(mon.getServerName() + " called in " + time + "ms");
44 System.out.println(mon.getServerName() + " Process CPU %: " + mon.getCPUPercent()); 47 System.out.println(" Process CPU %: " + mon.getCPUPercent());
45 System.out.println(mon.getServerName() + " Process Threads #: " + mon.getThreads()); 48 System.out.println(" Process Threads #: " + mon.getThreads());
46 System.out.println(mon.getServerName() + " Process Loaded Classes #: " + mon.getLoadedClassCount()); 49 System.out.println(" Process Loaded Classes #: " + mon.getLoadedClassCount());
47 System.out.println(mon.getServerName() + " Process File Descriptors %: " + mon.getSystemFileDescriptorsPercentUsed()); 50 System.out.println(" Process File Descriptors %: " + mon.getSystemFileDescriptorsPercentUsed());
48 System.out.println(mon.getServerName() + " System Load (per cpu): " + mon.getAverageLoadPerCpu()); 51 System.out.println(" Process Heap Used %: " + mon.getHeapUsedPercent());
49 System.out.println(mon.getServerName() + " System Load (total): " + mon.getAverageLoad()); 52 System.out.println(" Process Heap Used MB: " + mon.getHeapUsedMB());
50 System.out.println(mon.getServerName() + " System Memory %: " + mon.getSystemMemoryPercentUsed()); 53 System.out.println(" Allocation Rate MB/s: " + mon.getHeapAllocationRateMBps());
51 System.out.println(mon.getServerName() + " System Swap %: " + mon.getSystemSwapPercentUsed()); 54 if(mon.isGCType(JmxMon.PS)) {
55 System.out.println(" PS OldGen Used %: " + mon.getPSOldGenUsedPercent());
56 System.out.println(" PS OldGen Used MB: " + mon.getPSOldGenUsedMB());
57 System.out.println(" PS OldGen After Major GC MB: " + mon.getPSMarkSweepOldGenAfterGCMB());
58 System.out.println(" PS PermGen After Major GC MB: " + mon.getPSMarkSweepPermGenAfterGCMB());
59 }
60 if(mon.isGCType(JmxMon.CMS)) {
61 System.out.println(" CMS OldGen Used %: " + mon.getCMSOldGenUsedPercent());
62 System.out.println(" CMS OldGen Used MB: " + mon.getCMSOldGenUsedMB());
63 System.out.println(" CMS OldGen After Major GC MB: " + mon.getCMSMarkSweepOldGenAfterGCMB());
64 System.out.println("CMS PermGen After Major GC MB: " + mon.getCMSMarkSweepPermGenAfterGCMB());
65 }
66 System.out.println(" System Load (per cpu): " + mon.getAverageLoadPerCpu());
67 System.out.println(" System Load (total): " + mon.getAverageLoad());
68 System.out.println(" System Memory %: " + mon.getSystemMemoryPercentUsed());
69 System.out.println(" System Swap %: " + mon.getSystemSwapPercentUsed());
52 70
53 System.out.println(); 71 System.out.println();
72
73 //mon.dumpDeltas();
54 } 74 }
55 Thread.sleep(15000); 75 Thread.sleep(15000);
56 } 76 }
......