脚本介绍和使用
- 这是一个巡检脚本,使用 CRT 软件登陆H3C设备,点击 “Script” –> “Run” 选择脚本,运行脚本可得到需要收集的信息(当然你要打开 log 记录日志,相信你懂)
- 可以根据你的实际需要修改 “Send” 后面的内容
- 好久不更博客了,最近干了一些小项目,能写的我尽量写写……
#$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