Showing posts with label websphere. Show all posts
Showing posts with label websphere. Show all posts

Friday, August 17, 2012

Quick Ref

print AdminConfig.attributes('Application')
List Enterprise Applications
print AdminConfig.list('ApplicationDeployment') - EAR level

List Contents in Enterprise Applications
print AdminConfig.list('WebModuleDeployment') - WAR level

Print the first application name
app=AdminControl.queryNames('type=Application,*').split('\n')[0]
obj=AdminControl.completeObjectName(app) - Getting the object


The following commands are available for the AdminConfig object:

* attributes
* checkin
* convertToCluster
* create
* createClusterMember
* createDocument
* createUsingTemplate
* defaults
* deleteDocument
* existsDocument
* extract
* getCrossDocumentValidationEnabled
* getid
* getObjectName
* getSaveMode
* getValidationLevel
* getValidationSeverityResult
* hasChanges
* help
* installResourceAdapter
* list
* listTemplates
* modify
* parents
* queryChanges
* remove
* required
* reset
* save
* setCrossDocumentValidationEnabled
* setSaveMode
* setValidationLevel
* show
* showall
* showAttribute
* types
* uninstallResourceAdapter
* validate


The following commands are available for the AdminApp object:


* deleteUserAndGroupEntries
* edit
* editInteractive
* export
* exportDDL
* getDeployStatus
* help
* install
* installInteractive
* isAppReady
* list
* listModules
* options
* publishWSDL
* searchJNDIReferences
* taskInfo
* uninstall
* update
* updateAccessIDs
* updateInteractive
* view



The following commands are available for the AdminControl object:

* completeObjectName
* getAttribute
* getAttribute_jmx
* getAttributes
* getAttributes_jmx
* getCell
* getConfigId
* getDefaultDomain
* getDomainName
* getHost
* getMBeanCount
* getMBeanInfo_jmx
* getNode
* #rxml_admincontrol__cmd14
* getPort
* getPropertiesForDataSource (Deprecated)
* getType
* help
* invoke
* invoke_jmx
* isRegistered
* isRegistered_jmx
* makeObjectName
* #rxml_admincontrol__cmd24
* queryNames
* queryNames_jmx
* reconnect
* setAttribute
* setAttribute_jmx
* setAttributes
* setAttributes_jmx
* startServer
* stopServer
* testConnection
* trace

The following AdminTask commands are available but do not belong to a group:

* createServerType
* createTCPEndPoint
* getTCPEndPoint
* help
* listSSLRepertoires
* listTCPEndPoints
* listTCPThreadPools
* updateAppOnCluster

Friday, January 8, 2010

running scripts from an open wsadmin session

I would like to execute individual scripts from my local library, but rather than executing each individual script with the WebSphere overhead (i.e.wsadmin -f myscript.py).

The test file test.py

def main(args):
print AdminControl.queryNames('*')
print args
#enddef
# main method
main()



Next running the test script from an open session

$ wsadmin -port 8081 -host myhost -username memyselfandi
WASX7209I: Connected to process "WasPAdmgr" on node wasdpAdmrNode using SOAP connector; The type of process is: DeploymentManager
WASX8011W: AdminTask object is not available.
WASX7031I: For help, enter: "print Help.help()"
wsadmin>execfile('test.py')



# # This script can be included in the wsadmin command invocation like this:
# # wsadmin -lang jython -f test.py serverX nodeY c:/applicationZ myapp
# #
# # or the script can be execfiled from the wsadmin command line like this:
# # wsadmin> execfile ("test.py") or execfile("test.py")
# # wsadmin> test("serverX", "nodeY", "c:/applicationZ", "myapp")

Wednesday, October 7, 2009

Perl And Capturing remote stdout and strerr streams

The script opens the systemout.log of the nodeagent and finds the references to the incident streams and shows them on the screen. Helpfull for troubleshooting WebSphere startup problems.

#!/usr/bin/perl

open (CMD, "( /usr/bin/ssh foouser\@host1 'cd pf/logs/nodeagent/;cat systemout.log | grep resetIncidentStream | cut -b152-') |")
or die "ERROR: $!";
while () {
print $_, "\n";
open (CMD2, "( /usr/bin/ssh foouser\@host2 'grep -i exception $_') |");
while () {
print "$_";
}
}
close (CMD);