http://www.wikio.fr WebSphere And Tivoli Tricks

Friday, May 6, 2011

Enabling Verbose Garbage Collection verbosegc on releases of Version 6.0 and 6.1 of WebSphere Application Server

In the Administrative Console, expand Servers and then click on Application Servers.



Click on the server that is encountering the "OutOfMemory" condition.



On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.






Under the Additional Properties section, click Java Virtual Machine.






Select the Verbose garbage collection check box.






Click Apply.



At the top of the Administrative Client, click Save to apply changes to the master configuration.



Stop and restart the Application Server.



If you wish to add extra JVM parameters read below:


The verbose garbage collection output is written to either native_stderr.log or native_stdout.log for the Application Server, depending on the SDK operating system as follows:



For AIX®, Microsoft® Windows®, or Linux®:

native_stderr.log





For Solaris™ or HP-UX:

native_stdout.log



Notes:

For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Settings page:



-Xverbosegc:file=<name>



Where <name> is a valid fully qualified filename.



For a Solaris system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Settings page:



-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC



The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.


If you make changes to the JVM parameters you must restart the Application Server.
------------------------------------------------------------------





Enabling verbosegc on Version 6.0 Deployment Manager

Open the Administrative Console.








Expand System Administration.



Click Deployment Manager.



Expand Java and Process Management.



Click Process Definition.




Click Java Virtual Machine












Select the Verbose Garbage Collection check box.






Click OK.



Click Save. The parameters will take affect at the next Deployment Manager restart.



If you wish to add extra JVM parameters read below:


For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:



-Xverbosegc:file=<name>



Where <name> is a valid fully qualified filename.



For a Solaris 1.4 JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:



-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC



The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.



If you make changes to the JVM parameters you must restart the Deployment Manager.
---------------------------------------------------------------



Enabling verbosegc on Version 6.0 Node Agent

Open the Administrative Console.





Expand System Administration.





Click Node Agents.






Click on the Node Agent.






Expand Java and Process Management.








Click Process Definition.






Click Java Virtual Machine.





Select the Verbose Garbage Collection check box.






Click OK.





Click Save.





Click Save. The parameters will take affect at the next Node Agent restart.



If you wish to add extra JVM parameters read below:


Notes:

For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:



-Xverbosegc:file=<name>



Where <name> is a valid fully qualified filename.







For a Solaris 1.4.X JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:



-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC



The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.



If you make changes to the JVM parameters you must restart the Nodeagent.


References:
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21114927

Thursday, May 5, 2011

Setting session time outs in WebSphere

There are two main ways that sessions can be set in WebSphere.
1. For the entire server default = 30 mins
Server Panel:
Application servers > [Server Name] > Session management


or
2. For a specific deployment (application)
Application Panel:
Enterprise Applications > [Application Name] > Session management

Installing a WebSphere Application Server 7 profile

By running the <websphere_install_root>/bin/pmt.sh tool you can create an application server profile.


Click "Create" button to start the profile creation wizard



It is recommended that you use the advanced profile creation, as this will give you more choice. If you use the Typical profile creation option the wizard will give default settings and names to nodes and cells and you may not want this.



You need to deploy the administration console if this is your management server otherwise you have no GUI way to administer the Application Server.

It is useful to deploy the default application, the snoop servlet is great for testing IHS and Workload Management.



I personally like to ensure that all profile are saved to the profiles folder or even a completely independent file system or set of folders not in the same path as the install binaries. This makes it easier to manage profiles and remove them if unwanted.

I also made this the default profile which means that when you run the wsadmin tool you do not need to specify the profile you wish to use, it will use this profile by default.



I find it good that you use node names that are human readable, however if you environment is going to have many WebSphere nodes, then use an intelligent naming scheme.



It is recommended that you implement Administrative security. Remember that you need to edit soap.client.props in the <wwebsphere_install_root>/profiles/<your_profile>/properties and add the password you have set here.



You can import an existing SSL cert or just use a self cert.




If you generate a self signed cert and this server is just for testing I would probably increase the certificate to 15 years so you don't have to worry about it expiring, however now with WebSphere 7 SSL is so much easier to administer.




Because I had installed the management profile first,the ports have to be changed, this all depends on what profiles have been installed before.



Sometime I like the Linux service to be installed,this is a development machine so I don't mind root being used. Consider running WebSphere as a non-root user once installed. Best to install as root then chown to another user for runtime.



In this case I want to control manually my web Server definitions. These can be created later in the Administrative console. Web Server definitions are for IHS (IBM HTTP Server) and are often used to workload management and load balancing.



Summray, click "Create"



Click finish to close, don't need to launch first steps console




./startServer.sh server1

http://<www_your_domain.com>:9061/ibm/console

Note: The administrative port is 9061 in my screen shots,but normally 9060 by default.

I found that if you don't enable the SSL port in the firewall then the console cannot redirect to port 9043 which is the SSL port for the administrative console. if you go to port 9060 then it wants to redirect to 9043 or in the example above 9061 wanted to redirect to 9044.