diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-01-09 18:24:43 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-01-09 18:24:43 +0000 |
commit | 3d3748608f52c43f13c72c6ed69b8ee3103de8f9 (patch) | |
tree | cb565bd5152672244a5b19b45b9620b077ae5e45 /sbin | |
parent | 1bff43d761d4f96278ef509e47ac0ede7d5622ff (diff) |
support PRIQ in queue statistics
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_qstats.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_qstats.c b/sbin/pfctl/pfctl_qstats.c index e63b76bdbdc..78dd65c7245 100644 --- a/sbin/pfctl/pfctl_qstats.c +++ b/sbin/pfctl/pfctl_qstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_qstats.c,v 1.1 2003/01/09 17:33:20 henning Exp $ */ +/* $OpenBSD: pfctl_qstats.c,v 1.2 2003/01/09 18:24:42 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -77,6 +77,7 @@ struct pf_altq_node *pfctl_find_altq_node(struct pf_altq_node *, void pfctl_print_altq_node(int, const struct pf_altq_node *, unsigned, int); void print_cbqstats(class_stats_t); +void print_priqstats(struct priq_classstats); void pfctl_free_altq_node(struct pf_altq_node *); void pfctl_print_altq_nodestat(int, const struct pf_altq_node *); @@ -246,6 +247,7 @@ pfctl_print_altq_nodestat(int dev, const struct pf_altq_node *a) print_cbqstats(a->qstats.cbq_stats); break; case ALTQT_PRIQ: + print_priqstats(a->qstats.priq_stats); break; } } @@ -257,10 +259,25 @@ print_cbqstats(class_stats_t qstats) "dropped pkts: %6llu bytes: %6llu ]\n", qstats.xmit_cnt.packets, qstats.xmit_cnt.bytes, qstats.drop_cnt.packets, qstats.drop_cnt.bytes); - printf("[ qcount: %3d/%3d borrows: %6u suspends: %6u ]\n", + printf("[ qlength: %3d/%3d borrows: %6u suspends: %6u ]\n", qstats.qcnt, qstats.qmax, qstats.borrows, qstats.delays); } +void +print_priqstats(struct priq_classstats qstats) +{ + printf("[ pkts: %10llu bytes: %10llu " + "dropped pkts: %6llu bytes: %6llu ]\n", + qstats.xmitcnt.packets, qstats.xmitcnt.bytes, + qstats.dropcnt.packets, qstats.dropcnt.bytes); + +/* strange results. disable for now */ +#if 0 + printf("[ qlength: %3d/%3d ]\n", + qstats.qlength, qstats.qlimit); +#endif +} + void pfctl_free_altq_node(struct pf_altq_node *node) |