CAIDA / bgpstream

BGP measurement analysis for the masses
GNU General Public License v2.0
109 stars 43 forks source link

bgpreader: capture timestamp is printed as float #94

Closed cmosig closed 5 years ago

cmosig commented 5 years ago

The lastest version from this repository prints the record-ts as float. I did a normal install:

$ ./autogen.sh
$ ./configure
$ make

Sample query:

libbgpstream/tools/bgpreader -t updates -w 1566000000

output:

U|A|1566900037.734832|routeviews|route-views.sfmix|||32354|206.197.187.5|84.205.64.0/24|206.197.187.5|32354 174 39351 12654|12654||||10.34.183.128
U|A|1566900046.413309|routeviews|route-views.sfmix|||32354|206.197.187.5|84.205.64.0/24|206.197.187.5|32354 3257 174 12654|12654||||10.34.183.128
U|A|1566900070.605097|routeviews|route-views.sfmix|||14061|206.197.187.10|84.205.64.0/24|206.197.187.10|14061 6453 1299 15685 6881 12654|12654|6453:86 6453:1000 6453:1200 6453:1202 14061:400 14061:2000 14061:2004 14061:4000 14061:4002|||10.34.183.128
U|A|1566900070.605217|routeviews|route-views.sfmix|||14061|206.197.187.10|84.205.64.0/24|206.197.187.10|14061 6453 174 12654|12654|6453:86 6453:1000 6453:1300 6453:1305 6453:2000 14061:400 14061:2000 14061:2004 14061:4000 14061:4002|||10.34.183.128
....
alistairking commented 5 years ago

It seems like you are running BGPStream v2, which is found in the libbgpstream GitHub repo (https://github.com/caida/libbgpstream). BGPStream v2 uses float values because some of the new data sources it supports have sub-second precision.

Are you sure that you cloned this repo (bgpstream) rather than libbgpstream?

I just tried cloning this repo and it prints integers as expected:

$ git clone git@github.com:caida/bgpstream.git
$ cd bgpstream/
$ ./autogen.sh
$ ./configure
$ make
$ ./tools/bgpreader -t updates -w 1566000000
U|A|1566000000|routeviews|route-views.sg|18106|27.111.228.6|202.70.88.0/21|27.111.228.40|18106 9498 23752|23752|9989:2000||
U|A|1566000000|routeviews|route-views.sg|18106|27.111.228.6|23.35.212.0/22|27.111.228.6|18106 4657 2914 6762|6762|4657:2000||
U|A|1566000000|routeviews|route-views.sg|24482|27.111.228.159|23.35.212.0/22|27.111.228.159|24482 6453 6762|6762|6453:86 6453:2000 6453:2100 6453:2101 6453:3000 24482:1 24482:11020 24482:11021 24482:20100 24482:20200 24482:20201 24482:64601||
...
cmosig commented 5 years ago

Yes I am sorry. I confused the repositories.

Are the timestamps also going to be floats in this repository at some point?

alistairking commented 5 years ago

No, this repository will eventually superceded by the libbgpstream and pybgpstream repos. We will continue to maintain v1 (this repo) for the time being, but eventually it will be deprecated.