首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用wsadmin列出活动会话

使用wsadmin列出活动会话
EN

Stack Overflow用户
提问于 2012-06-13 22:30:32
回答 1查看 5K关注 0票数 2

我正在尝试用wsadmin编写一个脚本,它将检索活动会话的总数。我浏览了一下网络,没有发现任何真正有帮助的东西。有没有办法用wsadmin工具做到这一点?谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-13 22:48:37

请参阅内存会话计数中的Websphere - http://websphereadmin-janglestrategies.blogspot.com/2010/02/websphere-in-memory-session-count.html

从那篇博文中

代码语言:javascript
复制
servers = AdminTask.listServers( '[-serverType APPLICATION_SERVER]').splitlines()

对于服务器中的服务器:

代码语言:javascript
复制
# Now just get the app server name - not the whole jython config id
newserver = server.split('(')

# get the session manager mbean
ps = AdminControl.queryNames ('WebSphere:type=SessionManager,process=' + newserver[0] + ',*')

# now get the stats for the mbean
AdminControl.getAttribute(ps, 'stats')

希望你能得到如下的输出:

'','Stats name=My_WAR_FILE_NAME,type=servletSessionsModule','{','name=SessionObjectSize,ID=18,description=The会话级别的会话对象的平均大小,仅包括缓存中的可序列化属性。,unit=BYTE,type=AverageStatistic,avg=1762.5,min=1713,max=1812,total=200925,count=114,sumSq=4.0370855625E10,type=TimeStatistic,avg=1762.5,min=1713,max=1812,total=200925,count=114,sumSq=4.0370855625E10',‘}’

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11017114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档