01-28-2021 06:22 PM
This is a question that I have in regards to a 4 year old post. Where are we with this?
This was 4 years ago and still I see this issue.
Using Putty to SSH to EXOS 5520 on 31.1.1.3.
If you type something like sh port 1:1-48, you have to maximize your putty window to see it right so its not jumping around. So once putty is maximized when you get out of that view and lets say you want to run a few other commands, larger commands.
Say you type a somewhat longer command i dont know, like this for example:
enable sharing 1:57 grouping 1:57,2:57 algorithm address-based L3_L4 lacp
and now you want to create another load sharing group (or whatever it is thats simular but needs minor changes), you hit the up arrow to recall the last command, and then arrow back to the numbers maybe you want to change it to :
enable sharing 1:58 grouping 1:58,2:58 algorithm address-based L3_L4 lacp
Well as you start arrowing back to the first group of numbers, the cursor jumps up a line and the command dissapears. Its there, if you count how many spaces you need to go and delete and type and hit enter you can get the command updated and in, but usually thats not good to work blindly like that.
So 4 years later many software revisions later, any help with this issue? I haven’t recalled ever having this on a cisco or linux device.
Solved! Go to Solution.
01-29-2021 04:30 PM
I wrote my own terminal, so I have a few clues as to what’s going on.
The reason the cursor jumps is that the switch thinks the size of the terminal is smaller than what it is.
In your example, after recalling the command and coming back with the cursor, the switch thinks that the command is wrapped on 2 lines (the terminal would automatically print on next line if the line too long) so when it thinks you’ve reached the beginning of the 2nd line, it will jump up 1 line and position the cursor at the end of this line (according to the size the switch thinks the terminal is).
I had a try with Putty, and XOS (even tried a 5520) works well, both Telnet and SSH. Every time I resize the putty window, the XOS automatically adjusts to the new terminal size and there is no jumping.
Then I tried on XMC Webshell, and here it is flagrant. Any resize you do with XMC Webshell is not signalled back to the switch. This would be a bug on the XMC Webshell. I already don’t like the XMC Webshell much, so this is another nail in that coffin!
But with Putty it works ok. Then I tried your exact steps, did the show ports command (which you probably did without specifying “no-refresh”), and I re-sized the putty window WHILE the XOS was still refreshing the output. ESCaped that and then sure enough I could make the cursor jump. So the problem is that XOS does not adjust the terminal size if the terminal signals a new size while it is constantly refreshing the output of the command. However it is very easy to correct the behaviour, once you ESCaped the refreshed output (and you have an XOS CLI prompt showing), simply re-adjust the putty window size, and then that will sync it up on XOS as well.
I can raise these with GTAC if you like; but you can also do that.
02-07-2021 09:18 PM
I raised EXOS-28473 for the problem where XOS does not adjust the window size with SSH/Telnet if the terminal (e.g. Putty) is resized while a refreshed show command is displaying.
But XMC Webshell is a different problem. Webshell does not signal the window size to the connected device. So XOS keeps operating on the assumption of 80 columns. On some other switch CLIs (like VOSS and ERS) it won’t matter much because they won’t let the entered command every go beyond 80 characters, but XOS does not do that.
But I found this workaround which seems to do the job. Create an exshrc.xsf file with this command inside “configure cli columns 108” and place it on the XOS. The exshrc.xsf gets executed every time someone logs into the switch. If it was from Webshell, 108 columns seems to be what is needed to make it work right. If it was via Putty or some other proper terminal, the actual window size will be set after a resize.
02-01-2021 04:37 PM
Ludovico Stevens , yes if you could raise this with GTAC that would be great.
One expects that when the window is resized either if its constantly refreshing (like the show ports output) or not constantly refreshing (like sitting at a command line), the behavior should be the same. Consistency would go a long way here rather than having to type everything in a notepad document and cutting and pasting things in. Taking advantage of the up arrow to recall previous commands (sometimes long and needing an edit) or tab completion in the CLI is much better than copying and pasting between programs.
I would really like to see this work like it does if you SSH into a Linux machine. Point being, the linux system just plain works.
01-29-2021 05:22 PM
With Putty I only have this problem when connected via Serial. SSH is no issue and (I believe) Telnet also works fine.
So for me only two issues exist:
If you could raise a ticket with GTAC for the latter it would be great. Additionally what about this feature request:
net0057263 - FEATURE Allow Resize of WebShell Terminal To Accomodate Additional Rows/Columns Of Output
My customers always request this...
Best regards
Stefan
01-29-2021 04:30 PM
I wrote my own terminal, so I have a few clues as to what’s going on.
The reason the cursor jumps is that the switch thinks the size of the terminal is smaller than what it is.
In your example, after recalling the command and coming back with the cursor, the switch thinks that the command is wrapped on 2 lines (the terminal would automatically print on next line if the line too long) so when it thinks you’ve reached the beginning of the 2nd line, it will jump up 1 line and position the cursor at the end of this line (according to the size the switch thinks the terminal is).
I had a try with Putty, and XOS (even tried a 5520) works well, both Telnet and SSH. Every time I resize the putty window, the XOS automatically adjusts to the new terminal size and there is no jumping.
Then I tried on XMC Webshell, and here it is flagrant. Any resize you do with XMC Webshell is not signalled back to the switch. This would be a bug on the XMC Webshell. I already don’t like the XMC Webshell much, so this is another nail in that coffin!
But with Putty it works ok. Then I tried your exact steps, did the show ports command (which you probably did without specifying “no-refresh”), and I re-sized the putty window WHILE the XOS was still refreshing the output. ESCaped that and then sure enough I could make the cursor jump. So the problem is that XOS does not adjust the terminal size if the terminal signals a new size while it is constantly refreshing the output of the command. However it is very easy to correct the behaviour, once you ESCaped the refreshed output (and you have an XOS CLI prompt showing), simply re-adjust the putty window size, and then that will sync it up on XOS as well.
I can raise these with GTAC if you like; but you can also do that.