Commit 1215b87b 1215b87b15de54d1ff155e19c09061b256a3a6e4 by Christian Gerdes

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.
1 parent 3010ff4f
No preview for this file type
rmdir /s /q C:\WS\var
mkdir C:\WS\var
mkdir C:\WS\var
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
......
......@@ -50,7 +50,7 @@ public class JmxMonRESTgetData extends HttpServlet {
// Check that we have a valid connection string
try {
JMXServiceURL url = new JMXServiceURL(request.getParameter("connectionString"));
new JMXServiceURL(request.getParameter("connectionString"));
} catch (Exception e) {
// Error, we need a correct connection string
response.setStatus(400);
......
......@@ -90,10 +90,11 @@ public class OraMonRESTgetMetrics extends HttpServlet {
sb.append("{\"name\":\"Cpus (#)" + aStr + "\",\"value\":" + item.getNumberOfCPUs() + "}");
sb.append(",{\"name\":\"Cpu Time (us/s)" + aStr + "\",\"value\":" + item.getCPUTimePerSecond() + "}");
sb.append(",{\"name\":\"Cpu Usage (%)" + aStr + "\",\"value\":" + item.getCPUPercent() + "}");
sb.append(",{\"name\":\"Cpu Usage xNIWT (%)" + aStr + "\",\"value\":" + item.getCPUPercent(true) + "}");
sb.append(",{\"name\":\"OS Busy (%)" + aStr + "\",\"value\":" + item.getOsBusyPercent() + "}");
sb.append(",{\"name\":\"OS Load (#)" + aStr + "\",\"value\":" + item.getOsLoad() + "}");
sb.append(",{\"name\":\"OS Page In (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_IN_BYTES", 2)/1024 + "}");
sb.append(",{\"name\":\"OS Page Out (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_OUT_BYTES", 2)/1024 + "}");
sb.append(",{\"name\":\"OS Page In (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_IN_BYTES", OraMon.OSSTAT)/1024 + "}");
sb.append(",{\"name\":\"OS Page Out (KB/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("VM_OUT_BYTES", OraMon.OSSTAT)/1024 + "}");
sb.append(",{\"name\":\"OS Load per Cpu (#)" + aStr + "\",\"value\":" + item.getOsLoadPerCPU() + "}");
sb.append(",{\"name\":\"Logical Reads (#/s)" + aStr + "\",\"value\":" + item.getLogicalReadsPerSecond() + "}");
sb.append(",{\"name\":\"Consistent Gets (#/s)" + aStr + "\",\"value\":" + item.getPerSecondValue("consistent gets") + "}");
......
......@@ -17,12 +17,12 @@ public class TestRunner {
//ArrayList<OraMon> oraList = new ArrayList<OraMon>();
ArrayList<OraMon> oraList = Registry.getList();
OraMon mon1 = new OraMon("jdbc:oracle:thin:@//u03292.kap.rsv.se:1526/AI1K001","dbsnmp","dbsnmp");
OraMon mon2 = new OraMon("jdbc:oracle:thin:@u03292.kap.rsv.se:1526:DB1K09","dbsnmp","dbsnmp");
OraMon mon1 = new OraMon("jdbc:oracle:thin:@//host:port/service","user","pass"); // SID eller Service Name format
//OraMon mon2 = new OraMon("jdbc:oracle:thin:@host:port:sid","user","pass"); // SID format
mon1.open();
mon2.open();
//mon2.open();
oraList.add(mon1);
oraList.add(mon2);
//oraList.add(mon2);
int times = 100;
while(times-- > 0) {
......@@ -66,7 +66,7 @@ public class TestRunner {
// + " Rollbacks: " + mon.getPerSecondValue("user rollbacks")
// + " Parse tot: " + mon.getPerSecondValue("parse count (total)")
// + " Parse hard: " + mon.getPerSecondValue("parse count (hard)")
// + "\nTime: " + time + "ms"
+ "\nTime: " + time + "ms"
);
}
......