使用 jython 获取应用程序的部分运行状态
您好,我需要知道应用程序是否正在部分运行。使用以下命令我可以获取应用程序是否正在运行的信息。
serverstatus = AdminControl.completeObjectName('type=Application,name='+n1+',*')
print serverstatus
是否还有其他方法可以检查应用程序的当前状态是否部分运行。?
问候 斯内汉·所罗门
Hi I need to know if the application is running partially. using the following command I am able to get info if the application is running.
serverstatus = AdminControl.completeObjectName('type=Application,name='+n1+',*')
print serverstatus
Is there any other was to check if the current status of application is partially running.??
Regards
Snehan Solomon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了准确确定应用程序是否部分启动/停止,您必须首先确定部署应用程序的部署目标,然后确定应用程序是否正在该服务器上运行:
请注意,
AdminApplication
脚本库 仅适用于 WAS 7+,因此如果您运行的是旧版本,则需要自行获取部署目标。In order to accurately determine whether the application is partially started/stopped, you must first determine the deployment targets against which the application is deployed, and then determine whether or not the application is running on that server:
Note that the
AdminApplication
script library only exists for WAS 7+, so if you are running an older version, you will need to obtain the deployment targets yourself.我能够根据节点数量获取应用程序的部分状态。我只是对节点数量进行了硬编码,然后将它们与它们返回的 MBean 数量进行比较。
I was able to get the partial status of application based on the number of nodes. I just hardcoded the number of nodes and then compared them against the number of MBeans they returned.