more information in json output (for mailing system)
[svn/Prometheus-QoS/.git] / json.c
diff --git a/json.c b/json.c
index abf8c4e..c9c63f0 100644 (file)
--- a/json.c
+++ b/json.c
@@ -21,8 +21,11 @@ void write_json_traffic(char *json)
      {\r
       fprintf(f, ",\n");\r
      }\r
-     fprintf(f, " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu, \"min\":%d, \"max\":%d, \"limit\":%d }",\r
-                ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload, ip->min, ip->desired, ip->max);\r
+     fprintf(f, " \"%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
      jsoncount++;\r
     }\r
    }\r
This page took 0.104566 seconds and 4 git commands to generate.