Re: [tkined] Trouble with ip_monitor

Doug Hughes (Doug.Hughes@Eng.Auburn.EDU)
Fri, 21 Nov 1997 08:52:49 -0600

>>From time-to-time the ip_monitor terminates without any message or indication
>that it has done so.
>
>Q. Is there a way of setting up an alert to notify the operators to restart the
>ip-monitor when it goes down?
>
>Q. Can I set-up a trap to determine the cause of the ip-monitor termination?
>

That ip_monitor is going to be stored in the running tkined as a command
interpreterX (where X is a numeric value).

You can always loop through the interpreters, and do an 'interpreterX name'
to find the ip_monitor interpreter, then store that and use it the periodically
check on the status of your interpreter (perhaps using after? possibly
even by an external with application using 'send')

Here's an excerpt from manager.tcl (apps dir) that shows how tkined deals
with interpreters internally. This example kills an interpreter, but you
should be able to take out enough information to get a loop over
existing interpreters which you can check.

proc "Kill Interpreter" { list } {

set interps ""
set tools ""
foreach comp [ined retrieve] {
switch [ined type $comp] {
INTERPRETER {
lappend interps $comp
}
MENU {
lappend tools $comp
}
}
}

set list ""
foreach interp $interps {
set id [ined id $interp]
set tlist ""
foreach tool $tools {
if {[ined interpreter [ined id $tool]] == $id} {
lappend tlist [lindex $tool 2]
}
}
set name [file tail [ined name $id]]
lappend list [format "%-14s(%s) %s" $id $name $tlist]
}

set result [ined list "Select an interpreter to kill:" $list \
[list kill cancel] ]
if {[lindex $result 0] == "cancel"} return

ined delete [lindex [lindex $result 1] 0]
}

--
____________________________________________________________________________
Doug Hughes					Engineering Network Services
System/Net Admin  				Auburn University
			doug@eng.auburn.edu

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.