To find activities in the SLEE, use the following rhino-console command or related MBean operations.

Console command: findactivities

Command

findactivities [-all] [-maxpernode maxrows] [-node nodeid] [-non-resident] [-ra
<ra-entity>] [-created-after date|time|offset] [-created-before
date|time|offset] [-updated-after date|time|offset] [-updated-before
date|time|offset]
  Description
    Find activities.  Use -all to include activities removed but not garbage
    collected.  Use -non-resident to include key/value store activities not
    currently owned by any cluster node.

Options

Option Abbreviation Description
-all

Include all activities removed but not yet garbage collected.

-maxpernode <maxrows>

Retrieve at most this many activities from each event-router node (default is 100). Can be used to limit Rhino’s load when processing the request.

-node <node-id>

Only display activities owned by the given node.

-non-resident

Include any activities not currently resident on any active cluster node in the returned results.

An example of a non-resident activity is one that was replicated using a key/value store whose owning node has left the cluster and the activity has not yet been adopted by any other node.

-ra <ra-entity>

Only display activities created by the named resource adaptor entity.

-created-after <time>
-ca

Only display activities created after the given time.

-created-before <time>
-cb

Only display activities created before the given time.

-updated-after <time>
-ua

Only display activities updated after the given time.

-updated-before <time>
-ub

Only display activities updated before the given time.

Times for the above options may be entered in either absolute or relative format:

Type Format Description Examples

Absolute

[[yyyy/]MM/dd] [HH:mm[:ss]]

yyyy = the year
MM = the month (1-12)
dd = the date of the month (1-31)
HH = the hour (0-23)
mm = the minute (0-59)
ss = the second (0-59)

2008/04/15
04/15
10:57
10:57:35
2008/04/15 10:57:35

Relative

(<nn><d|h|m|s>)*

nn = a number
d = days
h = hours
m = minutes
s = seconds

1d
1h
1m
30s
1m
7m30s
1d12h5m30s
Note Rhino assumes relative time format is in the past. For example, 1h30m means 1 hour and 30 minutes ago.

Examples

To display all activities in the SLEE:
$ ./rhino-console findactivities
pkey                      attach-count   handle                                 namespace   node   ra-entity    ref-count   replication-mode   submission-time     update-time
------------------------  -------------  -------------------------------------  ----------  -----  -----------  ----------  -----------------  ------------------  ------------------
1.101:219852641476607.1               0  ServiceActivity[ServiceID[name=Simple                101   Rhino Inte           0            SAVANNA   20180613 18:35:32   20180613 18:35:32
C.101:219852641476608.0               1    SAH[switchID=1528911304,connectionI                101       simple           3    KEY_VALUE_STORE   20180613 18:35:47   20180613 18:35:47
C.101:219852641476609.0               1    SAH[switchID=1528911304,connectionI                101       simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.102:219852644015615.0               1    SAH[switchID=1528911304,connectionI                102       simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.102:219852644015616.0               1    SAH[switchID=1528911304,connectionI                102       simple           3    KEY_VALUE_STORE   20180613 18:35:49   20180613 18:35:49
C.103:219852646067199.0               1    SAH[switchID=1528911304,connectionI                103       simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.103:219852646067200.0               1    SAH[switchID=1528911304,connectionI                103       simple           3    KEY_VALUE_STORE   20180613 18:35:49   20180613 18:35:49
7 rows
Finding stale activities

A common search would be for stale activities. Rhino performs a periodic activity-liveness scan, checking all active activities and ending those detected as stale. Sometimes, however, a failure in the network or inside a resource adaptor might prevent the liveness scan from detecting and ending some activities. In this case, the Administrator would have to locate and end the stale activities manually.

To narrow the search:

To search for activities belonging to node 101 (replicated or non-replicated activities owned by 101) that are more than one hour old, you would use the arguments -node 101 and -cb 1h:

$ ./rhino-console findactivities -node 101 -cb 1h
pkey                      attach-count   handle                                 namespace   node   ra-entity    ref-count   replication-mode   submission-time     update-time
------------------------  -------------  -------------------------------------  ----------  -----  -----------  ----------  -----------------  ------------------  ------------------
C.101:219852641476608.0               1    SAH[switchID=1528911304,connectionI                101       simple           3    KEY_VALUE_STORE   20180613 18:35:47   20180613 18:35:47
C.101:219852641476609.0               1    SAH[switchID=1528911304,connectionI                101       simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
2 rows

(This example returned two activities.)

Finding non-resident activities

Non-resident activities may exist when a cluster node fails and activities have been replicated using a database resource with attached key/value store. Until another node is prompted to adopt an activity previously owned by a failed node, for example as a result of receiving a redirected network event, the activity remains "non-resident". This simply means that state for the activity still exists in the key/value store, but the activity itself is not currently owned by any cluster node.

Non-resident activities are not normally included in the results when searching for activities. To include non-resident activities in the results, the -non-resident option can be used with the findactivities command:

$ ./rhino-console findactivities -non-resident
Non-resident activities will be identified with a negative owning node ID
The absolute value of this node ID identifies the node that was last known to own this activity

pkey                      attach-count   handle                                              namespace   node   ra-entity        ref-count   replication-mode   submission-time     update-time
------------------------  -------------  --------------------------------------------------  ----------  -----  ---------------  ----------  -----------------  ------------------  ------------------
1.101:219852641476607.1               0  ServiceActivity[ServiceID[name=SimpleService,vendo                101   Rhino Internal           0            SAVANNA   20180613 18:35:32   20180613 18:35:32
C.101:219852641476608.0               1    SAH[switchID=1528911304,connectionID=0,address=]                101           simple           3    KEY_VALUE_STORE   20180613 18:35:47   20180613 18:35:47
C.101:219852641476609.0               1    SAH[switchID=1528911304,connectionID=3,address=]                101           simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.102:219852644015615.0               1    SAH[switchID=1528911304,connectionID=1,address=]               -102           simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.102:219852644015616.0               1    SAH[switchID=1528911304,connectionID=4,address=]               -102           simple           3    KEY_VALUE_STORE   20180613 18:35:49   20180613 18:35:49
C.103:219852646067199.0               1    SAH[switchID=1528911304,connectionID=2,address=]                103           simple           3    KEY_VALUE_STORE   20180613 18:35:48   20180613 18:35:48
C.103:219852646067200.0               1    SAH[switchID=1528911304,connectionID=5,address=]                103           simple           3    KEY_VALUE_STORE   20180613 18:35:49   20180613 18:35:49
7 rows

MBean operation: getActivities

MBean

Rhino operations

Get summary information for all activities
public TabularData getActivities(int maxPerNode, boolean includeRemoved)
    throws ManagementException;

This operation returns tabular data summarising all activities.


Get summary information for activities belonging to a resource adaptor entity
public TabularData getActivities(int maxPerNode, String entityName, boolean includeRemoved)
    throws ManagementException, UnrecognizedResourceAdaptorEntityException;

This operation returns tabular data summarising the activities owned by the given resource adaptor entity.


Get summary information for activities using time-based criteria
public TabularData getActivities(int maxPerNode, String entityName, long createdAfter, long createdBefore, long updatedAfter, long updatedBefore, boolean includeRemoved)
    throws ManagementException, UnrecognizedResourceAdaptorEntityException;

This operation returns tabular data summarising the activities owned by the given resource adaptor entity using the time-based criteria specified (in milliseconds, as used by java.util.Date, or the value 0 to ignore a particular parameter).


Get summary information for activities using time-based criteria, optionally including non-resident activities
public TabularData getActivities(int maxPerNode, String entityName, long createdAfter, long createdBefore, long updatedAfter, long updatedBefore, boolean includeRemoved, boolean includeNonResident)
    throws ManagementException, UnrecognizedResourceAdaptorEntityException;

This operation returns tabular data as per the previous operation but includes information on non-resident activities if includeNonResident is true. Note that the includeNonResident parameter only has an effect if the housekeeping MBean is a Cluster Housekeeping MBean. This parameter is ignored by Node Housekeeping MBeans.


Tip

Results depend on the Housekeeping MBean that invokes the operation:

  • Cluster Housekeeping MBean — returns results from all event-router nodes in the primary component

  • Node Housekeeping MBean — returns results from that node only.

Note For a description of the format of the tabular data that these operations return, see the javadoc.
Previous page Next page
Rhino Version 2.6.1