[Xorp-hackers] show commands

Pavlin Radoslavov pavlin@icir.org
Mon, 17 Oct 2005 14:16:44 -0700


> > > Another thing on my mind; I know this has been
> > > brought up before, I even think there is a
> > > BugZilla entry for it, but shouldn't show commands
> > > be available all the time?
> > > If you start rtrmgr with a clean configuration
> > > there are almost no show commands at all. This
> > > confused me and I know it has others as well. If
> > > the "%module bgp" line is removed, the bgp
> > > commands appear and if run when bgp isn't started
> > > you simply get a "No BGP exists" which IMHO is
> > > much better than not seing the show command at
> > > all.
> > > 
> > > Other opinions?
> > 
> > Why a command should be in the tree if it cannot do anything?
> > This is a feature that was explicitly added to XORP, and my personal
> > preference is to keep it.
> It's probably most old habit. I'm used to having
> all the configuration commands available.
> "show bgp *" is not such a good example, a better
> one would be "show interfaces". It's always nice
> to have some of these show commands so that you
> can easily get a grip on the router.
> 
> > Simply removing the "%module foo" line is not the right thing
> > because without that line the external command will be executed
> > anyway, and the result may be unpredictable.
> Ah. The external command would need some error
> handling, yes.
> 
> > If many other users also prefer to always have all commands in the
> > tree and to see the "No foo exists" message, then ideally this
> > feature should be configurable. Unfortunately, we don't have a
> > mechanism (yet) to configure things like this.
> I have given it some thought, and I think you're
> right with a few exceptions such as the "show
> interfaces" command. What's your opinion on the
> "show interfaces" command? 

The "show interfaces" command obtains the information from the FEA
(to be more specific, from the module named "interface" that is
inside the FEA), hence if the FEA is not running the "show interfaces"
command won't be there. Practically all XORP modules depend
(directly or indirectly) on the "interface" module inside the FEA so
the "show interfaces" command should be almost always there. Only if
you are running XORP with an empty configuration for example, then
you won't see that command.

Pavlin