Switches, Hubs, and Modems
1753809 Members
8736 Online
108805 Solutions
New Discussion юеВ

How to avoid pressing space bar while running the log below for switch n teraterm?

 
SOLVED
Go to solution
Mokan160791
Occasional Contributor

How to avoid pressing space bar while running the log below for switch n teraterm?

; ***Macro Template to collect Switch log****************

; Get current directory
getdir curdir
groupmatchstr1=curdir
groupmatchstr2="\Logs"
strjoin strvar "" 2
changedir strvar
setdir strvar

CommandPrompt = '#'
inputbox 'Please enter IP:' 'IP'
IP = inputstr
;inputbox 'Please enter SiteID:' 'Site ID'
;SiteID = inputstr
;SiteID = ''
;inputbox 'Please enter Router name with Router ID:' 'Router Name'
;RouterName = inputstr
;toupper RouterName RouterName

groupmatchstr1=IP
;groupmatchstr2=SiteID
;groupmatchstr3=RouterName
groupmatchstr4=".log"
strjoin logfile "" 4
;logfile=strvar

groupmatchstr1= logfile
groupmatchstr2= ".tmp"
strjoin tmp_file "" 2
;tmp_file = strvar

;start logging

logopen logfile 0 0
gettime curtime "------------------------------------%Y-%m-%d %H:%M:%S----------------------------------"
logwrite curtime

;setsync 0

sendln

 

wait CommandPrompt
sendln 'term length 1000'

wait CommandPrompt
sendln 'set sl=n'

wait CommandPrompt
flushrecv
sendln 'sh system-information'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh running-config'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh ip'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh trunks'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh VLANS'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh logging'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh interface brief'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh interface config'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh interfaces'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh interface all'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh spanning-time'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh spanning-time config'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh management'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh ip igmp'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh ip igmp config'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh stack'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh stack all'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh gvrp'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh lacp'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh authentication'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh cdp neighbours'

mpause 500
wait CommandPrompt
flushrecv
sendln 'sh arp'

pause 1
wait CommandPrompt
flushrecv
sendln 'sh version'

pause 1
wait CommandPrompt
flushrecv
sendln 'edomtset'

pause 1
wait CommandPrompt
flushrecv
sendln 'edomtset'

wait CommandPrompt
flushrecv
sendln 'PKTpoolStatsShow'

wait CommandPrompt
flushrecv
sendln 'MSGpoolStatsShow'

wait CommandPrompt
flushrecv
sendln 'end'

logclose

2 REPLIES 2
AbeAbe
Trusted Contributor
Solution

Re: How to avoid pressing space bar while running the log below for switch n teraterm?

Hi,
First command to send to the switch should be:

wait CommandPrompt
flushrecv
sendln 'No page'


Hth
Alex
Mokan160791
Occasional Contributor

Re: How to avoid pressing space bar while running the log below for switch n teraterm?

HI Alex,

Thank You so much for the guidance. Very much appreaciated. With the command it is working perfectly.

Thank You.

Mokan