Commit 0694b33b 0694b33bc26f159769db268dac1b5eeb12178734 by Christian Gerdes

New version with page in and out counters for issue #1 and bug fix for

issue #2
1 parent 43d890cf
java -jar jetty-runner-9.2.9.v20150224.jar --log access.log --out systemout.log JavaMonWeb.war
java -jar jetty-runner-9.2.9.v20150224.jar JavaMonWeb.war
pause
\ No newline at end of file
......
java -jar jetty-runner-9.3.7.v20160115.jar --log access.log --out systemout.log JavaMonWeb.war
java -jar jetty-runner-9.3.7.v20160115.jar JavaMonWeb.war
pause
\ No newline at end of file
......
......@@ -80,6 +80,8 @@ public class OraMonRESTgetMetrics extends HttpServlet {
sb.append(",{\"name\":\"Cpu Usage (%)" + aStr + "\",\"value\":" + item.getCPUPercent() + "}");
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 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") + "}");
......
......@@ -78,7 +78,10 @@ public class OraMon {
public double getOsBusyPercent() throws Throwable {
double idle = getPerSecondValue("IDLE_TIME", OSSTAT);
double busy = getPerSecondValue("BUSY_TIME", OSSTAT);
if(idle != 0 && busy != 0)
return 100*(busy/(busy+idle));
else
return 0;
}
// OS LOAD
......@@ -105,7 +108,11 @@ public class OraMon {
return 0;
}
double buffCacheHitRatio = 1 - (physReadsCache/(conGetsCache + dbBlocksCache));
if(buffCacheHitRatio > 0)
return buffCacheHitRatio * 100;
else
return 0;
}
public double getCacheHitRatioPercent() throws Throwable {
......@@ -119,7 +126,10 @@ public class OraMon {
return 0;
}
double cacheHitRatio = 1 - (physReads/(conGets + dbBlocks));
if(cacheHitRatio > 0)
return cacheHitRatio * 100;
else
return 0;
}
public double getLogicalReadsPerSecond() throws Throwable {
......