【问题标题】:Enabling wsadmin Console assistance启用 wsadmin 控制台帮助
【发布时间】:2014-04-11 16:43:57
【问题描述】:

我在 Websphere > 控制台首选项中启用了“记录命令辅助命令”选项。 该文档说以下内容: 指定是否将所有命令帮助 wsadmin 数据记录到文件中。此文件保存到 ${LOG_ROOT}/server/commandAssistanceJythonCommands_user name.log: server 是运行控制台的服务器进程,例如 server1 或 adminagent。 server 是运行控制台的服务器进程,例如 dmgr、server1、adminagent 或 jobmgr。 用户名是管理控制台用户名。 当您使用管理代理管理配置文件时,命令帮助日志将放在管理代理正在管理的配置文件的位置。 ${LOG_ROOT} 变量定义配置文件位置。

我找不到 LOG_ROOT 的默认值。

【问题讨论】:

    标签: websphere-7 wsadmin


    【解决方案1】:

    LOG_ROOT 的实际值取决于其他变量的值。这些变量在 AdminConsole -> Environment -> WebSphere Variables 中定义。因为变量存在于不同的范围(单元、节点、集群、服务器),所以找到实际值可能有点棘手。最终的解决方案是使用 wsadmin 和 AdminOperations.expandVariable 操作。

    对于ND环境:

    adminOperations = AdminControl.queryNames('WebSphere:*,type=AdminOperations,process=dmgr').splitlines()[0]
    print AdminControl.invoke(adminOperations, 'expandVariable', ['${LOG_ROOT}/commandAssistance_ssdimmanuel.log'])
    

    对于独立的 WAS(假设服务器名称是 'server1'):

    adminOperations = AdminControl.queryNames('WebSphere:*,type=AdminOperations,process=server1').splitlines()[0]
    print AdminControl.invoke(adminOperations, 'expandVariable', ['${LOG_ROOT}/commandAssistance_ssdimmanuel.log'])
    

    广告模式

    使用 WDR 库 (http://wdr.github.io/WDR/),您只需一行即可完成:

    对于ND:

    print getMBean1(type='AdminOperations', process='dmgr').expandVariable('${LOG_ROOT}/commandAssistance_ssdimmanuel.log')
    

    对于独立的 WAS:

    print getMBean1(type='AdminOperations', process='server1').expandVariable('${LOG_ROOT}/commandAssistance_ssdimmanuel.log')
    

    【讨论】:

      猜你喜欢
      • 2011-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-27
      • 1970-01-01
      • 2010-11-08
      • 1970-01-01
      相关资源
      最近更新 更多