Skip to content

3.2. MBean Metrics Reference

Entries are divided into values you simply read (attributes) and calls you invoke with arguments (operations).

Session Counts

NameWhat it countsHow to read it
activeSessionCountSessions currently aliveAn approximation of the number of connected users. Knowing the normal value helps you spot anomalies quickly
sessionIdCountSession IDs held in the storeCounts the same thing as the value above
totalSessionCountTotal sessions managed by this application
createdSessionCountCumulative sessions created since startupA continuously increasing value. Watch the rate of increase
destroyedSessionCountCumulative sessions destroyed since startupRead alongside the creation count to tell whether sessions are being cleaned up normally

Per-Second Rates

Per-second values over the most recent sample interval. Use them to see instantaneous load.

NameWhat it counts
createdSessionRateMostRecentSampleSessions created per second
destroyedSessionRateMostRecentSampleSessions destroyed per second
duplicatedLoginRateMostRecentSampleDuplicate logins per second

To get all three at once, use the getPerformanceMetrics() operation. It returns a table containing the three entries SessionsCreatedPerSecond, SessionsDestroyedPerSecond, and DuplicatedLoginPerSecond.

Duplicate Logins

NameWhat it counts
duplicatedLoginCountCumulative duplicate logins detected since startup

Memory

Values appear only when enableMemoryStatistics is on.

NameWhat it tells you
getMemorySize()Memory occupied by all sessions, in bytes
getMemorySize(sessionId)Size occupied by one particular session

Lookups

OperationWhat it does
getSessionIds(batchSize)Returns as many session IDs as the count you specify
getSessionAttributes(sessionId)Returns all values held in that session

The session ID is the value of the user's __KSMSID__ cookie. Use that value to look up a particular user when investigating their problem.

Control

NameWhat it does
statisticsEnabledTurns metric collection on and off. Can be changed at runtime
reset()Resets the cumulative figures (creation, destruction, duplicate logins) to 0
shutdown()Stops metric collection

reset() is useful for comparing before and after a load test. The active session count is not reset — the call rewinds only the cumulative counters, not the actual sessions.