Created
July 23, 2013 12:52
-
-
Save kurtcebe/6062126 to your computer and use it in GitHub Desktop.
[WAS] wsadmin script for setting runtime traces on multiple servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
if len(sys.argv) < 1: | |
print 'please supply trace string as parameter' | |
sys.exit(1) | |
print 'tracestring is:' , sys.argv[0] | |
tsc = AdminControl.queryNames('WebSphere:type=TraceService,*').split("\n") | |
for ts in tsc: | |
# this if block is used to filter server names, comment to set traces also to dmgr and nodeagents | |
if ts.find('your_server_name_prefix') > 0: | |
print 'enabling traces for: ' , ts | |
AdminControl.setAttribute(ts, 'traceSpecification', sys.argv[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment