The Smarts/IONIX Broker is (to the surprise of some) implemented as a Smarts domain in it's own right.

You can access it's classes, instances, attributes and operations using all the usual tools - including dmctl, ASL, perl etc.

The trick to gaining access is to know that the broker does not self-register and so you have to access using the fully qualified name, like this..

dmctl -s localhost:426/dmbroker
Attached to 'localhost:426/dmbroker'
dmctl> getClasses
dmctl> getInstance DomainManager

NB: The host name (or IP) and port number may be different for you, but the name "dmbroker" is a fixed string that must always be used.

Once you have this information understood, you will realize that you can write ASL or Perl scripts to access the broker data too. Like this for example...

The following script prints similar information to the "brcontrol" tool.

START { .. eol } do {
    foreach dm (getInstances("DomainManager")) {
        dmObj = object("DomainManager", dm);

        state = dmObj->state;
        if (state == 0) { stateStr = "RUNNING"; }
        else if (state == 1) { stateStr = "DEAD"; }
        else { stateStr = "??"; }

        print(dmObj->Name." ".dmObj->hostNameStr." ".dmObj->port." ".stateStr);

The script can be executed using the command line (with the hostname and port number adjusted to suit)..

sm_adapter -s localhost:426/dmbroker script.asl
Scroll to Top