java -XX:+UseG1GC -XX:+PrintCommandLineFlags -Xlog:gc:file=gc-%p.log -version
The above settings will create a gc log file with minimal gc output. -XX:+PrintCommandLineFlags will output the command line flags to the stderr.
-XX:+PrintCommandLineFlags