glassfish_at_javadesktop.org wrote:
> hello,
>
> how can I know how many open sessions glassfish at a given time?
Well you can use asadmin to determine the nnumber of open sessions. Say
your virtual-server is the default "server" and your app is named
"webapp" the command would look like this:
asadmin get --monitor
server.applications.webapp.server.activesessionscurrent-count
This returns an output like this:
server.applications.webapp.server.activesessionscurrent-count = 999999
So on any decent Unix-like box enter (on one line):
asadmin get --monitor
server.applications.webapp.server.activesessionscurrent-count |
cut -d " " -f 3
And you will get the desired result. Note that this is not the total
number of currently open sessions on your system but only the open
sessions for the app named "webapp" on the virtual-server "server". But
given your intention this should be sufficient.
--
Wolfram Rittmeyer
> I like a feature like `number of current users` at my web site.
>
> Best.
> [Message sent by forum member 'segfault2007' (segfault2007)]
>
> http://forums.java.net/jive/thread.jspa?messageID=283853
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>