This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Schedule this in crontab to run one every 15 minutes. | |
| # NOTE: User environment variables are not accessible to cron by default, | |
| # so you may need to introduce these in order for the nodetool commands | |
| # to be found and work properly. | |
| # Example crontab where /etc/profile has the vars needed to find nodetool and java: | |
| # */15 * * * * . /etc/profile && /path/to/collect_histograms.sh >> /path/to/collect_histograms.log 2>&1 | |
| set -o errexit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iostat -x -c -d -t 1 3600 > $(hostname -i)-$(date +%Y%m%d_%H)-iostat.out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| shopt -s expand_aliases | |
| # Enable debugging by setting TRACE=1 | |
| if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Enable debugging by setting TRACE=1 | |
| if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi | |
| OUTPUT_DIR="/tmp/$(hostname -i)_$(date +%Y%m%d_%H-%M-%S).jfr" | |
| IS_JFR_RUNNING="$(sudo -u cassandra jcmd $(cat /run/dse/dse.pid) JFR.check | grep -o Recording)" | |
| TPSTATS_CONDITION="$(nodetool tpstats | grep ^MemtableFlushWriter | awk '$2 > 4')" | |
| if [[ "${TPSTATS_CONDITION}" ]]; then |