Tuesday, 14 May 2013

Websphere: Setup the verbose:gc logging using 'wsadmin' Tool


Hi Everyone,

Execute the following steps to enable the verbose:gc logging in your setup. Or you can use some steps to check the current status of your Java Virtual Machine configuration by using wsadmin tool 
1.Launch the wsadmin. Run these commands in a command prompt window:

:/IBM/WebSphere/AppServer/profiles/AppSrv01/bin

:/IBM/WebSphere/AppServer/profiles/AppSrv01/bin $ ./wsadmin.sh

This output will appear after running the command:

WASX7209I: Connected Node DefaultNode ?process "server1" by SOAP connector Process Type UnManagedProcess

wsadmin>

2. Set the server environment.

wsadmin>set server1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]

server1(cells/DefaultNode/nodes/DefaultNode/servers/server1|server.xml#Server_1214551833906)

3.Get the definition of JVM.

wsadmin>set jvm [$AdminConfig list JavaVirtualMachine $server1]

(cells/DefaultNode/nodes/DefaultNode/servers/server1|server.xml#JavaVirtualMachine_1214551833937)

4.Check the current JVM setting.

wsadmin>$AdminConfig show $jvm

{bootClasspath {}}
{classpath {}}
{debugArgs "-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket.server=y,suspend=n,address=7777"}
{debugMode false}
{disableJIT false}
{genericJvmArguments {}}
{hprofArguments {}}
{initialHeapSize 128}
{maximumHeapSize 256}
{runHProf false}
{systemProperties {}}
{verboseModeClass false}
{verboseModeGarbageCollection false}
{verboseModeJNI false}

5.Set the verboseModeGarbageCollection variable to true.

wsadmin>$AdminConfig modify $jvm {{verboseModeGarbageCollection true}}

6.Check the changed JVM setting.

wsadmin>$AdminConfig show $jvm

{bootClasspath {}}
{classpath {}}
{debugArgs "-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777"}
{debugMode false}
{disableJIT false}
{genericJvmArguments {}}
{hprofArguments {}}
{initialHeapSize 128}
{maximumHeapSize 256}
{runHProf false}
{systemProperties {}}
{verboseModeClass false}
{verboseModeGarbageCollection true}
{verboseModeJNI false}

7.Save the JVM setting.

wsadmin>$AdminConfig save

8.Close the wsadmin console.

wsadmin>quit

9.Restart the Windows service IBM WebSphere Application Server.

10.Check the verbose:gc logs. By Default, the verbose:gc logs are located here:

/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1 $ cat native_stdout.log

/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1 $ cat native_stderr.log


Effort only fully releases its reward after a person refuses to quit.”

Regards,
Akhilesh B. Humbe

No comments:

Post a Comment

Popular Posts