You can inspect JDBC activity by using
vm.jdbc
package.
1 Node
The JDBCNode
is the root JDBC controller. It holds information about all
active servers, its connection pools and each database connections.
To access the jdbc node you can:
Copy
<script> //============================================================================ // Get jdbc node //============================================================================ var node = new Ax.vm.jdbc.Node(); // Log global SQL history console.log(node.getHistory()); // Log global SQL errors console.log(node.getErrors()); // Log global SQL by statement re-use console.log(node.getTopSQLByUse()); // Log global SQL by time console.log(node.getTopSQLByTime()); //Log global SQL insert operations console.log(node.getInsert()); // Log global SQL delete operations console.log(node.getDelete()); // Log global SQL update operations console.log(node.getDelete()); // Log global SQL other operations console.log(node.getUpdate()); //============================================================================ // Get list of all servers // VTableConcurrentHashMap<string, JDBCServer> //============================================================================ console.log(node.getServers().toResultSet()); // find a server by rowid. var server = node.getServers().find(1); // For a given server, see it's detailed activity if (server != null) { console.log(server.getHistory()); console.log(server.getErrors()); console.log(server.getTopSQLByUse()); console.log(server.getTopSQLByTime()); } // ============================================================================ // Get the list of all active databases // VTableConcurrentHashMap<string, JDBCDatabase> //============================================================================ console.log(node.getDatabases().toResultSet()); // find a database by rowid. var database = node.getServers().find(1); // For a given databse, see it's detailed activity if (database != null) { // ... } //============================================================================ // Get the list of all active pools (each pool hanles 1 to many db connections) // VTableConcurrentHashMap<string, JDBCPoolFactory> //============================================================================ console.log(node.getPools().toResultSet()); // find a database by rowid. var pool = node.getServers().find(1); // For a given pool, see it's detailed activity if (database != null) { // ... } </script>