below is gc logging option to write the specific file
-verbose:gc
-Xloggc:/logs/gc.log
OK. Good. but when java app is restarted, old gc log contents in the file disappeared. I hope vm to append gc log to "/logs/gc.log" file.
does option for this exist? or i have to write shell script to back up old gc file?
You are explicitly requesting that the gc data goes to a file named 'gc.log'. You can append the date & pid to the filename to prevent this sort of collision. No mechanism within Hotspot exists to prevent the data from being overwritten.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With