[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quagga-dev
Subject:    [quagga-dev 8358] proposed change for uptime output in
From:       John Kemp <kemp () network-services ! uoregon ! edu>
Date:       2010-11-17 18:52:16
Message-ID: 4CE42460.5040107 () network-services ! uoregon ! edu
[Download RAW message or body]


Older versions of Quagga/Zebra would output a value in MRT table
dump files for "uptime" aka "ORIGINATED" that was a WALL clock
value.  Given that uptime is now internally a bgp_clock MONOTONIC
value, the output in the MRT files is showing up as monotonic.

Note: time of MRT dump is still recorded correctly as a
time() based value, so we haven't lost that value.

Proposal is to correct the uptime output on the vty and in the
MRT files to again display something more akin to WALL time.

We already do this for the vty using this code:

"bgpd/bgp_route.c" route_vty_out_detail
bgp_route.c: time_t temp_time;
...
bgp_route.c:      temp_time = bgp_clock();
bgp_route.c:      temp_time -= binfo->uptime;
bgp_route.c:      temp_time = time(NULL) - temp_time;
bgp_route.c:      vty_out (vty, "      Last update: %s", ctime
(&temp_time));

We propose to do the same thing for
"bgpd/bgp_dump.c" bgp_dump_routes_func
bgp_dump.c: time_t temp_time;
...
bgp_dump.c:       temp_time = bgp_clock();
bgp_dump.c:       temp_time -= info->uptime;
bgp_dump.c:       temp_time = time(NULL) - temp_time;
bgp_dump.c:       /* Originated */
bgp_dump.c:       stream_putl (obuf, temp_time);

Comments welcome.

John Kemp (kemp@routeviews.org)

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic