An open API service indexing awesome lists of open source software.

https://github.com/nicolas-raoul/commons-dbcp-monitoring

Monitor what threads are using connections from the DBCP pool, and generate a nice graph to understand what is happening.
https://github.com/nicolas-raoul/commons-dbcp-monitoring

commons-dbcp dbcp dbcp-pool graph java monitoring thread tomcat

Last synced: about 1 month ago
JSON representation

Monitor what threads are using connections from the DBCP pool, and generate a nice graph to understand what is happening.

Awesome Lists containing this project

README

        

Commons-DBCP-monitoring
=======================

Monitor what threads are using connections from the DBCP pool, and waiting for connection. Generate a nice table to understand what is happening.

Usage:

1. Replace your application's `commons-dbcp-1.4.jar` with [commons-dbcp-1.4-monitored.jar](https://github.com/nicolas-raoul/Commons-DBCP-monitoring/raw/master/commons-dbcp-1.4-monitored.jar) (rename it to pretend it is really the same JAR file)
2. Run your application, making sure the output is directed to a log file
3. When you want, generate a graph:
1. Run: `./generate-dbcp-graph.sh `
2. Wait while `dbcp-connected-by-thread.csv` and `dbcp-waiting-by-thread.csv` are generated.
3. Open the CSV files with any spreadsheet program (like LibreOffice) and use conditional formatting to end up with the table below. To create the graph below, create a `SUM` column for each CSV and use your spreadsheet program's graphing feature.

![Threads using connections](https://raw.github.com/nicolas-raoul/Commons-DBCP-monitoring/master/screenshots/threads-using-connections.png)
![Combined using/waiting graph](https://raw.github.com/nicolas-raoul/Commons-DBCP-monitoring/master/screenshots/combined-graph.png)

---

Compilation:

1. Download the [Commons DBCP 1.4 source code](http://ftp.jaist.ac.jp/pub/apache//commons/dbcp/source/commons-dbcp-1.4-src.tar.gz)
2. Uncompress it.
3. Copy all files from the `patch-for-commons-dbcp-1.4-src` directory to into the uncompressed directory
4. Run Ant

This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).