Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Products
/
LILOM
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
2
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
0694b33b
...
0694b33bc26f159769db268dac1b5eeb12178734
authored
2016-04-27 15:56:28 +0200
by
Christian Gerdes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
New version with page in and out counters for issue
#1
and bug fix for
issue
#2
1 parent
43d890cf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
5 deletions
JavaMonWeb/WebContent/WEB-INF/lib/lilom.jar
JavaMonWeb/jetty/JavaMonWeb.war
JavaMonWeb/jetty/JavaMonWeb_jre7.bat
JavaMonWeb/jetty/JavaMonWeb_jre8.bat
JavaMonWeb/src/OraMonRESTgetMetrics.java
LILOM Library/se/lil/om/OraMon.java
JavaMonWeb/WebContent/WEB-INF/lib/lilom.jar
View file @
0694b33
No preview for this file type
JavaMonWeb/jetty/JavaMonWeb.war
View file @
0694b33
No preview for this file type
JavaMonWeb/jetty/JavaMonWeb_jre7.bat
View file @
0694b33
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
...
...
JavaMonWeb/jetty/JavaMonWeb_jre8.bat
View file @
0694b33
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
...
...
JavaMonWeb/src/OraMonRESTgetMetrics.java
View file @
0694b33
...
...
@@ -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"
)
+
"}"
);
...
...
LILOM Library/se/lil/om/OraMon.java
View file @
0694b33
...
...
@@ -78,7 +78,10 @@ public class OraMon {
public
double
getOsBusyPercent
()
throws
Throwable
{
double
idle
=
getPerSecondValue
(
"IDLE_TIME"
,
OSSTAT
);
double
busy
=
getPerSecondValue
(
"BUSY_TIME"
,
OSSTAT
);
return
100
*(
busy
/(
busy
+
idle
));
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
));
return
buffCacheHitRatio
*
100
;
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
));
return
cacheHitRatio
*
100
;
if
(
cacheHitRatio
>
0
)
return
cacheHitRatio
*
100
;
else
return
0
;
}
public
double
getLogicalReadsPerSecond
()
throws
Throwable
{
...
...
Please
register
or
sign in
to post a comment