Skip to content

Instantly share code, notes, and snippets.

@thermz
Created September 14, 2022 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thermz/1471c53d577c070cce8a1bbf88cf72a4 to your computer and use it in GitHub Desktop.
Save thermz/1471c53d577c070cce8a1bbf88cf72a4 to your computer and use it in GitHub Desktop.
Simple AWK script to print all the JVM params of a running process on a linux machine
#!/bin/bash
ps aux | grep $1 | grep "\-XX" | awk '{ for(i=1;i<NF;i++){ if( match($i,/\-XX.*/)) { print $i } } }' | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment