Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
Created January 11, 2017 16:13
Show Gist options
  • Save jhoblitt/21f46d853fee9b70be8c2e5873d2e621 to your computer and use it in GitHub Desktop.
Save jhoblitt/21f46d853fee9b70be8c2e5873d2e621 to your computer and use it in GitHub Desktop.
Jenkins console groovy script to report jvm memory usage
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