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

364 Views Asked by At

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!!

1

There are 1 best solutions below

0
On

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!