|
The "get statistics" command allows the client to obtain the run-time statistics of the message broker. The "get statistics" message has the following format:
Object name: "stats"
.
Message name: "get"
for basic statistics or "get_details"
for detailed data.
Message content: ignored.
After receiving this message, the broker replies with the amount of information that depends on the requested level of details.
For basic information the parameters object in reply contains the "total_incoming"
and "total_outgoing"
long long fields with current values of incoming and outgoing message counters. These counters are initialized to 0 when the broker starts and only grow with time.
If the detailed data is requested, then in addition to the above two fields, the broker fills the reply parameters object with equally sized arrays:
"locations"
- string array with target names of each active subscriber,"overflows"
- boolean array with overflow flags; if the flag is true for the given subscriber, then that subscriber had an overflow condition and did not receive all messages,"sent_messages"
- long long array with counters of all messages that were sent to this subscriber,"sent_bytes"
- long long array with counters of total traffic for the given subscriber.