packet counters in json output
[svn/Prometheus-QoS/.git] / json.c
diff --git a/json.c b/json.c
index 0d8b514..c04a568 100644 (file)
--- a/json.c
+++ b/json.c
@@ -23,11 +23,12 @@ void write_json_traffic(char *json)
       fprintf(f, ",\n");\r
      }\r
      fprintf(f, \r
-             " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu, \\r
-\"min\":%d, \"max\":%d, \"limit\":%d, \"realquota\":%Lu, \"credit\":%Lu, \"dailyquota\":%ld }",\r
-             ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload, \r
-             ip->min, ip->desired, ip->max, ip->realquota, ip->credit, \r
-             (ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));\r
+             " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \\r
+             \"proxy\":%Lu, \"up\":%Lu, \"min\":%d, \"max\":%d, \"limit\":%d, \\r
+             \"pktsup\":%Lu, \"pktsdown\":%Lu, \"realquota\":%Lu, \"credit\":%Lu, \"dailyquota\":%ld }",\r
+             ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, \r
+             ip->upload, ip->min, ip->desired, ip->max, ip->pktsup, ip->pktsdown,\r
+             ip->realquota, ip->credit, (ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));\r
      jsoncount++;\r
     }\r
    }\r
This page took 0.107502 seconds and 4 git commands to generate.