Created
January 11, 2017 16:13
-
-
Save jhoblitt/21f46d853fee9b70be8c2e5873d2e621 to your computer and use it in GitHub Desktop.
Jenkins console groovy script to report jvm memory usage
This file contains 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
int mb = 1024*1024 | |
Runtime runtime = Runtime.getRuntime() | |
out.println runtime.freeMemory() / mb | |
out.println runtime.totalMemory() / mb | |
out.println runtime.maxMemory() / mb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment