Broker Storage File Information and Broker.qs.stor information using Java API

Hi All,

I want information related to broker utilization. Using Broker Java APIs, I am getting almost all information till Total Storage whose session URL is qs:///appl/webMethods/v6/IS/brokerdata/default/Broker.qss. Inside that there is 3 more .stor file which uses the max available storage of total storage.
My question is that, Using Java APIs of Broker how could i get all those information related to .stor files. ie

Storage /appl/webMethods/v6/IS/brokerdata/default/Broker.qs.stor
Max. Available
Used and Reserved

Can you provide me the ways or keywords for that, how can i loop over these storage files to get all information of .stor files. All information is coming from getStats and getUsageStats. But i don’t know how to get these informations.

Please help me out. Thanks in advance.

Best Regards
Aashish Sinha

For others coming upon this thread, Aashish is referring to the BrokerServerClient:getUsageStats method. This class is described in the webMethods Broker Administration Java API Programmer’s Guide.

The object returned by getUsageStats is a BrokerEvent, which is described in the webMethods Broker Client Java API Programmer’s Guide. You use the BrokerEvent methods to retrieve the fields from the event. For example, to get the value for the max available that you note above, you’d call:

BrokerEvent evt;
BrokerServerClient serverClient;
//… code to establish a connection and such…
evt = serverClient.getUsageStats();
long guaranteedDiskSize = evt.getLongField(“guaranteedDiskSize”);

The event structure may have changed or have different fields in it so you’ll want to investigate to see what is in the event object.

Hope this helps.

Hi ,

Thanks for your reply,

I am getting all information from getUsageStats() like guranteed disk space and others. I need API’s to get information related to .qs.stor storage and reserve space information.
Because of getUsageStats() i am getting CPU,Persistent Storage and Guranteed Storage Information but not getting .qs.stor information. If you run a service called getServerList inside WmBrokerAdmin: server it will show you all statistics and inside one structure it will show statistics of .qs.stor files. So, how could i retrieve information related to that using Broker Java API’s.

Thanks in Advance.

Aashish

BrokerServerClient c;
c = new BrokerServerClient(broker_host, null);
BrokerEvent e = c.getStorageStats();
BrokerEvent[] sessions = e.getStructSeqFieldAsEvents(“sessions”, 0, -1);

The fields in each session event include:

session_url
session_usage
stats
max_transaction_kbytes
max_kbytes_available
current_kbytes_reserved
current_kbytes_inuse

The getStorageStats method may not be a published method (I cannot find any docs that refer to it) so future versions might break any code that relies on it.

Thanx reamon.

It worked.

Aashish

hi,
can any one tell me how to create jms trigger in webMethods 7.1
thanks in advance
rajib

Hi,

Can I get a little insight of how to display the information that we get in BrokerEvent. Basically, how to convert this BrokerEvent array to documentlist, if I use this code as Java Service …

BrokerEvent sessions = e.getStructSeqFieldAsEvents(“sessions”, 0, -1);

Thats fine … I got it …

After the step
BrokerEvent sessions = e.getStructSeqFieldAsEvents(“sessions”, 0, -1);

How to get the values:
session_url
session_usage
stats
max_transaction_kbytes
max_kbytes_available
current_kbytes_reserved
current_kbytes_inuse

from sessions??

No problem … got it.

Thanks Rob, for the insight you provided.

It helped me write the Java service (attached) that provided Broker store usage stats - (published courtesy my employer, Corporate Express Australia and Kolappan, CE Integration lead). I’ve also uploaded this file to the wmuser shareware section.

This code uses a slightly different approach – BrokerEvent.getField() parses the BrokerEvent, instead of getStructSeqFieldAsEvents().

As of IS 8, BrokerServerClient.getStorageStats() appears to be fully documented in the Broker Java API:
[url]http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8_ga/Broker_and_JMS/8-0-SP1_Broker_Java_Admin_API_Reference/index.html?COM/activesw/api/client/class-use/BrokerServerClient.html[/url]

Just a comment to Software AG – ‘My webMethods Server’ (MWS) already reports the broker store utilization information (MWS > Servers > Broker Server Details > Utilization Tab). As a webservices company, why does Software AG not simply allow programmatic quering of MWS data via webservice calls. I mean, MWS already reports it - to have to create a new Java broker client seems wasteful. (Or maybe this is possible ? :slight_smile:
Java Utility Service for Broker Store Usage Monitoring.txt (7.68 KB)

Hello napster,

I am getting below error. Can you please help me out?

getBrokerStorageStats.java:28: Method getStorageStats() not found in class COM.activesw.API.client.BrokerServerClient.
brokerStats = brokerClient.getStorageStats();
^

Please refer to the documentation guide :
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wMdoc/_webM_suite_71/Developer/Developer%207.1/webMethods%20Integration%20Server%20JMS%20Client%20Developer’s%20Guide%207.1.pdf