reverbrain/elliptics — pull request #307 by shaitan (2013-12-24 11:38:55+00:00)
Title: Monitoring for dnet_ioserv

Monitoring allows to track state of elliptics server and provides different metric counters/statistics.

To turn on monitor the "monitor_port" should be specified at dnet_ioserv config file and sets port which monitor should listen.

Monitor accepts connection and waits any incoming packet after which it sends full statistics about server. Output format of the statistics is json and it consists of:
* io queue statistics (input only at the moment) - information about load io queue;
* cache statistics - different counters about cache: current size, max size, occupancy of pages etc.;
* command statistics - information about how many times each commands was succeed and failed in a cache, disk and internal execution;
* command history statistics - information about last 5к executed command: what command was it, was it internal, where was it executed: disk or cache, what was the size command data and how much time it took;
* read/write/index histograms - histograms which contains counters how many time the command from list was executed with ranges of size and for ranges of time.