Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toptal/jvm-monitoring-agent
Monitor JVM from within, detect thread blocks and automatically save threads dump
https://github.com/toptal/jvm-monitoring-agent
javaagent jvm-monitor thread-dump
Last synced: 2 months ago
JSON representation
Monitor JVM from within, detect thread blocks and automatically save threads dump
- Host: GitHub
- URL: https://github.com/toptal/jvm-monitoring-agent
- Owner: toptal
- License: agpl-3.0
- Created: 2017-03-09T02:17:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T10:51:59.000Z (almost 4 years ago)
- Last Synced: 2024-04-09T22:10:48.586Z (10 months ago)
- Topics: javaagent, jvm-monitor, thread-dump
- Language: Java
- Size: 65.4 KB
- Stars: 51
- Watchers: 157
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# JVM Monitoring Agent
Monitor JVM threads and save a threads dump when threads get blocked for given
time.## Usage
Download the jar from https://github.com/toptal/jvm-monitoring-agent/releases
Add it to the command line of the application you wish to monitor:
```bash
java -javaagent:jvm-monitoring-agent-0.9.0.jar=threshold=1000,debug ...rest of command
```## Configuration flags/options
### `debug`
Enables debugging output - in cases you suspect something is wrong it might provide additional information.
To debug options problems make it first passed parameter.### `path=...`
Specifies where to save threads dumps.
### `interval=...`
Specifies how often to check thread list for blocked threads. (Milliseconds)
### `threshold=...`
Specifies how long thread needs to be blocked before dumps will be saved. (Milliseconds)
### `delay=...`
Specifies delay between saving consecutive threads dumps. (Milliseconds)
### `filterRegex=...`
Specifies a regular expression to filter known blocked threads. (Milliseconds)
# Examples
Examples in `examples/` are meant to check this library manually.
### Check the agent does not interrupt exit.
```bash
rm tmp/*
ant && (cd examples/empty/ && ant) &&
java -javaagent:dist/jvm-monitoring-agent.jar -jar examples/empty/dist/empty.jar
ls -l tmp/
```There should be no output from the execution.
### Check the agent does find blocked threads.
```bash
rm tmp/*
ant && (cd examples/SynchronizedThreads/ && ant) &&
java -javaagent:dist/jvm-monitoring-agent.jar=debug,threshold=1000,delay=5000 -jar examples/SynchronizedThreads/dist/SynchronizedThreads.jar
ls -l tmp/
```Execution is supposed to show arguments and times it took each second.
# License
JVM Monitoring Agent is licensed under GNU Affero General Public License (GNU AGPLv3).