Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
bash for-loop example - doing 60 thread dumps of a java process, at 1-second intervals. Useful for diagnosing TeamCity performance issues.
for ((a=1; a <= 60; a++)); do jstack 21819 > thread-dump.$a; sleep 1; echo $a; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.