Jerry Tilsley wrote:Can you provide me with an example of how to dump the messages out of the error database via TCL?
Jerry Tilsley wrote:
#! /bin/kshsetrootsetsite $1hcitcl /quovadx/qdx5.7/integrator/scripts/errordb_alert.tcl -a "$2" -e $3 -f "$4
#! /quovadx/qdx5.7/integrator/bin/hcitcl##############################proc main { argc argv } { set optargs [list {a 1 alert} {e 1 email} {f 1 filename}] catch {set args [getopt $argv $optargs]} err #echo ALERT:$alert #echo FILENAME:$filename #set thread [lindex [split $alert " "] 4] set thread unknown set tlist [split $alert "{"] for { set i 1 } { $i threadm count] } { if { $count > 0 } { set thread $threadm } } } #echo $thread set subj "Error Message from PWIM - [clock format [clock seconds] -format "%D %R %p"] $alert" foreach flag { o f d } { catch {exec yes | hcidbdump -e -L -c -D -$flag $thread | fold} dump if {[llength [split $dump n]] > 6} { write_file $filename $dump catch {[exec mailx -s $subj $email <$filename]} emailerr } }}main $argc $argv