Logging command executed through WAS Admin Console

If your developing a solution to automate deployment of artifacts to WAS then it really helps if you can perform the same task using WAS Admin console figure out what commands got executed for those tasks and then execute those command manually or as a part of the automated deployment solution.

The WAS Admin Console provides three approaches that can help you do that

  • View Administrative scripting command for last action: Every time you perform an action a "View Administrative scripting command for last action" link shows up on the right hand side, if you click on the link a dialog box will open with the wasadmin command that is executed to perform the action


  • Log command assistance commands: You can check the "Log command assistance commands" preference to on in the Console preferences and once you do that every time you perform action in WAS Admin command the equivalent command will get saved in the log file.

    After i turned the preference on, i went to WAS Admin console and i did update the WebAppExtensionsSample.war enterprise application. Then i went to dmgr_profile_root/logs directory and i could see commandAssistanceJythonCommans_wsadmin.log file like this.

    # [9/7/09 11:36:26:843 PDT] ApplicationDeployment
    AdminApp.list()

    # [9/7/09 11:36:53:296 PDT] Enterprise Applications > Enterprise Applications
    AdminApp.update('WebAppExtensionsSample_war', 'app', '[ -operation update -contents WebAppExtensionsSample.war -nopreCompileJSPs -installed.ear.destination $(APP_INSTALL_ROOT)/dmgrCell01 -distributeApp -nouseMetaDataFromBinary -nodeployejb -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -contextroot /webappext ]' )

    # [9/7/09 11:37:06:328 PDT] Enterprise Applications > Enterprise Applications
    AdminConfig.save()

    The WAS admin console will keep adding every Jython command to this file. When i tried logging in with sunil user a separate command assistance log file was created

  • Enable command assistance notifications : You can turn this preference on to send Java Management Extensions (JMX) notifications that contain command assistance data from the administrative console. Enablement of the notifications allows integration with product tools such as the WebSphere Application Server Toolkit (AST) Jython editor. Enablement of this option is recommended for non-production environments only. I have not tried this option so far

1 comment:

Sy said...

It does not log the command if the we deploy partial/app zip file.
How can we find the command to run the partial app/zip file deployment.