diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-06-26 18:18:59 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-06-26 18:18:59 +0000 |
commit | e816cf3344c5b942d0e8ab825f7d0eb98eae184c (patch) | |
tree | 341d01c43e93f947d872db224b2f206fc32c0cbe /sbin | |
parent | bdc0f5c45c706103e152c0beab9b55a7480c1af8 (diff) |
Print statistics in a human readable format. ok dhartmei
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 773e2795def..e631fc9b196 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.11 2001/06/26 15:29:05 wilfried Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.12 2001/06/26 18:18:58 kjell Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -301,13 +301,19 @@ print_status(struct pf_status *s) { time_t t = time(NULL); - printf("%u %u %u", t, s->since, s->running); + printf("Time: %u Since: %u Running: %u", t, s->since, s->running); if (s->running) { - printf(" %u %u", s->bytes[0], s->bytes[1]); - printf(" %u %u", s->packets[0][0], s->packets[0][1]); - printf(" %u %u", s->packets[1][0], s->packets[1][1]); - printf(" %u %u %u %u", s->states, s->state_inserts, - s->state_removals, s->state_searches); + printf(" Bytes In: %u Bytes Out: %u\n", + s->bytes[PF_IN], s->bytes[PF_OUT]); + printf(" Inbound Packets: Passed: %u Dropped: %u\n", + s->packets[PF_IN][PF_DROP], + s->packets[PF_IN][PF_DROP]); + printf(" Outbound Packets: Passed: %u Dropped: %u\n", + s->packets[PF_OUT][PF_PASS], + s->packets[PF_OUT][PF_DROP]); + printf(" States: %u Inserts: %u Removals: %u Searches: %u", + s->states, s->state_inserts, + s->state_removals, s->state_searches); } printf("\n"); } |