The statistics m-bean contains methods for collecting statistics. Some of these methods are implemented using native methods to call the C Statistics API. The main classes and methods are:
Table 2-3 Statistics M-bean Classes and Methods|
Class |
Method |
Description |
|---|---|---|
|
QStatsInterface |
addQFlowAccountingListener() |
Registers a listener for flow accounting events |
|
addQFlowAddedListener() |
Registers a listener for flow added events |
|
|
addQStatsResetListener() |
Registers a listener for statistics reset events |
|
|
performGetClassStats() |
Returns statistics for the specified class |
|
|
performGetFlowStats() |
Returns flow statistics for the specified class |
|
|
removeQFlowAccountingListener() |
Removes flow accounting events listener |
|
|
removeQFlowAddedListener() |
Removes listener for new flow events |
|
|
removeQStatsResetListener() |
Removes listener for statistics reset events |
|
|
QClassStats |
getBdrops() |
Returns the number of bytes dropped by this class |
|
getBorrows() |
Returns the number of packets sent using bandwidth borrowed from the parent class |
|
|
getClassName() |
Returns the distinguished name of the class |
|
|
getDrops() |
Returns the number of packets dropped by this class |
|
|
getLastSeen() |
Returns the time at which the last packet was sent |
|
|
getNumBytes() |
Returns the number of bytes sent through this class |
|
|
getNumPackets() |
Returns the number of packets sent through this class |
|
|
QFlow |
getClassName() |
Returns the distinguished name of the class this flow belongs to |
|
getFirstSeen() |
Returns the time at which the first packet was sent through this flow |
|
|
getLastSeen() |
Returns the time at which the last packet was sent through this flow |
|
|
getLocalIP() |
Returns the local IP address |
|
|
getLocalPort() |
Returns the local port number |
|
|
getNumBytes() |
Returns the number of bytes sent through this flow |
|
|
getNumPackets() |
Returns the number of packets sent through this flow |
|
|
getProtocol() |
Returns the IP protocol value |
|
|
getRemoteIP() |
Returns the remote IP address |
|
|
getRemotePort() |
Returns the remote port number |
|
|
getTosSent() |
Returns the Type of Service for this flow, after possible marking |
|
|
getURL() |
Returns the URL associated with this flow (null if not applicable) |
To call the statistics m-bean, you require the following:
|
M-bean name |
QConstants.statsMOName |
|
M-bean class name |
com.sun.ba.stats.QStatsInterface |
|
C-bean class name |
com.sun.ba.mo.QStatsInterfaceMO |