H3C_SecureCRT巡检脚本

This is an article that was created 1313 days ago, and the information may have evolved or changed.

脚本介绍和使用

  • 这是一个巡检脚本,使用 CRT 软件登陆H3C设备,点击 “Script” –> “Run” 选择脚本,运行脚本可得到需要收集的信息(当然你要打开 log 记录日志,相信你懂)
  • 可以根据你的实际需要修改 “Send” 后面的内容
  • 好久不更博客了,最近干了一些小项目,能写的我尽量写写……
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#$language = "VBScript"
#$interface = "1.0"

crt.Screen.Synchronous = True

' This automatically generated script may need to be
' edited in order to work correctly.

Sub Main
crt.Screen.Send "#start right now"& chr(13)
crt.Screen.WaitForString ">"
crt.Screen.Send "screen-length disable" & chr(13)
crt.Screen.Send "display cur " & chr(13)
crt.Screen.Send "display ip interface brief" & chr(13)
crt.Screen.Send "display interface brief des" & chr(13)
crt.Screen.Send "display vlan" & chr(13)
crt.Screen.Send "display vlan brief" & chr(13)
crt.Screen.Send "display ip routing-table" & chr(13)
crt.Screen.Send "display version" & chr(13)
crt.Screen.Send "display cpu-usage" & chr(13)
crt.Screen.Send "display memory" & chr(13)
crt.Screen.Send "display device manuinfo" & chr(13)
crt.Screen.Send "save force" & chr(13)
crt.Screen.Send "save force" & chr(13)
End Sub

H3C_V5_V7设备巡检信息提取 我的母亲
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×