summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-10-26 16:54:54 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-10-26 16:54:54 +0000
commit1f539aaea74ffac1e5e307c1c1077fa92300e5cc (patch)
tree144f0ca8fb5b2385e34e40f3f46d9f9da18192b5 /usr.sbin
parentc9464ba0fc86ebd662b34c995d589414d0e088fa (diff)
Show how much memory is used for *-sets.
OK deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 26f543290d5..1248317731e 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.219 2018/10/01 23:09:53 job Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.220 2018/10/26 16:54:53 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1875,12 +1875,19 @@ show_rib_memory_msg(struct imsg *imsg)
(long long)stats.attr_refs);
printf("%10lld BGP attributes using %s of memory\n",
(long long)stats.attr_dcnt, fmt_mem(stats.attr_data));
+ printf("%10lld as-set elements in %lld tables using "
+ "%s of memory\n", stats.aset_nmemb, stats.aset_cnt,
+ fmt_mem(stats.aset_size));
+ printf("%10lld prefix-set elments using %s of memory\n",
+ stats.pset_cnt, fmt_mem(stats.pset_size));
printf("RIB using %s of memory\n", fmt_mem(pts +
stats.prefix_cnt * sizeof(struct prefix) +
stats.rib_cnt * sizeof(struct rib_entry) +
stats.path_cnt * sizeof(struct rde_aspath) +
stats.aspath_size + stats.attr_cnt * sizeof(struct attr) +
stats.attr_data));
+ printf("Sets using %s of memory\n", fmt_mem(stats.aset_size +
+ stats.pset_size));
printf("\nRDE hash statistics\n");
break;
case IMSG_CTL_SHOW_RIB_HASH: