简体   繁体   中英

JMS library to get memory usage and disk space on a remote server?

I'm trying to put together a JMS queues dashboard for some JCAPS interfaces, is there any Java method provided in JMS packages that I could use to retrieve server's status such as memory usage and disk space?

Thanks in advance!!

It depends. If you're using JCAPS 5, sorry you're probably out of luck I don't know how to build an API against the underlying STCMS brokers and there are probably very few people who can help you with said task.

If, however, you are using JCAPS 6 which is JMS based (JCAPS 5 may be too, but I can't remember) then you are in luck - I have built such a thing.

Basically, you need a few of the jars from your JMS broker:

root@servername /opt/foo/mq42/lib [bash]# ls
ext            images        imqbroker.jar  imqinit       imqservlet.jar  jaxm-api.jar  props
fscontext.jar  imq.jar       imqhttp.war    imqjmsra.rar  imqutil.jar     jhall.jar
help           imqadmin.jar  imqhttps.war   imqjmx.jar    imqxm.jar       jms.jar

You need:

  • imqadmin.jar
  • imq.jar
  • imquntil.jar

From here I can only be somewhat vague as the rest is IP and not open source. Basically, look in to the scripts that are underneath the mq42 folder, they'll give you hints on how to use the jars. The main class that you'll use is: com.sun.messaging.jmq.admin.bkrutil.BrokerAdmin

Best of luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM