cmdmon: add serverstats command

Add a new command to obtain a server report with the new clientlog
statistics.
This commit is contained in:
Miroslav Lichvar
2016-01-18 17:09:36 +01:00
parent f52a738660
commit 9b019a03e7
6 changed files with 62 additions and 2 deletions

16
candm.h
View File

@@ -91,7 +91,8 @@
#define REQ_SMOOTHING 51
#define REQ_SMOOTHTIME 52
#define REQ_REFRESH 53
#define N_REQUEST_TYPES 54
#define REQ_SERVER_STATS 54
#define N_REQUEST_TYPES 55
/* Special utoken value used to log on with first exchange being the
password. (This time value has long since gone by) */
@@ -433,7 +434,8 @@ typedef struct {
#define RPY_MANUAL_LIST 11
#define RPY_ACTIVITY 12
#define RPY_SMOOTHING 13
#define N_REPLY_TYPES 14
#define RPY_SERVER_STATS 14
#define N_REPLY_TYPES 15
/* Status codes */
#define STT_SUCCESS 0
@@ -569,6 +571,15 @@ typedef struct {
int32_t EOR;
} RPY_ClientAccessesByIndex;
typedef struct {
uint32_t ntp_hits;
uint32_t cmd_hits;
uint32_t ntp_drops;
uint32_t cmd_drops;
uint32_t log_drops;
int32_t EOR;
} RPY_ServerStats;
#define MAX_MANUAL_LIST_SAMPLES 16
typedef struct {
@@ -630,6 +641,7 @@ typedef struct {
RPY_Sourcestats sourcestats;
RPY_Rtc rtc;
RPY_ClientAccessesByIndex client_accesses_by_index;
RPY_ServerStats server_stats;
RPY_ManualList manual_list;
RPY_Activity activity;
RPY_Smoothing smoothing;