RE: [tkined] 1) Audible alerting and 2) Tkined background colour

Mark Newnham (mark.n@usa.net)
Tue, 7 Jul 1998 13:05:22 -0600

1) from editor.tcl, an example making the canvas white

# set up the canvas for the graphic
canvas $w.canvas -borderwidth 1 -highlightthickness 0 \
-width $width -height $height -relief groove -bg white

2) Regarding sound, if you want anything apart from beeps, it depends on
the OS. Although you can write a little script which gives different
sequences of beeps pretty easily. This is a copy of a response to the
same question that I asked in 1996...

mark.newnham> Has anybody had any experience of using sound as a
method of
mark.newnham> indicating errors (instead of or as well as flashing
icons)

Sound support really needs some internal support by tkined. However,
you can quickly hack something for local and private use. All you have
to do is to change a few lines in
/usr/local/lib/tkined/apps/library.tcl:

1) proc MoJoModify: add another radio button switch to the ined request
dialog so that you can set a new Threshold action:

set res [ined request "Modify $jobid ([lindex $jobcmd 0] $hosts)" \
[list [list "Intervaltime \[s\]:" $jobitv entry 10] \
[list "Job Status:" $jobstat radio active suspend] \
[list "Falling Threshold:" $falling entry 10] \
[list "Rising Threshold:" $rising entry 10] \
[list "Threshold action:" \
$action check syslog flash write sound] ] \
[list modify "kill job" cancel] ]

2) proc MoJoAction: add another if command to play the sound.

if {[lsearch $action sound] >= 0} {
exec cat ~/.tkined/flush.au > /dev/audio
}

This only works if you are running tkined on your local machine. And
this is exactly the reason why we need more support from tkined for
stuff like this. Use at your own risk. :-)

Juergen

And indeed, this worked very nicely (although I have since lost the
code...)

Regards

Mark
> ----------
> From: Charl Barnard[SMTP:charl@up.ac.za]
> Sent: Tuesday, July 07, 1998 7:58 AM
> To: mark@adacorp.com
> Subject: [tkined] 1) Audible alerting and 2) Tkined background
> colour
>
> Hi All,
>
> New to this list, but couldn't find these answers to these two
> questions
> which I believed would be FAQ's in the FAQ, so please excuse if FAQs:
>
> 1) Is there any way to generate an audible alert when a monitored
> object
> goes down ? I found a similar, unanswered question in this list's
> April,1997 archive. I suppose this would make part of a more general
> alerting subsystem, allowing pagers to be hooked up, etc ?
>
> 2) Is there a simple way to change the background colour of Tkined's
> map
> display ?
>
> Thanks,
>
> -- Charl
> =================================+====================================
> =
> Charl J. Barnard | NW II Building Room
> 5-1.3
> charl@up.ac.za | University of Pretoria
> Tel.: +27-12-420-2444 | Pretoria, South Africa
> "To understand recursion, one must first understand recursion."
>
> --
> !! 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.
>

--
!! 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.