On Mon, Apr 18, 2016 at 08:09:50PM +0200, Claudio Jeker wrote:
> The idea of terse is that you don't need to parse. So in a way I agree
> with the diff. What I don't like is the inclusion of the number of
> prefixes. That count requires a roundtrip to the RDE to find and sometimes
> this takes a while. I would prefer if we could leave that out.
> 

Here is a new diff that only prints uptime.
Denis

Index: bgpctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpctl/bgpctl.c,v
retrieving revision 1.187
diff -u -p -r1.187 bgpctl.c
--- bgpctl.c    5 Dec 2015 13:17:05 -0000       1.187
+++ bgpctl.c    6 May 2016 18:36:10 -0000
@@ -584,8 +584,9 @@ show_summary_terse_msg(struct imsg *imsg
                p = imsg->data;
                s = fmt_peer(p->conf.descr, &p->conf.remote_addr,
                    p->conf.remote_masklen, nodescr);
-               printf("%s %s %s\n", s, log_as(p->conf.remote_as),
-                   p->conf.template ? "Template" : statenames[p->state]);
+               printf("%s %s %s %llu\n", s, log_as(p->conf.remote_as),
+                   p->conf.template ? "Template" : statenames[p->state],
+                   (time(NULL) - p->stats.last_updown));
                free(s);
                break;
        case IMSG_CTL_END:

Reply via email to