华为交换机不分页显示screen-length命令和screen-width每屏显示宽度-老肖的博客-51CTO博客,length怎么用
背景:
华为交换机不分页显示意思是你分页显示的话,譬如dis cur查看配置,dis arp all查看路由表,因为一夜屏幕显示不了,总是一页满了要停下来,提示按空格显示更多------- more ----------
其实这个是可以设置不分页显示,让你敲一个dis cur查看配置,一下子就全部出来了!这对于写python一些程序显示交换机信息可能带来很大的便利,不用代码层面写判断------- more ----------的分页情况!
华为交换机不分页显示操作如下(screen-length命令):
sys? ??
[huawei]user-interface vty 0 4
[huawei-ui-vty0-4]screen-length ?
? INTEGER<0-512>? Display the number of lines on a screen (the value 0
? ? ? ? ? ? ? ? ? indicates none split screen, and the default value is 24)
[huawei-ui-vty0-4]screen-length 0
[huawei-ui-vty0-4]
在屏幕上显示行数(值0表示无拆分屏幕,默认值为24)
上面是对vty设置,也可以对console设置!此外,vty设置请用dis users看看你当前vty
dis users
? User-Intf? ? Delay? ? Type? ?Network Address? ? ?AuthenStatus? ? AuthorcmdFlag
+ 34? VTY 0? ?00:00:00? TEL? ? 10.30.0.3? ? ? ? ? ? ? ? ?pass? ? ? ? ? ?no? ? ? ? Username : admin@123
扩展学习:还有调整列数的screen-width命令
screen-width命令用来设置终端屏幕的显示列数。
命令格式
screen-width screen-width?
screen-width 指定终端屏幕的每屏显示宽度。 整数形式,取值范围是60~512。?
应用场景:从Console口登录设备,执行命令display interface description [ interface-type [ interface-number ] ] 查看接口信息时,终端屏幕上的显示信息不会自动换行,导致输出信息格式错位。
执行该命令,可以调整命令的输出信息格式。通常情况下,无需调整终端屏幕的列数,且不推荐设置屏幕显示列数。
注意事项
**执行该命令,设置的终端屏幕显示列数只对当前连接有效,用户退出后不保存设置。例如,用户从Console口登录设备,配置该命令,设置的终端屏幕显示列数只对当前Console口连接生效,不影响从VTY等其它接口登录的用户的终端屏幕显示。如果用户退出Console口后再登录设备,终端屏幕将显示缺省宽度。**
该命令仅对display interface description [ interface-type [ interface-number ] ]的显示信息生效。
总结:我本来写个python ,里面dis arp如下,就是出现了我不想出现的换行显示了,导致我想把arp信息的ip和mac导入xlsx要处理这些换行。本以为查到了screen-width这个命令可以解决我的问题,但是发现这个命令对display interface description [ interface-type [ interface-number ] ]的显示信息生效。而且只临时生效,导致无法解决我的需求,后期再查查吧!
dis? arp
IP ADDRESS? ? ? MAC ADDRESS? ? ?EXPIRE(M) TYPE? ? ? ? INTERFACE? ?VXX-INSTANCE?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? VLAN/CEVLAN?
------------------------------------------------------------------------------
10.30.0.27? ? ? 346a-c221-d900? ? ? ? ? ? I -? ? ? ? ?GE2/6/0/0? ? ??
10.30.50.254? ? 4482-e5a4-13f6? ? ? ? ? ? I -? ? ? ? ?Vlanif50? ? ? ?
10.30.50.166? ? 48a4-7255-3f75? 12? ? ? ? D-0/0? ? ? ?Wlan-Dbss947? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 50/-? ? ??
10.30.50.128? ? 6c4d-730b-095e? 19? ? ? ? D-0/0? ? ? ?Wlan-Dbss340? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 50/-? ? ??
10.30.50.86? ? ?a866-7fda-79fe? 20? ? ? ? D-0/0? ? ? ?Wlan-Dbss1672??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 50/-? ? ??
10.30.51.254? ? 4482-e5a4-13f7? ? ? ? ? ? I -? ? ? ? ?Vlanif51??
http://www.dengb.com/ynwt/1378630.htmlwww.dengb.comtruehttp://www.dengb.com/ynwt/1378630.htmlTechArticle华为交换机不分页显示screen-length命令和screen-width每屏显示宽度-老肖的博客-51CTO博客,length怎么用 背景: 华为交换机不分页显示意思是你分...