[jboss-user] [Beginners Corner] - Re: How to reliably count active sessions (re-post)

mrgordonz do-not-reply at jboss.com
Thu Aug 21 13:31:39 EDT 2008

"kjkoster" wrote : Dear Paul,
  | All of this information is available through JMX. If you want that information in a file (presumably to feed it into a monitoring system) there are a few JMX command line tools. Failing that you can also use curl or wget to query the JBoss console. Crude, but effective.
  | Suggested course of action:
  | 1. Hook up jconsole to JBoss (as per http://wiki.jboss.org/wiki/UseJDK5JConsole).
  | 2. Determine the objectname and the attribute of the mbean that shows the sessions you want to track.
  | 3. find a JMX command line tool (as per http://www.google.com)
  | 4. Script away
  | 5. ???
  | 6. Profit!
  | Hope this helps.
  | --
  | Kees Jan
  | http://java-monitor.com/forum

Hi Kees,

I have been trying to get jconsole to work, but so far I haven't had any luck.  Firstly I found that the JDK I am using (1.4.2_14, which is required by the application) doesn't have jconsole.  So I installed JDK 1.5.0_15.  When I launch jconsole and try to connect, I get a message in the little connection dialog saying "Connection failed".  On my server, JBoss is listening on port 1098 (not 1099), but I wouldn't think this would make a difference.  I am able to browse to http://localhost:8180/jmx-console/, and I get a huge long page with a heap of stuff I don't understand.  Can I use this instead of the jconsole Java application?

In my search for a JMX command line tool, I found some references to twiddle.  I have found twiddle is on my server (I believe it is part of JBoss), but when I try executing a command like:

twiddle -s localhost:1098 serverinfo -l

it sits there for ages and does nothing.  I left it for about 20 minutes, and nothing happened.

Is twiddle the kind of thing you had in mind for allowing me to retrieve the values I am looking for?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171840#4171840

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171840

More information about the jboss-user mailing list