I don't know about you, but I generally get tired pretty quick of turning trace on and off for a cluster. I'll show how to write a script to make this easier.
This script shows how to enable trace for all members of a cluster either just transiently on the current running servers or persistently for the next time the cluster restarts. I use jython mainly because I can't read jacl at all, I find jython much easier to write.
The script talks to the deployment manager so it must be running for this script to operate.
Here is the jython script to execute:
Clustertrace jython
Here is a windows script to make using it easier:
Clustertrace windows script
To use it, ensure the DM is running and run the script on the DM machine. You may need to tweak the cmd file to specify the host for the DM. For now, you need to run the script on the dm node. Just specify the command line args to wsadmin to connect to the right server otherwise.
clustertrace (perm|temp) traceString [--c clustername | --s servername]
perm means makes the changes permanently. They won't take effect until the impacted server(s) are restarted. temp means make the change right now on the running server(s) but if they are restarted then they revert to the permanent trace setting which can be changed with the perm option.
The c option allows a cluster name to be specified and all cluster members will receive the trace string. If you're using temp then only the running cluster members receive the string.
The s option allows a specific server to be set rather than a whole cluster. So, to turn on trace for a cluster use:
clustertrace perm com.ibm.ws.*=all=enabled --c billyCluster
To turn off trace use:
clustertrace perm com.ibm.ws.*=all=disabled --c billyCluster
Change perm to temp to have the change take effect immediately on any running cluster members.
I'm having a hard time extrapolating how to tell if a cluster is running so I can stop it prior to uninstalling and re-installing a EAR. Do you have anymore Jython examples that might help me?
Posted by: Curtis Yanko | September 09, 2005 at 02:36 PM
http://www.crystal-gift-award.com
world's finest crystal awards
We have more than 15 years experience in creating the world's finest crystal awards. We are a leading supplier of unique and exquisite crystal recognition awards to the promotional products industry. Consequently, we partner with our customers to create award programs that produce an elegant and unforgettable experience. Let us supply the perfect award for your next corporate event,employee recognition program, or employee incentive program.
Posted by: Aloke Saha | June 08, 2009 at 08:23 AM