API stats - display pool byte transfer stats
diff --git a/API-README b/API-README
index b5ec453..5e41d9b 100644
--- a/API-README
+++ b/API-README
@@ -394,6 +394,9 @@ Enforced output limitation:
however, JSON brackets will be correctly closed and the JSON id will be
set to 0 (instead of 1) if any data was truncated
+Modified API commands:
+ 'stats' - add 'Times Sent', 'Bytes Sent', 'Times Recv', 'Bytes Recv'
+
----------
API V1.21 (cgminer v2.10.0)
diff --git a/api.c b/api.c
index bfd7f69..a993483 100644
--- a/api.c
+++ b/api.c
@@ -2875,6 +2875,10 @@ static int itemstats(struct io_data *io_data, int i, char *id, struct cgminer_st
root = api_add_diff(root, "Max Diff", &(pool_stats->max_diff), false);
root = api_add_uint32(root, "Min Diff Count", &(pool_stats->min_diff_count), false);
root = api_add_uint32(root, "Max Diff Count", &(pool_stats->max_diff_count), false);
+ root = api_add_uint64(root, "Times Sent", &(pool_stats->times_sent), false);
+ root = api_add_uint64(root, "Bytes Sent", &(pool_stats->bytes_sent), false);
+ root = api_add_uint64(root, "Times Recv", &(pool_stats->times_received), false);
+ root = api_add_uint64(root, "Bytes Recv", &(pool_stats->bytes_received), false);
}
if (extra)