Initial Release
Script Name: auto_dump.sh
Version: 1.0.0
Description:
Bash script to monitor Java heap memory usage and automatically trigger a heap dump when usage exceeds a specified threshold.
Features:
- Monitors Java heap memory usage using jcmd.
- Configurable threshold for heap memory usage (default is 95%).
- Automatically triggers a heap dump when the threshold is exceeded.
- Runs in a continuous loop, checking heap memory usage every 60 seconds (configurable).
Dependencies:
jcmd
utility.pgrep
,awk
,sed
, andgrep
commands available in the environment.- Ensure the path for heap dumps (
/path/to/heapdumps/
) exists and is writable by the script. - Adjust the
THRESHOLD
and sleep interval according to your requirements.
Contributors
Full Changelog: https://github.com/hary-singh/auto-heap-dump/commits/v1.0.0