Websphere 7 SIB队列:如何访问队列深度wsadmin命令?

时间:2011-11-16 14:13:33

标签: websphere websphere-7 wsadmin

我想使用属于WebSphere 7的WSADMIN命令来查询系统上队列的状态。

任何人都可以帮助我吗?

由于

3 个答案:

答案 0 :(得分:2)

对于任何有兴趣的人,这是杰夫答案的jython版本。

qpoint = 'WebSphere:*,type=SIBQueuePoint'
queues = AdminControl.queryNames(qpoint).split()

for q in queues:
   identifier = AdminControl.getAttribute(q, 'identifier')
   size = AdminControl.getAttribute(q, 'depth')
   print identifier + ' size: ' + size + ' messages'
   print AdminControl.getAttributes(q)

答案 1 :(得分:1)

所以为了找出队列深度我写了这个JACK脚本......

set qpoint "WebSphere:*,type=SIBQueuePoint"
set queues [$AdminControl queryNames $qpoint]
foreach q $queues {
set identifier [$AdminControl getAttribute $q identifier]
set size [$AdminControl getAttribute $q depth]
puts "$identifier size: $size messages"
puts [$AdminControl getAttributes $q]

将它装在盒子上的文件jeff.jacl中并调用命令......

/opt/IBM/WebSphere/AppServer/bin # ./wsadmin.sh -profile jp.cmd.jacl

你得到了什么?好吧,你得到了一大堆令人敬畏的东西!

WASX7209I: Connected to process "server1" on node WRSNode using SOAP connector; The type of process is: UnManagedProcess
CHANGE_REQUEST size: 15 messages
{depth 15} {state ACTIVE} {id CFAC834BE6AF5D9A30451D01_QUEUE_51} {identifier CHANGE_REQUEST} {highMessageThreshold 50000} {sendAllowed true}
ETL_DEAD size: 378 messages

接下来的工作是看看我是否可以直接使用JACL使用的所有Java代码。

答案 2 :(得分:0)

为了使用WebSphere PMI检索SIB队列的深度,您需要选择以下两个计数器:

AvailableMessageCount和UnavailableMessageCount

以下是:从WebSphere Application Server管理控制台,转到托管消息传递引擎的应用程序服务器的性能监视基础结构(PMI)面板:

应用程序服务器> your_app_server_name>绩效监测基础设施(PMI)

默认情况下,您将位于“配置”选项卡上。如果希望在不重新启动应用程序服务器的情况下启动此监视,则可以选择切换到“运行时”选项卡。

进入PMI面板后,单击最后一个单选按钮标签“Custom”链接。这会将您带到自定义监视级别面板。从左侧导航树中,选择: - SIB服务 - SIB消息传递引擎 - * - 目标 - 队列选择两个计数器:AvailableMessageCount和UnavailableMessageCount,然后单击位于顶部的“启用”按钮。此时应保存您的设置。

相关问题