Tuesday, May 26, 2009

Writitng Verbose GC to a Specified Log –Xverbosegclog, How do you get verbose GC output to another log besides native_stderr?

Verbose GC data is captured by default in the native_stderr.log for IBM AIX®, Microsoft Windows® and Linux® and native_stdout.log for SUN Solaris and HP -UX.

WebSphere Application Server 7.0
-Xverbosegclog[:[,,]]
Causes -verbose:gc output to be written to the specified file. If the file cannot be found, -verbose:gc tries to create the file, and then continues as normal if it is successful. If it cannot create the file (for example, if an invalid filename is passed into the command), it will redirect the output to stderr.
If you specify and the -verbose:gc output is redirected to files, each containing GC cycles.
The dump agent tokens can be used in the filename. See Dump agent tokens for more information. If you do not specify , verbosegc.%Y%m%d.%H%M%S.%pid.txt is used.

Dump agent tokens
Use tokens to add context to dump file names and to pass command-line arguments to the tool agent.
The tokens available are listed in the table below:
Token Description
%Y Year (4 digits)
%y Year (2 digits)
%m Month (2 digits)
%d Day of the month (2 digits)
%H Hour (2 digits)
%M Minute (2 digits)
%S Second (2 digits)
%pid Process id
%uid User name
%seq Dump counter
%tick msec counter
%home Java™ home directory
%last Last dump
%job Job name (z/OS® only)
&DS Dump Section.

An incrementing sequence number used for splitting TDUMP files to be less than 2 GB in size. (z/OS 64-bit version 1.10 or newer only)

1. In the administrative console, click Servers > Server Types > WebSphere application servers > server_name. Then, under Server Infrastructure, click Java™ and process management > Process definition.
2. Select Java Virtual Machine .
3. Specify values for the JVM settings as needed and click OK.
4. Click Save on the console task bar.
5. Restart the application server.

WebSphere Application Server 6.1

-Xverbosegclog:[,,]
Causes -verbose:gc output to be written to the specified file. If the file cannot be found, -verbose:gc tries to create the file, and then continues as normal if it is successful. If it cannot create the file (for example, if an invalid filename is passed into the command), it will redirect the output to stderr.
If you specify and the -verbose:gc output is redirected to files, each containing GC cycles.
1. In the administrative console, click Servers > Application Servers >server. Then, under Server Infrastructure, click > Java and Process Management > Process Definition .
2. Select Java Virtual Machine.
3. Specify values for the JVM settings as needed and click OK.
4. Click Save on the console task bar.
5. Restart the application server.

WebSphere Application Server 6.0 and 5.1

-Xverbosegclog:
Causes verboseGC output to be written to the specified file. If the file cannot be found, verboseGC tries to create the file, and then continues as normal if it is successful. If it cannot create the file (for example, if an invalid filename is passed into the command), it will redirect the output to stderr. Use .%p to append the process id to the file name.

-Xverbosegclog:
1. Filename must contain a "#" (hash symbol), which is substituted with a generation identifier, starting at X and Y are integers. This option works similarly to -Xverbosegclog:, but, in addition, the verboseGC output is redirected to X files, each containing verboseGC output from Y GC cycles.

**Example: -Xverbosegclog:/opt/WebSphere/logs/gc#.log,50,100
The above setting would create 50 log files named gc.log with 100 GC cycles each.
2. In the administrative console, click Servers > Application Servers >server. Then, under Server Infrastructure, click > Java and Process Management > Process Definition .
3. Select Java Virtual Machine.
4. Specify values for the JVM settings as needed and click OK.
5. Click Save on the console task bar.
6. Restart the application server.

1 comment:

Bookmark and Share
Join the TrafficZap Exchange