Persistent VTY history?

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Mon Oct 8 12:07:56 UTC 2018


On Sat, Oct 06, 2018 at 12:54:04PM +0200, Harald Welte wrote:
> On Sat, Oct 06, 2018 at 11:33:01AM +0100, Keith wrote:
> > Was just thinking today about if it was ever considered to write the VTY
> > history out to a file on exiting (and load it on startup)

I've had the desire to implement this a number of times before. Especially
because during testing, of course the vty session is closed with every program
restart, and it takes extra effort to just call the same commands again...

> Not sure if $HOME is such a good idea for "system services/daemons" like
> the osmocom daemons.  I wouldn't be surprised if that would either point
> to a read-only mount or /tmp in various configurations.
[...]
> The only problem that I can see is that there can be any number of users
> using any number of VTY sessions in parallel.  So which history do we store?

I think it would have made more sense to do it per-user, but that isn't
possible from the server process. We don't know which user is connected via
telnet.

We could also toss up a telnet client that manages the history externally;
osmo_interact_vty.py comes to mind, so far used mostly for transcript tests.
With a few tweaks that could become a usable shell. Then we don't need to
bother the server process with I/O of writing history files, and keep out the
complexity of interleaving parallel VTY sessions.

Such a client could also have a bit of convenience for VTY port number lookups,
like that tip of naming the ports in /etc/services, just without the need to
edit that file.

Which sounds a lot like:

> Slighty unrelated: zebra/quagga also has many programs and each with their
> own VTY.  They then introduced something called vtysh, whihc I only read
> about but never used myself.  It supposedly allows you to talk
> to all of the various daemons from one frontend:
> 	https://www.systutorials.com/docs/linux/man/1-vtysh/
> Definitely worth investigating if somebody is lookning for VTY usability
> improvements..

~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20181008/2df90d3f/attachment.bin>


More information about the OpenBSC mailing list