Can pagination be disabled on the Bird console?
Hello, Is it possible to configure the Bird console so that the output isn't interrupted with '-More-' statements please? (similar to the Cisco 'terminal length 0' command) I'm using Expect in a Python script to collect data from Bird, so it would be handy to be able to switch this off (I'm using 2.0.9) Many thanks for your time, Adrian Adrian BROOKS Telecom Networks - Fixed Services Platforms Tel. : +352 2424 2301 adrian.brooks@post.lu<mailto:adrian.brooks@post.lu> POST Technologies 20, Rue de Reims L-2417 Luxembourg www.posttechnologies.lu<http://www.posttechnologies.lu/> [logo_technologies@2x.png] Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. Internet ne permettant pas d'assurer l'intégrité de ce message, POST Luxembourg décline toute responsabilité au titre de ce message, dans l'hypothèse où il aurait été modifié.
Hello Adrian, I don't have an answer to your questions, but might I suggest a whole different approach to your script? If you install Birdwatcher [1] then you put all the heavy lifting to parsing the birdc output to Birdwatcher. All you have to do is talk to a JSON API in your Python code. I think this makes your life a lot easier. I've used Birdwatcher in combination with PHP scripting and it works great! So, not an answer to your question, but I do hope that my e-mail is still useful for you. Kind regards, Cybertinus [1]: https://github.com/alice-lg/birdwatcher On 2022-03-09 14:44, Adrian Brooks wrote:
Hello,
Is it possible to configure the Bird console so that the output isn't interrupted with '--More--' statements please? (similar to the Cisco 'terminal length 0' command)
I'm using Expect in a Python script to collect data from Bird, so it would be handy to be able to switch this off (I'm using 2.0.9)
Many thanks for your time,
Adrian
Adrian BROOKS
Telecom Networks - Fixed Services Platforms
Tel. : +352 2424 2301
adrian.brooks@post.lu
POST Technologies
20, Rue de Reims
L-2417 Luxembourg
www.posttechnologies.lu [1]
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur.
Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse.
Internet ne permettant pas d'assurer l'intégrité de ce message, POST Luxembourg décline toute responsabilité au titre de ce message, dans l'hypothèse où il aurait été modifié.
Links: ------ [1] http://www.posttechnologies.lu/
On Wed, Mar 09, 2022 at 13:44:05 +0000, Adrian Brooks wrote:
Hello,
Is it possible to configure the Bird console so that the output isn't interrupted with '-More-' statements please? (similar to the Cisco 'terminal length 0' command)
I'm using Expect in a Python script to collect data from Bird, so it would be handy to be able to switch this off (I'm using 2.0.9)
Hello! You can pass commands to birdc right from OS CLI, for example: # birdc show route for 8.8.8.8 In such way pagination is not active. -- Alexander Shikov Technical Staff, Digital Telecom IX Tel.: +380 44 201 14 07 Mob.: +380 50 410 30 57 http://dtel-ix.net/
On Wed, Mar 09, 2022 at 01:44:05PM +0000, Adrian Brooks wrote:
Hello,
Is it possible to configure the Bird console so that the output isn't interrupted with '-More-' statements please? (similar to the Cisco 'terminal length 0' command)
I'm using Expect in a Python script to collect data from Bird, so it would be handy to be able to switch this off (I'm using 2.0.9)
Hi There is no such option, but it uses pagination only on terminal. If you call birdc with a pipe on stdin, pagination is not used. Also, you can use birdc with commands as arguments (i.e. 'birdc show route'), then pagination is also not used. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thanks very much for the answers I received on this subject. As a quick fix I started calling bird directly from the command line (e.g. birdc show route xxxx) but clearly I will have to investigate Birdwatcher, I suspect it would be a much more efficient way of collecting information. Kind regards, Adrian Adrian BROOKS Telecom Networks - Fixed Services Platforms Tel. : +352 2424 2301 adrian.brooks@post.lu POST Technologies 20, Rue de Reims L-2417 Luxembourg www.posttechnologies.lu Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. Internet ne permettant pas d'assurer l'intégrité de ce message, POST Luxembourg décline toute responsabilité au titre de ce message, dans l'hypothèse où il aurait été modifié. -----Original Message----- From: Ondrej Zajicek <santiago@crfreenet.org> Sent: 09 March 2022 3:30 PM To: Adrian Brooks <Adrian.Brooks@post.lu> Cc: bird-users@network.cz Subject: Re: Can pagination be disabled on the Bird console? ATTENTION : Ce mail provient de l'extérieur de Post. Ne cliquez pas sur les liens ou n'ouvrez pas les pièces jointes à moins de connaitre l'expéditeur et d'être sûr que le contenu est inoffensif. En cas de doute sur son origine ou si vous pensez qu'il est suspect, nous vous prions de rapporter cet évènement par email à cybersos@post.lu. On Wed, Mar 09, 2022 at 01:44:05PM +0000, Adrian Brooks wrote:
Hello,
Is it possible to configure the Bird console so that the output isn't interrupted with '-More-' statements please? (similar to the Cisco 'terminal length 0' command)
I'm using Expect in a Python script to collect data from Bird, so it would be handy to be able to switch this off (I'm using 2.0.9)
Hi There is no such option, but it uses pagination only on terminal. If you call birdc with a pipe on stdin, pagination is not used. Also, you can use birdc with commands as arguments (i.e. 'birdc show route'), then pagination is also not used. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Friday, March 11, 2022 3:45:16 A.M. AST Adrian Brooks wrote:
Thanks very much for the answers I received on this subject.
As a quick fix I started calling bird directly from the command line (e.g. birdc show route xxxx) but clearly I will have to investigate Birdwatcher, I suspect it would be a much more efficient way of collecting information.
Another option is to connect to the UNIX socket directly from your Python program. That's what we do for getting status and signaling configuration changes. -- James Oakley james@ttgi.io
participants (5)
-
Adrian Brooks -
Alexander Shikov -
Cybertinus -
James Oakley -
Ondrej Zajicek