]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
format output a little more nicely
authorAlan T. DeKok <aland@freeradius.org>
Tue, 7 Aug 2018 14:33:32 +0000 (10:33 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 7 Aug 2018 15:01:35 +0000 (11:01 -0400)
src/lib/io/worker.c

index 926690ad77e941289482e7bd4bc8ccb98d5e1af0..904c23a2e62b12cf21bfb93216213158d611f699 100644 (file)
@@ -1633,26 +1633,26 @@ static int cmd_stats_worker(FILE *fp, UNUSED FILE *fp_err, void *ctx, UNUSED fr_
        fr_worker_t const *worker = ctx;
        fr_time_t when;
 
-       fprintf(fp, "count.in\t%" PRIu64 "\n", worker->stats.in);
-       fprintf(fp, "count.out\t%" PRIu64 "\n", worker->stats.out);
-       fprintf(fp, "count.dup\t%" PRIu64 "\n", worker->stats.dup);
-       fprintf(fp, "count.dropped\t%" PRIu64 "\n", worker->stats.dropped);
-       fprintf(fp, "count.decoded\t%" PRIu64 "\n", worker->num_decoded);
-       fprintf(fp, "count.timeouts\t%" PRIu64 "\n", worker->num_timeouts);
-       fprintf(fp, "count.active\t%" PRIu64 "\n", worker->num_active);
-       fprintf(fp, "count.runnable\t%u\n", fr_heap_num_elements(worker->runnable));
+       fprintf(fp, "count.in\t\t\t%" PRIu64 "\n", worker->stats.in);
+       fprintf(fp, "count.out\t\t\t%" PRIu64 "\n", worker->stats.out);
+       fprintf(fp, "count.dup\t\t\t%" PRIu64 "\n", worker->stats.dup);
+       fprintf(fp, "count.dropped\t\t\t%" PRIu64 "\n", worker->stats.dropped);
+       fprintf(fp, "count.decoded\t\t\t%" PRIu64 "\n", worker->num_decoded);
+       fprintf(fp, "count.timeouts\t\t\t%" PRIu64 "\n", worker->num_timeouts);
+       fprintf(fp, "count.active\t\t\t%" PRIu64 "\n", worker->num_active);
+       fprintf(fp, "count.runnable\t\t\t%u\n", fr_heap_num_elements(worker->runnable));
 
        when = worker->tracking.predicted;
        fprintf(fp, "cpu.average_request_time\t%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
 
        when = worker->tracking.running;
-       fprintf(fp, "cpu.used\t%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
+       fprintf(fp, "cpu.used\t\t\t%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
 
        when = worker->tracking.waiting;
-       fprintf(fp, "cpu.waiting\t%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
+       fprintf(fp, "cpu.waiting\t\t\t%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
 
        when = fr_time() - worker->last_event;
-       fprintf(fp, "cpu.event_loop_serviced\t-%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
+       fprintf(fp, "cpu.event_loop_serviced\t\t-%u.%03u\n", (unsigned int) (when / NANOSEC), (unsigned int) (when % NANOSEC) / 1000000);
 
        return 0;
 }