summaryrefslogtreecommitdiff
path: root/zebra/zserv.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-18 13:13:32 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-05-18 13:14:18 -0400
commit57282a31cfcd7c96e8867dbb4eaaf565c5bc7394 (patch)
treefa42ae519c68d69a3a0298a1fe31a774408de53b /zebra/zserv.c
parenteefe02daa1818258c5b28a1cc7d2e7490cf25024 (diff)
zebra: Add code to track kernel interactions
Allow zebra to track kernel interactions. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.c')
-rw-r--r--zebra/zserv.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 76c0756ada..0a33b166cd 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -2817,6 +2817,28 @@ DEFUN (no_ip_forwarding,
return CMD_SUCCESS;
}
+DEFUN (show_zebra,
+ show_zebra_cmd,
+ "show zebra",
+ SHOW_STR
+ "Zebra information\n")
+{
+ struct vrf *vrf;
+
+ vty_out (vty, " Route Route Neighbor LSP LSP%s", VTY_NEWLINE);
+ vty_out (vty, "VRF Installs Removals Updates Installs Removals%s", VTY_NEWLINE);
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
+ {
+ struct zebra_vrf *zvrf = vrf->info;
+ vty_out (vty,"%-25s %10ld %10ld %10ld %10ld %10ld%s",
+ vrf->name, zvrf->installs, zvrf->removals,
+ zvrf->neigh_updates, zvrf->lsp_installs, zvrf->lsp_removals,
+ VTY_NEWLINE);
+ }
+
+ return CMD_SUCCESS;
+}
+
/* This command is for debugging purpose. */
DEFUN (show_zebra_client,
show_zebra_client_cmd,
@@ -3005,6 +3027,7 @@ zebra_init (void)
install_element (VIEW_NODE, &show_ip_forwarding_cmd);
install_element (CONFIG_NODE, &ip_forwarding_cmd);
install_element (CONFIG_NODE, &no_ip_forwarding_cmd);
+ install_element (ENABLE_NODE, &show_zebra_cmd);
install_element (ENABLE_NODE, &show_zebra_client_cmd);
install_element (ENABLE_NODE, &show_zebra_client_summary_cmd);