Hi Blair, On 2011-12-18 23:28 , Blair Harrison wrote:
I'm trying to setup a looking glass server, and not having much luck with Quagga and lg. [.... on Debian Squeeze ....] At the moment when I run the "sh ip bgp regexp ^" or similar commands with large output from lg web interface, it seems to initiate the telnet connection, run the command, get part-way through receiving the output and lock up, eventually timing out.
I've found in the past that Debian compile their Quagga with flags that cause the output to be paginated (through "less" IIRC, but possibly through "default-pager" which is a symlink to your choice), and when I needed to automate it, I had to explicitly override that setting in the runtime environment, eg: TCL/Expect: set env(VTYSH_PAGER) /bin/cat Bourne Shell: VTYSH_PAGER=/bin/cat; export VTYSH_PAER I'm not sure how your lg web interface is connecting in to Quagga, but possibly it is running across something similar? Particularly if "part way through" equals either a typical page length (eg, 25 lines) or your terminal page length (eg, my terminal windows are normally 50-60 lines long). There may now be a non-environment-variable way of setting that at run time and/or forcing the pager setting not to be used. In the past I've also found "TERM=tty; export TERM" and similar to be useful for automated remote control; ssh/telnet/etc all contain hooks to try to pass the terminal type across the connection. (Mikrotiks need yet more special hacks to sanely control with, eg, expect. But fortunately they've documented these on their Wiki in the last couple of years.) Ewen