Author |
Message
|
jeevan |
Posted: Wed Apr 18, 2007 1:34 pm Post subject: How to see whether an object is running in MB 6. |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
When I gave mqsilist command, it listed all the configmgr and broker reagrdless running/stopped. Is there a way to list only running cmponents?
I tried to see the optinal parameters of mqsilist which has only -a and -e.
I would appreciate your response.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 18, 2007 1:36 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No.
You can only get this information from the ConfigMgr. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jeevan |
Posted: Wed Apr 18, 2007 2:02 pm Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Do you mean that I need to write CMP program in order to monitor the running /stopped mb components. Basically, I am interested finding status of EG, Broker and msg Flow itself.
I know getting them listed with mqsilist command with broker /eg name but this again does not tell the status.
Thank you very much,
Kiran |
|
Back to top |
|
 |
mqmatt |
Posted: Thu Apr 19, 2007 3:01 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
The v6 DomainInfo sample tells you this information, and can run without modification - look in the Samples/ConfigManagerProxy directory in the runtime install location.
Or use the CMP Exerciser which tells you pretty much everything you'd ever want to know about your domain.
Alternatively, for just execution group and broker information, mqsilist will sort of tell you what's running; when you specify -e, the command will only return if the EG is running, as it responds to the request.
Or use the ps command or task manager for running process information.
Regards
-Matt |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Apr 19, 2007 3:32 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
If you need code this is simple CMP example:
Code: |
ConfigManagerConnectionParameters cmcp = new
MQConfigManagerConnectionParameters(
"host", 1414, "QM");
((MQConfigManagerConnectionParameters) cmcp)
.disableDomainAwareness();
ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
TopologyProxy topology = cmp.getTopology();
if (topology != null) {
Enumeration allBrokers = topology.getBrokers(null);
while (allBrokers.hasMoreElements()) {
BrokerProxy thisBroker = (BrokerProxy) allBrokers
.nextElement();
System.out.println("Broker " + thisBroker.getName());
if (thisBroker.isRunning())System.out.println("STARTED");
else System.out.println("STOPPED");
} //while
} //if
cmp.disconnect();
|
_________________ Marcin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 19, 2007 5:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There's also accounting & statistics. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jeevan |
Posted: Thu Apr 19, 2007 5:06 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Thank you for your reponse. I would play around it. I was basically was thinking whether there is anything in command like mqsi.
thanks once again, |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Apr 19, 2007 5:07 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
There's also accounting & statistics. |
What do you mean.
How can I check if broker is running with accounting & statistics ? _________________ Marcin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 19, 2007 5:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can't check if a *broker* is running, with accounting and statistics. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Apr 19, 2007 5:14 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
You can't check if a *broker* is running, with accounting and statistics. |
But you said "There's also accounting & statistics."
What was it about ? _________________ Marcin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 19, 2007 5:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, if a message flow hasn't processed any messages in the last hour... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Apr 19, 2007 6:18 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
Well, if a message flow hasn't processed any messages in the last hour... |
Hm.
It means nothing.
With Accounting and statistic I can only monitor flows.
I can not say "There was no messages -> broker doesn't work"
OK. It's almost weekend. Maybe I don't undestand you.  _________________ Marcin |
|
Back to top |
|
 |
|