26.12.2 Get Inspection Data
Inspection data is information about the server state.
You can get the inspection data using the following code. Note that you must the
PGX_SERVER_GET_INFO
permission to access the server state data.
var serverState = instance.getServerState()
JsonNode serverState = instance.getServerState();
server_state = instance.get_server_state()
This returns a JsonNode
which contains all the
administration information, such as number of graphs loaded, number of sessions,
memory usage for graphs, properties, and so on.
{
"cached_graphs": [],
"published_graphs": [],
"graphs_currently_loading": [],
"sessions": [],
"tasks": [],
"pools": [],
"memory": {}
}
Note that the sessions
parameter lists all the sessions and the
memory used by the sessions along with the user information for each session.
{
"session_id": "530b5f9a-75c4-4838-9cc3-44df44b035c5",
"source": "testServerState",
"user": "user1", // session user information
...
}
Parent topic: Admin API