Below is a script to display the uptime on a Nortel Passport 7 & 15K Passport. You must be in the OS level before running the script.
Enjoy !!!!
;***********************************************************************
;* *
;* THIS SCRIPT IS FOR COLLECTING AND DISPLAYING THE UPTIME FOR ALL *
;* CARDS IN A 7 & 15K PASSPORT, ! NO TECHNICAL SUPPORT IMPLIED ! *
;* *
;* *
;***********************************************************************
proc Main
string card[16], cnum, cardn = "card", cardn2
integer cn = 2, carr, event
set terminal type VT100
transmit "^M"
if not waitfor "OS>" 5
usermsg "Not in eggshell (OS), enter OS and try again !! "
exit
endif
termmsg "`r`n`n`nProcessing Active CP`r`n"
set aspect display off
transmit "set unsafe^M"
waitfor ">"
transmit "uptime^M"
waitfor "Uptime "
rget card[0]
strinsert card[0] "ActCP" 0
for carr = 1 upto 14
cardn = "card"
numtostr cn cnum
strcat cardn cnum
cardn2 = cardn
strinsert cardn "`"" 0
strinsert cardn "rlogin " 0
strcat cardn "`"^M"
transmit cardn
if waitfor " ->" 3
transmit "uptime^M"
waitfor "Uptime "
rget card[carr]
strinsert card[carr] cardn2 0
transmit "exit^M"
waitfor "OS>"
else
strcat cardn2 " Card is inaccessible or not in service !! `r`n"
card[carr] = cardn2
endif
termmsg "Processing Card# "
termmsg cnum
termmsg "`r`n"
cn++
endfor
set aspect display on
termmsg "`r`n`n`n`n`n`n"
termmsg "Card Status`r`n"
termmsg "================================`r`n`n"
for carr = 0 upto 15
termmsg card[carr]
endfor
termmsg "`r`n================================`r`n`n`n`n`n`n"
transmit "^M"
;***************************************
dialogbox 0 1 23 325 220 3 " Passport UP Time Status Script Written by Chase Vale"
editbox 1 15 10 290 12 card[0]
editbox 2 15 22 290 12 card[1]
editbox 3 15 34 290 12 card[2]
editbox 4 15 46 290 12 card[3]
editbox 5 15 58 290 12 card[4]
editbox 6 15 70 290 12 card[5]
editbox 7 15 82 290 12 card[6]
editbox 8 15 94 290 12 card[7]
editbox 9 15 106 290 12 card[8]
editbox 10 15 118 290 12 card[9]
editbox 11 15 130 290 12 card[10]
editbox 12 15 142 290 12 card[11]
editbox 13 15 154 290 12 card[12]
editbox 14 15 166 290 12 card[13]
editbox 15 15 178 290 12 card[14]
pushbutton 16 135 200 40 13 "&Quit"
enddialog
while 1
dlgevent 0 Event ; Get dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 16 ; Cancel button
exit
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Get rid of dialog box.
;************************************************
endproc
Enjoy !!!!
;***********************************************************************
;* *
;* THIS SCRIPT IS FOR COLLECTING AND DISPLAYING THE UPTIME FOR ALL *
;* CARDS IN A 7 & 15K PASSPORT, ! NO TECHNICAL SUPPORT IMPLIED ! *
;* *
;* *
;***********************************************************************
proc Main
string card[16], cnum, cardn = "card", cardn2
integer cn = 2, carr, event
set terminal type VT100
transmit "^M"
if not waitfor "OS>" 5
usermsg "Not in eggshell (OS), enter OS and try again !! "
exit
endif
termmsg "`r`n`n`nProcessing Active CP`r`n"
set aspect display off
transmit "set unsafe^M"
waitfor ">"
transmit "uptime^M"
waitfor "Uptime "
rget card[0]
strinsert card[0] "ActCP" 0
for carr = 1 upto 14
cardn = "card"
numtostr cn cnum
strcat cardn cnum
cardn2 = cardn
strinsert cardn "`"" 0
strinsert cardn "rlogin " 0
strcat cardn "`"^M"
transmit cardn
if waitfor " ->" 3
transmit "uptime^M"
waitfor "Uptime "
rget card[carr]
strinsert card[carr] cardn2 0
transmit "exit^M"
waitfor "OS>"
else
strcat cardn2 " Card is inaccessible or not in service !! `r`n"
card[carr] = cardn2
endif
termmsg "Processing Card# "
termmsg cnum
termmsg "`r`n"
cn++
endfor
set aspect display on
termmsg "`r`n`n`n`n`n`n"
termmsg "Card Status`r`n"
termmsg "================================`r`n`n"
for carr = 0 upto 15
termmsg card[carr]
endfor
termmsg "`r`n================================`r`n`n`n`n`n`n"
transmit "^M"
;***************************************
dialogbox 0 1 23 325 220 3 " Passport UP Time Status Script Written by Chase Vale"
editbox 1 15 10 290 12 card[0]
editbox 2 15 22 290 12 card[1]
editbox 3 15 34 290 12 card[2]
editbox 4 15 46 290 12 card[3]
editbox 5 15 58 290 12 card[4]
editbox 6 15 70 290 12 card[5]
editbox 7 15 82 290 12 card[6]
editbox 8 15 94 290 12 card[7]
editbox 9 15 106 290 12 card[8]
editbox 10 15 118 290 12 card[9]
editbox 11 15 130 290 12 card[10]
editbox 12 15 142 290 12 card[11]
editbox 13 15 154 290 12 card[12]
editbox 14 15 166 290 12 card[13]
editbox 15 15 178 290 12 card[14]
pushbutton 16 135 200 40 13 "&Quit"
enddialog
while 1
dlgevent 0 Event ; Get dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 16 ; Cancel button
exit
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Get rid of dialog box.
;************************************************
endproc