3 # tickle-helper -- watch for reboots and 'tickle' the console during them
5 # Some consoles get broken when the machine reboots. There are normally
6 # fixed by trying to use them at or arround the reboot. Watch for reboots
7 # and initiate use of the console to trigger a drop/reconnect cycle.
9 # (C) Copyright IBM Corp. 2004, 2005, 2006
10 # Author: Andy Whitcroft <andyw@uk.ibm.com>
12 # The Console Multiplexor is released under the GNU Public License V2
18 puts stderr "Usage: $P"
24 puts stderr "$P: $msg"
28 puts stderr "$P: $msg"
34 warn "tickling console ..."
36 set now [clock seconds]
38 {blade: ERROR: console lost} {
40 {Elapsed time since release of system processors:} {
43 if {([clock seconds] - $now) > 5} {
44 set now [clock seconds]
45 warn "tickling console ..."
51 set now [clock seconds]
52 warn "tickling console ..."
58 warn "tickle complete ..."
65 warn "test trigger detected"
68 -re {Unmounting file systems|Unmounting local filesystems...} {
69 note "controlled reboot in progress ..."
70 set likely [clock seconds]
73 -ex {***** REBOOT LINUX *****} {
74 note "fsck failure occured ..."
75 set likely [clock seconds]
78 -re {HARDBOOT INITIATED|initated a hard reset} {
82 -re {Please stand by while rebooting the system|Restarting system} {
84 warn "shutdown complete, restart indicated"
88 warn "likely false positive"
93 if {$likely > 0 && ([clock seconds] - $likely) > 60} {
94 warn "trigger timeout"