Last active
March 20, 2021 14:34
-
-
Save justdoit0823/e9feedde78ec3c29ad62144a35b864a4 to your computer and use it in GitHub Desktop.
Stat g1 gc interval in jvm 8 with awk.
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
# pipe | |
awk '/GC pause/ {split($2, a, ":"); print a[1]}'|awk 'NR % 2 == 1 {t1 = $1}; NR % 2 == 0 {d = $1 - t1; print d; next}' | |
# gc log file | |
awk '/GC pause/ {split($2, a, ":"); print a[1]}' gc.log|awk 'NR % 2 == 1 {t1 = $1}; NR % 2 == 0 {d = $1 - t1; print d; next}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment