getRpcServerStatistics

getRpcServerStatistics(jdo:      JadeDynamicObject input;
                       detailed: Boolean);

The getRpcServerStatistics method of the Node class RPC statistics relating to activity between the database server node and the client node represented by the Node instance used as the method receiver.

The values returned represent information about the connection to the specified node and totals for requests received and replies sent to it. The values are returned as Integer64 properties in the dynamic object specified by the jdo parameter. The calling process is responsible for creating and deleting the JadeDynamicObject instance.

The detailed parameter specifies whether the values returned should include individual totals for each request type. For details about the returned values, see "Node::getRpcServerStatistics Method", in Chapter 4 of the JADE Object Manager Guide.

The calling process is responsible for creating and deleting the JadeDynamicObject instance. Properties are added to the object when the method is first called. The object can then be used in subsequent calls.

If the dynamic object passed to the method already contains properties that do not match the properties to be returned, the existing dynamic object properties are removed and replaced with the appropriate properties. The method is most efficient when the properties match those to be returned.

The cumulative counter values are not reset during the lifetime of the database server node, and you may need to compare values from one execution of the getRpcServerStatistics method with previous values to work out the differences.

The cumulative values are held as 64-bit unsigned integers, which are copied to the dynamic object as Integer64 values. The maximum value before they wrap around to negative values is therefore 2^63 - 1 (approximately 8 Exabytes).

The following example shows the use of the getRpcServerStatistics method.

showRpcNodeStats();
vars
   jdo : JadeDynamicObject;
begin
   create jdo transient;
   node.getRpcServerStatistics(jdo, false);
   write jdo.display;
epilog
   delete jdo;
end;

The output from the getRpcServerStatistics method shown in the previous example is as follows.

---RPCServerStatistics(106)---
timeStarted = 27 April 2007, 12:31:43
connectionType = 1
lastInboundRequest = 27 April 2007, 14:38:30
requestsFromClients = 24155
repliesToClients = 24154
requestPacketsFromClients = 24155
replyPacketsToClients = 24154
requestBytesFromClients = 3719096
replyBytesToClients = 9861812
requestsToClients = 38
repliesFromClients = 38
requestPacketsToClients = 38
replyPacketsFromClients = 38
requestBytesToClients = 40611
replyBytesFromClients = 20962
notificationPacketsToClients = 3
notificationBytesToClients = 1122