Author Archives: richard.bettison
su – command inside a loop
If you have a script that runs su commands from inside a loop, you might find that the loop terminates silently before all of the iterations are complete. cat $file | while read theline do … Get the user … Continue reading
A few useful find commands
Find all files below the current directory not owned by user wasadmin. Get a full listing of the results: /var/websphere/was7/MVProdEnv/AppServer/ > find . ! -user wasadmin -ls Change the ownership of these files: find . ! -user wasadmin -exec chown … Continue reading
Example WebSphere Jython to print help info
The following little code snippet will help print out help info for some WebSphere high level types (AdminTask and AdminConfig : # List AdminTask commands global AdminTask print “AdminTask:” print AdminTask.help(‘-commands’) # List AdminConfig types print “AdminConfig:” print AdminConfig.help(‘types’) print … Continue reading
Example WebSphere Jython for work areas
Required for this code: CellName, nodeName, appServerOrclusterMemberName # Application Server – Work Area asWorkAreaEnable = “false” asWorkAreaEnableWebServicePropagation = “false” asWorkAreaMaxReceiveSize = 10000 asWorkAreaMaxSendSize = 10000 server = AdminConfig.getid(“/Cell:”+cellName+”/Node:”+nodeName+”/Server:”+appServerOrclusterMemberName+”/” ) #————————————————————– # Change Work Area settings #————————————————————– if (cmp(asWorkAreaEnable, “true”) == … Continue reading
Example WebSphere Jython for Setting Object Request Broker parameters
Setting Object Request Broker (ORB) for an application server Required for this code: CellName, nodeName, appServerOrclusterMemberName # Application Server – Object Request Broker Settings asORBrequestTimeout = 180 asORBrequestRetriesCount = 1 asORBrequestRetriesDelay = 0 asORBconnectionCacheMaximum = 240 asORBconnectionCacheMinimum = 100 asORBcommTraceEnabled … Continue reading
Example WebSphere Jython Application Server Transaction Settings
The following sets some specific transaction properties for the application server. It will also set any additional custom properties set in the asTransactionProperties variable. Required for this code: CellName, nodeName, appServerOrclusterMemberName asTransactionLogDirectory = “;4M” means, use the default directory, and … Continue reading
Example WebSphere Jython to set the Application Server Monitoring policy
Example WebSphere Jython to set the Application Server Monitoring policy (the Application server restart state) Required for this code: CellName, nodeName, appServerOrclusterMemberName # Possible values for nodeRestartState are “stopped”, “running” and “previous” nodeRestartState = “previous” #————————————————————– # Change the Monitoring … Continue reading
Example WebSphere Jython to set Application server log settings
The following code shoows how to modify log settings for an Application server or cluster member. Required for this code: CellName, nodeName, appServerOrclusterMemberName server = AdminConfig.getid(“/Cell:”+cellName+”/Node:”+nodeName+”/Server:”+appServerOrclusterMemberName+”/” ) maxLogFileCount = 30 logRolloverHour = 7 logRolloverPeriod = 12 logRolloverSize = 0 #————————————————————– … Continue reading
Example WebSphere Jython to set variables at scope
The following jython sets WebSphere variables at cell scope: See also Convert String to List post for wsadminToList function. #—————————————————————- # Set or Update WebSphere Environment variables at cell scope #—————————————————————- def setWasVariables ( varname, vardesc, varval ): varDesc_attr = … Continue reading






