[db-wg] improve --list-sources query to display latest serial?
- Previous message (by thread): [db-wg] improve --list-sources query to display latest serial?
- Next message (by thread): [db-wg] improve --list-sources query to display latest serial?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Edward Shryane
eshryane at ripe.net
Thu Aug 30 16:20:19 CEST 2018
Hi Job, this is due to a difference between the Whois Query service (port 43) and NRTM (port 4444). > On 28 Aug 2018, at 00:33, Job Snijders via db-wg <db-wg at ripe.net> wrote: > > Hi all, > > It appears there currently is no easy way to retrieve the current serial > from the RIPE DB. We're implementing some software to monitor whether > our local mirror is wildly out of sync with the RIPE DB or not. > The current serial is only returned from the NRTM service (whois.ripe.net <http://whois.ripe.net/>:4444) by using the "-q sources" command. > I kind of expected th serial to be listed in the --list-sources command, > but that field is set to 0. > > hanna:~ job$ whois -h whois.ripe.net -- --list-sources | grep RIPE > % This is the RIPE Database query service. > % The RIPE Database is subject to Terms and Conditions. > RIPE:3:N:0-0 > RIPE-GRS:3:N:0-0 > % This query was served by the RIPE Database Query Service version 1.91.2 (HEREFORD) > The "--list-sources" or "-q sources" command on the Whois service (whois.ripe.net <http://whois.ripe.net/>:43) lists all the available sources, but with zero serial (as port 43 is not used for mirroring). > In comparison, IRRd will display the current serial when the !j query is > issued: > > hanna:~ job$ whois -h rr.ntt.net -- '!jNTTCOM' > A25 > NTTCOM:N:0-978492:978492 > C > hanna:~ job$ > > I came up with a really ugly oneliner: > > $ whois -h 193.0.6.135 -p 4444 -- \ > "-g RIPE:3:$(curl -s https://ftp.ripe.net/ripe/dbase/RIPE.CURRENTSERIAL)-LAST" | \ > grep -v : | sed '/^$/d' | tail -n 2 | head -1 | awk '{ print $NF }' > 42486238 > > Depending on the time of day that oneliner may be quite quick, or take > several minutes to complete... obviously not ideal. > > Can --list-sources perhaps be improved to list the current serial? > > Kind regards, > > Job > Regards Ed Shryane RIPE NCC -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.ripe.net/ripe/mail/archives/db-wg/attachments/20180830/23549414/attachment.html>
- Previous message (by thread): [db-wg] improve --list-sources query to display latest serial?
- Next message (by thread): [db-wg] improve --list-sources query to display latest serial?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ db-wg Archives ]