packet counters in json output
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 18 Nov 2013 23:33:41 +0000 (23:33 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 18 Nov 2013 23:33:41 +0000 (23:33 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@234 251d49ef-1d17-4917-a970-b30cf55b089b

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.140314 seconds and 4 git commands to generate.