Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002422 [Resin] minor always 02-11-08 13:51 06-17-08 14:33
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0002422: PortMXBean statistics
Description (rep by Knut Forkalsrud)

I'm trying to get some statistics out of my Resin instance through the JMX beans.
Some of the interesting metrics on PortMXBean seem to be missing, notably the
following properties:

requestCountTotal
requestCountKeepalive
requestCountClientDisconnect
requestTimeTotal
requestBytesRead
requestBytesWritten

I've tried to trace the source code for where they're updated, but I can't find any
code that does that. The attached jsp page illustrates the issue. As I load the
page over and over the metrics do not change, they're always zero. I've run this
on 3.1.4 and 3.0.23, and they're both the same in this respect. Is there a trick
I need to invoke to get this going, or is it simply not implemented?

Thanks

Knut Forkalsrud

<%@ page contentType="text/plain; charset=UTF-8" %>
<%@ page info="stats.jsp" %>
<%@ page import="java.util.*, com.caucho.jmx.Jmx, com.caucho.management.server.*" %>
<%!

 void println(JspWriter out, String name, Object value) throws java.io.IOException {
     out.println(name + ": " + String.valueOf(value));
 }

%>
<%
ResinMXBean _resin = (ResinMXBean) Jmx.findGlobal("resin:type=Resin");
ServerMXBean _server = (ServerMXBean) Jmx.findGlobal("resin:type=Server");
ProxyCacheMXBean _proxyCache = (ProxyCacheMXBean) Jmx.findGlobal("resin:type=ProxyCache");
ThreadPoolMXBean _threadPool = (ThreadPoolMXBean) Jmx.findGlobal("resin:type=ThreadPool");


println(out, "version", com.caucho.Version.VERSION);
println(out, "server id", _server.getId());
println(out, "configFile", _resin.getConfigFile());
println(out, "startTime", _server.getStartTime());
println(out, "invocationCache.hit", _server.getInvocationCacheHitCountTotal());
println(out, "invocationCache.miss", _server.getInvocationCacheMissCountTotal());
if (_proxyCache != null) {
   println(out, "proxyCache.hit", _proxyCache.getHitCountTotal());
   println(out, "proxyCache.miss", _proxyCache.getMissCountTotal());
}
println(out, "threads.active", _threadPool.getThreadActiveCount());
println(out, "threads.idle", _threadPool.getThreadIdleCount());
println(out, "threads.total", _threadPool.getThreadCount());
println(out, "threads.max", _threadPool.getThreadMax());

PortMXBean[] portList = _server.getPorts();
for (PortMXBean bean : portList) {
   String p = String.valueOf(bean.getPort());
   println(out, "port." + p + ".state", bean.getState());
   println(out, "port." + p + ".host", bean.getAddress() != null ? bean.getAddress() : "*");
   println(out, "port." + p + ".protocol", bean.getProtocolName());
   println(out, "port." + p + ".requestCountTotal", bean.getRequestCountTotal());
   println(out, "port." + p + ".requestCountKeepalive", bean.getKeepaliveCountTotal());
   println(out, "port." + p + ".requestCountClientDisconnect", bean.getClientDisconnectCountTotal());
   println(out, "port." + p + ".requestTimeTotal", bean.getRequestTimeTotal());
   println(out, "port." + p + ".requestBytesRead", bean.getReadBytesTotal());
   println(out, "port." + p + ".requestBytesWritten", bean.getWriteBytesTotal());
}
%>
Additional Information
Attached Files

- Relationships

- Notes
(0002960)
ferg
04-10-08 14:33

These are currently stub values.
 
(0003204)
ferg
06-17-08 14:33

server/2794
 

- Issue History
Date Modified Username Field Change
02-11-08 13:51 ferg New Issue
04-10-08 14:33 ferg Note Added: 0002960
04-24-08 15:36 mcmesser Issue Monitored: mcmesser
06-17-08 14:33 ferg Note Added: 0003204
06-17-08 14:33 ferg Assigned To  => ferg
06-17-08 14:33 ferg Status new => closed
06-17-08 14:33 ferg Resolution open => fixed
06-17-08 14:33 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker