Hello all,
I'm getting weird readings from Tomcat's "Process CPU Time per Minute" metrics. Currently it displays values like "5 days 09:40:17", which doesn't make any sense (at least not to me). Could it be possible that the Tomcat plugin is using wrong units in the "ProcessCpuTime" reading? I don't know anything about HQ internals, but I think that the Tomcat plugin expects readings to be in milliseconds. The plugin's hq-plugin.xml says:
<metric name="Process Cpu Time"
alias="ProcessCpuTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
After some more investigation I found out that Java reports CPU times in nanoseconds. I took a CSV export of collected metrics and divided some sample values by one million (to convert from nanoseconds to milliseconds) and results did look like reasonable fractions of minutes.
I'm monitoring few Tomcat 6 instances running on 64-bit Ubuntu servers with Java 6 (Sun and OpenJDK versions).
I'm getting weird readings from Tomcat's "Process CPU Time per Minute" metrics. Currently it displays values like "5 days 09:40:17", which doesn't make any sense (at least not to me). Could it be possible that the Tomcat plugin is using wrong units in the "ProcessCpuTime" reading? I don't know anything about HQ internals, but I think that the Tomcat plugin expects readings to be in milliseconds. The plugin's hq-plugin.xml says:
<metric name="Process Cpu Time"
alias="ProcessCpuTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
After some more investigation I found out that Java reports CPU times in nanoseconds. I took a CSV export of collected metrics and divided some sample values by one million (to convert from nanoseconds to milliseconds) and results did look like reasonable fractions of minutes.
I'm monitoring few Tomcat 6 instances running on 64-bit Ubuntu servers with Java 6 (Sun and OpenJDK versions).