################################################# # Function definitions for xfs dump type ################################################# proc xfs_dump {host atom level} { global sessionID tmpdir set hostlogfile $tmpdir/BURTlog.${sessionID}.$host if { [string compare $atom "/"] == 0 } { append hostlogfile ".root" } else { regsub -all {/} $atom "." newatom append hostlogfile "$newatom" } append hostlogfile ".$level.xfs" set dumpfd [open "|/usr/ucb/rsh $host -n \"/etc/xfsdump -l $level - $atom\" 2> $hostlogfile" {RDONLY NONBLOCK}] set stderrfd [open $hostlogfile r] return [list $dumpfd $stderrfd] } proc xfs_cleanup {host atom level} { global sessionID tmpdir set hostlogfile $tmpdir/BURTlog.${sessionID}.$host if { [string compare $atom "/"] == 0 } { append hostlogfile ".root" } else { regsub -all {/} $atom "." newatom append hostlogfile "$newatom" } append hostlogfile ".$level.xfs" catch {file delete $hostlogfile} } proc xfs_check {host atom level line} { return [regexp {error|Unknown|EXITED|ATTENTION|abort|Bad} $line] } proc xfs_recover {host atom level} { return [open "$host.$level.burt" w] } proc xfs_schedule {line} { global logfilefd rshStatus foreach {host level type} $line {} if { $rshStatus(running) >= 10 } { vwait rshStatus(running) } scheduleHostWithRsh $host $level $type /bin/rsh -n incr rshStatus(scheduled) # foreach atom [hosttoatomlist $host /bin/rsh -n] { # schedule add $host $atom $level $type # puts $logfilefd "BURT: Scheduling $host $atom $level $type" # } }