]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Adjust column display of `show zebra client summ` for openfabric
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 23 Nov 2019 00:29:55 +0000 (19:29 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 23 Nov 2019 00:29:55 +0000 (19:29 -0500)
The openfabric daemon has a longer name than anticipated for
`show zebra client summary` adjust to allow it to fit without
making columns all blomped.

Before:
robot# show zebra client summ
Name      Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes
--------------------------------------------------------------------------------
static        00:00:06     00:00:06    00:00:06       4/0              0/0
openfabric      00:00:06     00:00:06    00:00:06       0/0              0/0

After:

[sharpd@robot frr4]$ vtysh -c "show zebra client summ"
Name      Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes
--------------------------------------------------------------------------------
static        00:02:16     00:02:16    00:02:16       4/0              0/0
openfabric    00:02:16     00:02:16    00:02:16       0/0              0/0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zserv.c

index b0991e98f893cf0c3fd716f8978ab046052a7b78..d3619295935ddb8614c015ff039ca859c32ede49 100644 (file)
@@ -965,7 +965,7 @@ static void zebra_show_client_brief(struct vty *vty, struct zserv *client)
        last_write_time = (time_t)atomic_load_explicit(&client->last_write_time,
                                                       memory_order_relaxed);
 
-       vty_out(vty, "%-8s%12s %12s%12s%8d/%-8d%8d/%-8d\n",
+       vty_out(vty, "%-10s%12s %12s%12s%8d/%-8d%8d/%-8d\n",
                zebra_route_string(client->proto),
                zserv_time_buf(&connect_time, cbuf, ZEBRA_TIME_BUF),
                zserv_time_buf(&last_read_time, rbuf, ZEBRA_TIME_BUF),
@@ -1019,7 +1019,7 @@ DEFUN (show_zebra_client_summary,
        struct zserv *client;
 
        vty_out(vty,
-               "Name    Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes    \n");
+               "Name      Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes    \n");
        vty_out(vty,
                "--------------------------------------------------------------------------------\n");