IBM Support

webMethods Knowlegebase : nRealm / nLeaf statistic counters returned empty in UM Admin API (1785671)

Troubleshooting


Problem

When running UM Java Admin API sample code as below to obtain usage counters for UM realm and UM channel, these counters are all returned with zero value. Same statistic counters are shown correctly in Enterprise Manager UI.

import com.pcbsys.nirvana.client.*;

import com.pcbsys.nirvana.nAdminAPI.*;

public class RealmStats

{

public static void main(String args[]) throws Exception

{

String REALM = "nsp://localhost:9000";

String CHANNEL = "mychannel";

nSessionAttributes sa = new nSessionAttributes(REALM);

nSession session = nSessionFactory.create(sa);

session.init();

nChannel nc = session.findChannel(new nChannelAttributes(CHANNEL));

nSessionFactory.close(session);

nRealmNode realm = new nRealmNode(sa);

realm.waitForEntireNameSpace();

nLeafNode leaf = (nLeafNode) realm.findNode(CHANNEL);

System.out.println("Realm URL : " + REALM);

System.out.println("Channel Name : " + CHANNEL);

System.out.println("Realm Usage Statistics:");

System.out.println("Memory allocated : " + realm.getTotalMemory() + " Bytes");

System.out.println("Total Connections : " + realm.getTotalConnections());

System.out.println("Free Memory : " + realm.getFreeMemory());

System.out.println("Channel Usage Statistics:");

System.out.println("Last EID : " + leaf.getLastEID());

System.out.println("Total Published : " + leaf.getTotalPublished());

System.out.println("Total Consumed : " + leaf.getTotalConsumed());

System.out.println("NumberOfEvents : " + leaf.getCurrentNumberOfEvents());

System.out.println("Free Space : " + leaf.getPercentageFreeInStore());

System.out.println("Used Space : " + leaf.getUsedSpace());

realm.close();

} // end main

} // end class

What is the problem here and how to fix it ?

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSVYEV","label":"IBM webMethods Integration"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2012"}],"Version":"9.12"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFIWYE","label":"IBM webMethods B2B"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2012"}],"Version":"9.12"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17211323