cancel
Showing results for 
Search instead for 
Did you mean: 

EXOS CLI Cursor jumping

EXOS CLI Cursor jumping

M_Nees
Contributor III
EXOS CLI cursor is sometimes jumping out of the windows - especially on long command lines or if the putty windows was resized during the session (which is quite a normal effort).

Have a look:

40b8376cdfe44e71bad3863a2650c857_RackMultipart20161026-23712-190kuw-Cursor-jumping2_inline.png



Especially if you want to change one parameter within a existing line of commands.

This Problem occurs in all EXOS versions. I try several putty versions, but all have the same issue.

Does anybody know this issue ?

Is it possible to avoid that problem ? Maybe an adjustment on Putty client ?
Are there a possibility to make EXOS CLI line redraw ?

Regards
44 REPLIES 44

dfroe
New Contributor II
Your suggestion is to simply not change the size of a terminal after connect? Are you serious? I thought fixed-size terminals died after the VT100 era...

You simply cannot predict which terminal width you'll need at the moment when you are connecting to a CLI. You will need to make it smaller at some point when you have to compare CLI outputs with a Notepad, you will have to make it larger when you issue a command with a larger output and so on. Working with a fixed-sized terminal might work in theory - but not in reality and everyday life of an ordinary engineer. Of course when talking about command outputs it would be pretty neat if all show command would respect the current terminal width and dynamically output smaller or larger views depending on the current width; like everybody has been used for decades when using unix-like systems for instance.

So we have yet another annoying issue, and we are waiting for it to be fixed.
"The issue shouldn't happen [...], but I believe that could happen [...]".
For me this sounds pretty much like a bug.

I shouldn't answer from a phone.

For telnet/ssh I have been told in the past it should work. I don't have issues with telnet/ssh, but I agree I may have experienced it once or twice. So the possibility of a bug is high. But I failed to reproduced it. Now, I must be old school, I work with SecureCRT and in full screen. So maybe SCRT has a better VT100 emulation and/or being in fixed size is helping. I'm assuming from people's feedback that resizing is the problem in telnet/ssh. But I don't know for sure, actually.

I do understand how annoying this is, I use CLI a lot too. The main dev already has a clear understanding of my point of view on that matter.

That kind of feedback is important.

Stephane_Grosj1
Extreme Employee
To sum up. The issue is known for console access. And yes it's very annoying, I experience it as well... the 'config cli columns' is here to help. The issue shouldn't happen for telnet/ssh, but I believe that could happen if you resize it. I would encourage you to configure your terminal emulator to open a session with a good width (like 100 for example) and not change it.

dfroe
New Contributor II
I can just affirm having the same issue all the time, too.

It is simply incomprehensible for me that we still need need to waste time with silly things like telling a console to resize itself.

The technical Background is quite well explained here on StackExchange: http://unix.stackexchange.com/questions/207782/how-are-terminal-length-and-width-forwarded-over-ssh-...

The mentioned RFC 1073 describing how to (re-)signal terminal sizes through Telnet goes back to 1988(!). This is even older than the first publication of the Spanning Tree Protocol. Speaking for myself as a network engineer, I expect my network gear to simply support such mandatory features to make my life easier. We have more sophisticated work to do so I do not want to have constant battles with my switch console. When being onsite and doing my work I simply need systems assisting me - which basically applies to the terminal resizing and other things as well (like a more convinient STP implementation for example, but that's another story).

I hope Extreme XOS will support this kind of terminal resizing some day. Not neccessarily due to a bunch of feature requests; simply because it makes sense, and (at least some) people simply expect 28 years old stuff to work - out of the box. Anyway, thank you for sharing your workaround, Erik.

Erik_Auerswald
Contributor II
Well, I remembered somewhere seeing a resize script for EXOS... the Python Getting Started Guide (February 2015) from Extreme shows a file named "TermSize.py" on page 22, but no code for this. Thus I hacked up the following:
# source for terminal_size() function: # http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python/3010495#3010495 def terminal_size(): import fcntl, termios, struct h, w, hp, wp = struct.unpack('HHHH', fcntl.ioctl(1, termios.TIOCGWINSZ, struct.pack('HHHH', 0, 0, 0, 0))) return w, h columns, lines = terminal_size() # columns must be in the range [80, 256] if columns < 80: columns = 80 elif columns > 256: columns = 256 # lines must be in the range [24, 128] if lines < 24: lines = 24 elif lines > 128: lines = 128 import exsh exsh.clicmd("configure cli columns {0}".format(columns)) exsh.clicmd("configure cli lines {0}".format(lines))
I suggest to save the script as resize.py on the switch.

You can use it after resizing the terminal window:
  1. log into switch
  2. check terminal size used by EXOS
  3. resize terminal window
  4. run Python script from above
  5. check terminal size used by EXOS
Example:
~$ ssh admin@192.168.42.3 ExtremeXOS Copyright (C) 1996-2016 Extreme Networks. All rights reserved. This product is protected by one or more US patents listed at http://www.extremenetworks.com/patents along with their foreign counterparts. ============================================================================== Press the or '?' key at any time for completions. Remember to save your configuration changes. * SW2.1 # show management | include size CLI screen size : 24 Lines 80 Columns (this session only) * SW2.2 # # ... resizing terminal window ... * SW2.2 # show management | include size CLI screen size : 24 Lines 80 Columns (this session only) * SW2.2 # run script resize * SW2.3 # show management | include size CLI screen size : 47 Lines 100 Columns (this session only)

Erik
GTM-P2G8KFN