Bugfixar i LILOM för att hantera service containers som ger skumma
mätvärden ibland. Dessa ignoreras nu. Ny CPU mätare (xNIWT) som beräknar CPU förbrukning exklusive Non Idle Wait Time.
Showing
7 changed files
with
11 additions
and
8 deletions
No preview for this file type
No preview for this file type
No preview for this file type
1 | rmdir /s /q C:\WS\var | 1 | rmdir /s /q C:\WS\var |
2 | |||
2 | mkdir C:\WS\var | 3 | mkdir C:\WS\var |
4 | |||
3 | C:\WS\bin\java.exe -Djava.io.tmpdir=C:\WS\var -Djavax.servlet.context.tempdir=temp -jar C:\WS\jetty-runner-9.3.7.v20160115.jar --port 9001 --stop-port 9002 --stop-key abc123 C:\WS\JavaMonWeb.war | 5 | C:\WS\bin\java.exe -Djava.io.tmpdir=C:\WS\var -Djavax.servlet.context.tempdir=temp -jar C:\WS\jetty-runner-9.3.7.v20160115.jar --port 9001 --stop-port 9002 --stop-key abc123 C:\WS\JavaMonWeb.war |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -50,7 +50,7 @@ public class JmxMonRESTgetData extends HttpServlet { | ... | @@ -50,7 +50,7 @@ public class JmxMonRESTgetData extends HttpServlet { |
50 | 50 | ||
51 | // Check that we have a valid connection string | 51 | // Check that we have a valid connection string |
52 | try { | 52 | try { |
53 | JMXServiceURL url = new JMXServiceURL(request.getParameter("connectionString")); | 53 | new JMXServiceURL(request.getParameter("connectionString")); |
54 | } catch (Exception e) { | 54 | } catch (Exception e) { |
55 | // Error, we need a correct connection string | 55 | // Error, we need a correct connection string |
56 | response.setStatus(400); | 56 | response.setStatus(400); | ... | ... |
... | @@ -90,10 +90,11 @@ public class OraMonRESTgetMetrics extends HttpServlet { | ... | @@ -90,10 +90,11 @@ public class OraMonRESTgetMetrics extends HttpServlet { |
90 | sb.append("{\"name\":\"Cpus (#)" + aStr + "\",\"value\":" + item.getNumberOfCPUs() + "}"); | 90 | sb.append("{\"name\":\"Cpus (#)" + aStr + "\",\"value\":" + item.getNumberOfCPUs() + "}"); |
91 | sb.append(",{\"name\":\"Cpu Time (us/s)" + aStr + "\",\"value\":" + item.getCPUTimePerSecond() + "}"); | 91 | sb.append(",{\"name\":\"Cpu Time (us/s)" + aStr + "\",\"value\":" + item.getCPUTimePerSecond() + "}"); |
92 | sb.append(",{\"name\":\"Cpu Usage (%)" + aStr + "\",\"value\":" + item.getCPUPercent() + "}"); | 92 | sb.append(",{\"name\":\"Cpu Usage (%)" + aStr + "\",\"value\":" + item.getCPUPercent() + "}"); |
93 | sb.append(",{\"name\":\"Cpu Usage xNIWT (%)" + aStr + "\",\"value\":" + item.getCPUPercent(true) + "}"); | ||
93 | sb.append(",{\"name\":\"OS Busy (%)" + aStr + "\",\"value\":" + item.getOsBusyPercent() + "}"); | 94 | sb.append(",{\"name\":\"OS Busy (%)" + aStr + "\",\"value\":" + item.getOsBusyPercent() + "}"); |
94 | sb.append(",{\"name\":\"OS Load (#)" + aStr + "\",\"value\":" + item.getOsLoad() + "}"); | 95 | sb.append(",{\"name\":\"OS Load (#)" + aStr + "\",\"value\":" + item.getOsLoad() + "}"); |
95 | sb.append(",{\"name\":\"OS Page In (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_IN_BYTES", 2)/1024 + "}"); | 96 | sb.append(",{\"name\":\"OS Page In (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_IN_BYTES", OraMon.OSSTAT)/1024 + "}"); |
96 | sb.append(",{\"name\":\"OS Page Out (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_OUT_BYTES", 2)/1024 + "}"); | 97 | sb.append(",{\"name\":\"OS Page Out (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_OUT_BYTES", OraMon.OSSTAT)/1024 + "}"); |
97 | sb.append(",{\"name\":\"OS Load per Cpu (#)" + aStr + "\",\"value\":" + item.getOsLoadPerCPU() + "}"); | 98 | sb.append(",{\"name\":\"OS Load per Cpu (#)" + aStr + "\",\"value\":" + item.getOsLoadPerCPU() + "}"); |
98 | sb.append(",{\"name\":\"Logical Reads (#/s)" + aStr + "\",\"value\":" + item.getLogicalReadsPerSecond() + "}"); | 99 | sb.append(",{\"name\":\"Logical Reads (#/s)" + aStr + "\",\"value\":" + item.getLogicalReadsPerSecond() + "}"); |
99 | sb.append(",{\"name\":\"Consistent Gets (#/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("consistent gets") + "}"); | 100 | sb.append(",{\"name\":\"Consistent Gets (#/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("consistent gets") + "}"); | ... | ... |
... | @@ -17,12 +17,12 @@ public class TestRunner { | ... | @@ -17,12 +17,12 @@ public class TestRunner { |
17 | //ArrayList<OraMon> oraList = new ArrayList<OraMon>(); | 17 | //ArrayList<OraMon> oraList = new ArrayList<OraMon>(); |
18 | ArrayList<OraMon> oraList = Registry.getList(); | 18 | ArrayList<OraMon> oraList = Registry.getList(); |
19 | 19 | ||
20 | OraMon mon1 = new OraMon("jdbc:oracle:thin:@//u03292.kap.rsv.se:1526/AI1K001","dbsnmp","dbsnmp"); | 20 | OraMon mon1 = new OraMon("jdbc:oracle:thin:@//host:port/service","user","pass"); // SID eller Service Name format |
21 | OraMon mon2 = new OraMon("jdbc:oracle:thin:@u03292.kap.rsv.se:1526:DB1K09","dbsnmp","dbsnmp"); | 21 | //OraMon mon2 = new OraMon("jdbc:oracle:thin:@host:port:sid","user","pass"); // SID format |
22 | mon1.open(); | 22 | mon1.open(); |
23 | mon2.open(); | 23 | //mon2.open(); |
24 | oraList.add(mon1); | 24 | oraList.add(mon1); |
25 | oraList.add(mon2); | 25 | //oraList.add(mon2); |
26 | 26 | ||
27 | int times = 100; | 27 | int times = 100; |
28 | while(times-- > 0) { | 28 | while(times-- > 0) { |
... | @@ -66,7 +66,7 @@ public class TestRunner { | ... | @@ -66,7 +66,7 @@ public class TestRunner { |
66 | // + " Rollbacks: " + mon.getPerSecondValue("user rollbacks") | 66 | // + " Rollbacks: " + mon.getPerSecondValue("user rollbacks") |
67 | // + " Parse tot: " + mon.getPerSecondValue("parse count (total)") | 67 | // + " Parse tot: " + mon.getPerSecondValue("parse count (total)") |
68 | // + " Parse hard: " + mon.getPerSecondValue("parse count (hard)") | 68 | // + " Parse hard: " + mon.getPerSecondValue("parse count (hard)") |
69 | // + "\nTime: " + time + "ms" | 69 | + "\nTime: " + time + "ms" |
70 | ); | 70 | ); |
71 | 71 | ||
72 | } | 72 | } | ... | ... |
-
Please register or sign in to post a comment