|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reading from the Statistics Queue with Java |
« View previous topic :: View next topic » |
Author |
Message
|
mikebian |
Posted: Fri May 25, 2012 11:20 am Post subject: Reading from the Statistics Queue with Java |
|
|
Newbie
Joined: 25 May 2012 Posts: 2
|
I am trying to get read queue statistics from the SYSTEM.ADMIN.STATISTICS.QUEUE using a Java program and I can not get it to fully work, nor can I find a good example anywhere. What I want is to get the exact data amqsmon dumps and put it into a database. Where I am having trouble is that I get the basic parameters as follows:
Code: |
queue.get(message, gmo);
PCFMessage pcf = new PCFMessage(message);
Enumeration e = pcf.getParameters();
while (e.hasMoreElements()) {
PCFParameter parm = (PCFParameter) e.nextElement();
String n = parm.getParameterName().trim();
String v = parm.getStringValue().trim(); |
and ultimately you get to a parameter of MQGACF_Q_STATISTICS_DATA.. From my reading this is a grouped parameter, and I need to get the values from it for each of my queues. I can not figure out how to do this. I came across a post here titled "Reading PCF Group Parameter (MQCFGR) using MS0B", but it does not seem like there is a real answer there.
It seems that somehow, once I get to that parameter, I have to get it's grouped parameter and dump its values for each queue.
Using
Code: |
MQCFGR sgroup = new MQCFGR(message.getParameter(8011)); |
only lists info for one queue, the same queue every time. Can't figure out how to get that to operate in on each of the values in the parameter.
Can anyone help?
PS. I found the MQAnalyticizer SoureForge project and tried using that, but it seems to be incomplete and to have the same problem.
PSS. It won't let me post actual links or URLs since this is my first post.
Thanks |
|
Back to top |
|
 |
markt |
Posted: Fri May 25, 2012 12:04 pm Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
|
Back to top |
|
 |
mikebian |
Posted: Tue May 29, 2012 1:02 pm Post subject: |
|
|
Newbie
Joined: 25 May 2012 Posts: 2
|
Thanks! That worked perfectly for me. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|