SBB diagnostics lets you pull service-defined diagnostic information from SBB objects at runtime.

You can use the getsbbdiagnostics console command (or associated MBean operation) to access diagnostic information (in string form) from particular methods implemented in the SBB abstract class.

For an SBB to provide this diagnostics information, it must implement one of these methods:

  • public String ocGetSbbDiagnostics() — When queried with the getsbbdiagnostics console command, the return result from this method will be included in the SBB diagnostics output.

  • public void ocGetSbbDiagnostics(StringBuilder sb) — When queried with the getsbbdiagnostics console command, this method will be invoked on the SBB object with a SLEE-provided StringBuilder. The toString() output of the StringBuilder will be included in the SBB diagnostics output. This method is intended for chaining diagnostics output between extending classes and child SBBs.

Both of these methods are invoked with a valid transaction context on an SBB entity in the ready state. The methods may read any SBB CMP fields as necessary to produce diagnostic information.

See the example below.

Warning
  • A deployment error will occur if more than one of these methods is implemented.

  • The implementation of an ocGetSbbDiagnostics method should not modify SBB entity state.

To get detailed diagnostics information about an SBB entity, use the following rhino-console command or related MBean operation.

Console command: getsbbdiagnostics

Command

getsbbdiagnostics <serviceid> <sbbid> [-non-resident] <sbb pkeys>*
  Description
    Get SBB info and diagnostics (if supported by sbb implementation).  Use
    -non-resident to get information on SBB entities not currently owned by any
    cluster node.

Example

To display information for SBB entity 103:219902030054321/213428623 of the Sentinel SIP service:

$ ./rhino-console getsbbdiagnostics name=sentinel.sip,vendor=OpenCloud,version=1.0 name=sentinel.sip,vendor=OpenCloud,version=1.0 103:219902030054321/213428623
parent-pkey          :
pkey                 : 103:219902030054321/213428623
convergence-name     : APK[ns=,ah=10,id=103:219902023292928,replication=NONE]:::::-1
creating-node-id     : 103
creation-time        : 20180614 21:10:11
namespace            :
owning-node-id       : 103
priority             : 10
replicated           : false
sbb-component-id     : SbbID[name=sentinel.sip,vendor=OpenCloud,version=1.0]
service-component-id : ServiceID[name=sentinel.sip,vendor=OpenCloud,version=1.0]
attached-activities  :
    > pkey                       handle         ra-entity    replicated
    > -------------------------  -------------  -----------  -----------
    >  A.101:219902021728256.0    SessionAH[3]   sip-sis-ra        false
    > 1 rows


SBB diagnostics:
SentinelSipFeatureAndOcsSbbSupportImpl Child SBBs
=================================================

SubscriberDataLookup SBB:
No diagnostics available for this feature sbb.

SipAdhocConference SBB:
No child SBB currently exists for SipAdhocConference.

DiameterRoOcs SBB:
DiameterRoOcsMultiFsmSbb Service FSM States
===========================================

DiameterIECFSM [current state = NotCharging, InputRegister[scheduled=[], execution=[]], Endpoints[Endpoint[local],Endpoint[DiameterMediation],Endpoint[DiameterToOcs]]]

DiameterSCURFSM [previous state = WaitForInitialCreditCheckAnswer, current state = WaitForNextCreditControlRequest, InputRegister[scheduled=[local_errorsEndSession], execution=[]], Endpoints[Endpoint[local],Endpoint[DiameterMediation],Endpoint[DiameterToOcs,aci=[set,sbb-attached]]]]

SentinelSipSessionStateAggregate Session State
==============================================

Account: 6325
ActivityTestHasFailed: false
AllowPresentationOfDivertedToUriToOriginatingUser: false
AllowPresentationOfServedUserUriToDivertedToUser: false
AllowPresentationOfServedUserUriToOriginatingUser: false
AnnouncementCallIds: null
AnnouncementID: 0
AnytimeFreeDataPromotionActive: false
CFNRTimerDuration: 0
CallHasBeenDiverted: false
CallType: MobileOriginating
CalledPartyAddress: tel:34600000001
CalledPartyCallId: null
CallingPartyAddress: tel:34600000002
CallingPartyCallId: null
ChargingResult: 2001
ClientChargingType: sessionCharging
ClientEventChargingMethod: null
ClosedUserGroupCall: null
ClosedUserGroupDropIfNoGroupMatch: null
ClosedUserGroupEnabled: true
ClosedUserGroupIncomingAccessAllowed: null
ClosedUserGroupList: [CUG1Profile]
ClosedUserGroupOutgoingAccessAllowed: null

...
etc.

This command returns a snapshot of the SBB entity’s state and SBB-defined diagnostics information at the time you execute it. Some values (such as pkey, parent-pkey, convergence-name, creating-node-id, creation-time, namespace, replicated, sbb-component-id, and service-component-id) are fixed for the lifetime of the SBB entity. Others change as the SBB entity processes events.

The diagnostics output (from the "SBB diagnostics:" line onwards) is free-form and SBB defined. The above output is only representative of a single service-defined diagnostics method.

The default mode of this command only retrieves information for SBB entities currently owned by at least one active cluster node. If an SBB entity is non-resident, then the -non-resident option must be used to obtain information for that SBB entity’s state.

Tip See SBB Entity Information Fields for a description of the fields getsbbdiagnostics returns.

MBean operation: getSbbDiagnostics

MBean

Rhino operation

public CompositeData getSbbDiagnostics(ServiceID serviceID, SbbID sbbID, String sbbPKey, boolean nonResident)
    throws UnrecognizedServiceException, UnrecognizedSbbException, InvalidPKeyException,
           UnknownSbbEntityException, ManagementException;

This operation returns tabular data with detailed information on the given SBB entity, including SBB-defined diagnostics information.

Note For a description of the format of the tabular data that this operation returns, see the javadoc.

Example usage

The following is a basic example showing an auto-generated ocGetSbbDiagnostics(StringBuilder sb) method. In this case, the method was generated based on CMP fields declared by the SBB, and demonstrates diagnostics information being obtained from both the current class and the super class:

public abstract class ExampleSessionStateImpl extends com.opencloud.sentinel.ant.BaseSbb implements ExampleSessionState {
    public void ocGetSbbDiagnostics(StringBuilder sb) {
        String header = "ExampleSessionState Session State";
        sb.append(header).append("\n");
        for (int i=0; i<header.length(); i++) sb.append("=");
        sb.append("\n\n");
        // diagnostics: ClashingType (from com.opencloud.sentinel.ant.ExampleSessionStateInterface)
        if (getClashingType() == null) {
            sb.append("ClashingType: null\n");
        }
        else {
          sb.append("ClashingType: ").append(getClashingType()).append("\n");
        }
        // diagnostics: ExampleField (from com.opencloud.sentinel.ant.ExampleSessionStateInterface)
        if (getExampleField() == null) {
            sb.append("ExampleField: null\n");
        }
        else {
            sb.append("ExampleField: ").append(getExampleField()).append("\n");
        }
        sb.append("\n");
        super.ocGetSbbDiagnostics(sb);
    }
    ...
Previous page Next page
Rhino Version 2.7.0