Monitoring user sessions
Martini's HTTP sessions are all handled by the embedded Tomcat instance. To help monitor and manage your instance, the Martini Runtime Admin web interface provides a page for viewing and terminating active HTTP sessions.
Viewing active sessions
To access the Sessions page, hover over the Connections menu and click User Sessions from the appearing submenu.
This will lead you to a page that lists all of the active sessions, along with their key information.
Viewing session information
In order to reveal more data about an active session, click on its session ID in the table. A panel should will up on the right side of your screen showing the details of the selected session.
The following session properties will be presented in the panel:
|Context||Servlet context's context path|
|Remote Host||The last client that sent the request|
|User Agent||The last HTTP request's user agent, extracted from its
|Requests||The total number of HTTP requests executed during the session|
|Last URI Requested||The last URI requested during the session|
|Service Invokes||The total number of HTTP request invocations that are counted as service calls|
|Total Request Time (ms)||The total duration of all HTTP requests|
|Total Service Time (ms)||The total duration of all service calls|
|Longest Request Time (ms)||The duration of the longest-running HTTP request during the lifespan of the session|
|Longest Service Time (ms)||The duration of the longest-running service invoke during the lifespan of the session|
|Average Request Time (ms)||Average duration of HTTP requests during the lifespan of the session|
|Average Service Time (ms)||Average duration of service invokes during the lifespan of the session|
|Requests per minute||The total number of requests per minute during the lifespan of the session|
|Invokes per minute||The total number of service invokes per minute during the lifespan of the session|
Terminating a session
To terminate an active HTTP session, locate the session you want to terminate in the table and then click Kill on the right hand side of its row.
Martini also provides REST endpoints for maintaining user sessions. This API allows you to remotely do things such as:
- Retrieve a list of sessions
- Get statistics for a session
- Terminate a session