Hi, I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options: debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets }) Control protocol debugging via BIRD logs BIRD 1.6.0 ready. bird> debug all states syntax error bird> debug all events syntax error bird> debug cogent states syntax error bird> debug cogent events syntax error bird> debug cogent all bird> The 'all' works, but the others do not. Do I misunderstand the argument option specification? Thanks, micah
Hi, Micah! It could be a little confusing.. Try in BIRD client this: BIRD 1.6.0 ready. bird> debug all { states } bird> debug cogent { states, routes } Best Regards, Pavel On 2016-08-16 18:06, micah anderson wrote:
Hi,
I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options:
debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets }) Control protocol debugging via BIRD logs
BIRD 1.6.0 ready. bird> debug all states syntax error bird> debug all events syntax error bird> debug cogent states syntax error bird> debug cogent events syntax error bird> debug cogent all bird>
The 'all' works, but the others do not. Do I misunderstand the argument option specification?
Thanks, micah
Thanks Pavel, That works, but I have to say that it is very confusing how those arguments are presented! micah Pavel Tvrdík <pavel.tvrdik@nic.cz> writes:
Hi, Micah!
It could be a little confusing..
Try in BIRD client this:
BIRD 1.6.0 ready. bird> debug all { states } bird> debug cogent { states, routes }
Best Regards, Pavel
On 2016-08-16 18:06, micah anderson wrote:
Hi,
I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options:
debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets }) Control protocol debugging via BIRD logs
BIRD 1.6.0 ready. bird> debug all states syntax error bird> debug all events syntax error bird> debug cogent states syntax error bird> debug cogent events syntax error bird> debug cogent all bird>
The 'all' works, but the others do not. Do I misunderstand the argument option specification?
Thanks, micah
On 2016-08-24 19:39, micah wrote:
Thanks Pavel,
That works, but I have to say that it is very confusing how those arguments are presented!
You're welcome! Do you have an idea how to express it another way? Kind Regards, Pavel
micah
Pavel Tvrdík <pavel.tvrdik@nic.cz> writes:
Hi, Micah!
It could be a little confusing..
Try in BIRD client this:
BIRD 1.6.0 ready. bird> debug all { states } bird> debug cogent { states, routes }
Best Regards, Pavel
On 2016-08-16 18:06, micah anderson wrote:
Hi,
I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options:
debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets }) Control protocol debugging via BIRD logs
BIRD 1.6.0 ready. bird> debug all states syntax error bird> debug all events syntax error bird> debug cogent states syntax error bird> debug cogent events syntax error bird> debug cogent all bird>
The 'all' works, but the others do not. Do I misunderstand the argument option specification?
Thanks, micah
On Wed, 2016-08-24 at 20:16 +0200, Pavel Tvrdík wrote:
On 2016-08-24 19:39, micah wrote:
Thanks Pavel,
That works, but I have to say that it is very confusing how those arguments are presented!
You're welcome! Do you have an idea how to express it another way?
In my opinion: debug (<protocol> | <pattern> | all) (all | off | ( "{" states | routes | filters | interfaces | events | packets "}" ) ) Control protocol debugging via BIRD logs The parethensis are to group all the various options and the "{" and "}" is so it's clearer that we must write { and }.
Kind Regards, Pavel
micah
Pavel Tvrdík <pavel.tvrdik@nic.cz> writes:
Hi, Micah!
It could be a little confusing..
Try in BIRD client this:
BIRD 1.6.0 ready. bird> debug all { states } bird> debug cogent { states, routes }
Best Regards, Pavel
On 2016-08-16 18:06, micah anderson wrote:
Hi,
I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options:
debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets }) Control protocol debugging via BIRD logs
BIRD 1.6.0 ready. bird> debug all states syntax error bird> debug all events syntax error bird> debug cogent states syntax error bird> debug cogent events syntax error bird> debug cogent all bird>
The 'all' works, but the others do not. Do I misunderstand the argument option specification?
Thanks, micah
On 08/30/2016 02:01 PM, Bernardo Figueiredo wrote:
In my opinion: debug (<protocol> | <pattern> | all) (all | off | ( "{" states | routes | filters | interfaces | events | packets "}" ) ) Control protocol debugging via BIRD logs
The parethensis are to group all the various options and the "{" and "}" is so it's clearer that we must write { and }.
I think that explanation is better than the current one. However, it may not play well with the CF_CLI macro that defines the grammar from the explanation (in nest/config.Y). Forgetting about the macro for a moment, I think we can still do a better explanation. The | here to me indicates a choice, e.g. "either states or routes or filters", but in reality the user can combine these flags. We need something that can say "one or more of: states, routes, filters, interfaces, events, packets". It's hard to say this in a single line without cluttering everything, though... If we had more space, we could do something like: debug (<protocol> | <pattern> | all) (all | off | "{" DEBUG_FLAG, [ DEBUG_FLAG, ... ] "}" ) ) Control protocol debugging via BIRD logs Available DEBUG_FLAGs: states, routes, filters, interfaces, events, packets Of course, this isn't consistent with the remaining help explanations. Not to mention we'd need a different CF_CLI* macro. Does anyone have a better idea? Regards, Israel G. Lugo
"Israel G. Lugo" <israel.lugo@lugosys.com> writes:
On 08/30/2016 02:01 PM, Bernardo Figueiredo wrote:
In my opinion: debug (<protocol> | <pattern> | all) (all | off | ( "{" states | routes | filters | interfaces | events | packets "}" ) ) Control protocol debugging via BIRD logs
The parethensis are to group all the various options and the "{" and "}" is so it's clearer that we must write { and }.
Forgetting about the macro for a moment, I think we can still do a better explanation. The | here to me indicates a choice, e.g. "either states or routes or filters", but in reality the user can combine these flags.
Yes, precisely!
We need something that can say "one or more of: states, routes, filters, interfaces, events, packets". It's hard to say this in a single line without cluttering everything, though...
If we had more space, we could do something like:
debug (<protocol> | <pattern> | all) (all | off | "{" DEBUG_FLAG, [ DEBUG_FLAG, ... ] "}" ) ) Control protocol debugging via BIRD logs Available DEBUG_FLAGs: states, routes, filters, interfaces, events, packets
I think that this would be a lot clearer. If it was just the first line, and not the "Available DEBUG_FLAGS" line, then it would actually be less text than the original (25chars vs. 32). I'd argue that this second line shouldn't be there anyways, its the kind of thing you can look up in the man page. micah
Hi. On 2016-09-02 13:59, Israel G. Lugo wrote:
On 08/30/2016 02:01 PM, Bernardo Figueiredo wrote:
In my opinion: debug (<protocol> | <pattern> | all) (all | off | ( "{" states | routes | filters | interfaces | events | packets "}" ) ) Control protocol debugging via BIRD logs
The parethensis are to group all the various options and the "{" and "}" is so it's clearer that we must write { and }.
I think that explanation is better than the current one. However, it may not play well with the CF_CLI macro that defines the grammar from the explanation (in nest/config.Y).
Forgetting about the macro for a moment, I think we can still do a better explanation. The | here to me indicates a choice, e.g. "either states or routes or filters", but in reality the user can combine these flags.
We need something that can say "one or more of: states, routes, filters, interfaces, events, packets". It's hard to say this in a single line without cluttering everything, though...
If we had more space, we could do something like:
debug (<protocol> | <pattern> | all) (all | off | "{" DEBUG_FLAG, [ DEBUG_FLAG, ... ] "}" ) ) Control protocol debugging via BIRD logs Available DEBUG_FLAGs: states, routes, filters, interfaces, events, packets
Of course, this isn't consistent with the remaining help explanations. Not to mention we'd need a different CF_CLI* macro.
Does anyone have a better idea?
I found out that <pattern> should be in quotes too. It should be "<pattern>" like for "bgp*". I've made a git branch 'cli-debugging' with a variant (39a7bce): bird> debug ? debug (<protocol> | "<pattern>" | all) (all | off | "{" <flag1> [, <flag2> ...] "}") Control protocol debugging via BIRD logs Available flags: states, routes, filters, interfaces, events, packets In my opinion, the quotes by "<pattern>", "{" and "}" is confusing too. And a comma should be probably quoted too in this case. New line before available flags is possible but inconsistent. What do you think about this (276a639)? bird> debug ? debug (<protocol> | "<pattern>" | all) (all | off | {<flag1> [, <flag2> ...]}) Control protocol debugging via BIRD logs, available flags: states, routes, filters, interfaces, events, packets Thanks to all for propositions! Pavel
Hello, world!\n
In my opinion, the quotes by "<pattern>", "{" and "}" is confusing too. And a comma should be probably quoted too in this case. New line before available flags is possible but inconsistent.
As far as I remember my original intentions years ago, { and } are ambiguous, because they can be understood meta-syntantically as well as literally. Hence quoting. Comma bears no such ambiguity. This notwithstanding, if people have problems with parsing the help texts, we should improve the texts. Please keep the syntax descriptions consistent, though. (It might be helpful to give a formal definition of the meta-language somewhere in the manual.) Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth There is no place like ~
Hi.
On 2016-08-16 18:06, micah anderson wrote:
I wanted to debug the states of a neighbor, but I cannot seem to figure out how to change debugging on the command-line in a way that *seems* according to the argument options:
debug (<protocol> | <pattern> | all) (all | off | { states | routes | filters | interfaces | events | packets })
Pavel Tvrdík <pavel.tvrdik@nic.cz> writes:
Try in BIRD client this:
bird> debug all { states } bird> debug cogent { states, routes }
On 2016-08-24 19:39, micah wrote:
That works, but I have to say that it is very confusing how those arguments are presented!
We changed debug options description to: debug <protocol> | "<pattern>" | all) (all | off | { states|routes|filters|interfaces|events|packets [, ...] } Hope it will be more understandable. Best regards, Pavel
participants (6)
-
Bernardo Figueiredo -
Israel G. Lugo -
Martin Mares -
micah -
micah anderson -
Pavel Tvrdík