3.2. MBean Metrics Reference
Entries are divided into values you simply read (attributes) and calls you invoke with arguments (operations).
Session Counts
| Name | What it counts | How to read it |
|---|---|---|
| activeSessionCount | Sessions currently alive | An approximation of the number of connected users. Knowing the normal value helps you spot anomalies quickly |
| sessionIdCount | Session IDs held in the store | Counts the same thing as the value above |
| totalSessionCount | Total sessions managed by this application | |
| createdSessionCount | Cumulative sessions created since startup | A continuously increasing value. Watch the rate of increase |
| destroyedSessionCount | Cumulative sessions destroyed since startup | Read 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.
| Name | What it counts |
|---|---|
| createdSessionRateMostRecentSample | Sessions created per second |
| destroyedSessionRateMostRecentSample | Sessions destroyed per second |
| duplicatedLoginRateMostRecentSample | Duplicate 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
| Name | What it counts |
|---|---|
| duplicatedLoginCount | Cumulative duplicate logins detected since startup |
Memory
Values appear only when enableMemoryStatistics is on.
| Name | What it tells you |
|---|---|
| getMemorySize() | Memory occupied by all sessions, in bytes |
| getMemorySize(sessionId) | Size occupied by one particular session |
Lookups
| Operation | What 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
| Name | What it does |
|---|---|
| statisticsEnabled | Turns 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.