SICS-723 Provide a detector/reset_trip node to notify GumTree and allow reset.
This commit is contained in:
@ -64,6 +64,26 @@ proc ::histogram_memory::isc_initialize {} {
|
||||
}
|
||||
}
|
||||
|
||||
# Returns 0 If all trips acknowledged, -n if n trips unacknowledged, +n if too many acks?
|
||||
::utility::macro::getset float ::histogram_memory::reset_trip {args} {
|
||||
set num_trips [ SplitReply [hmm configure detector_protect_num_trip] ]
|
||||
set num_acks [ SplitReply [hmm configure detector_protect_num_trip_ack] ]
|
||||
set trip_cnt_diff [expr {$num_acks - $num_trips}]
|
||||
if {$args == ""} {
|
||||
return "reset_trip = $trip_cnt_diff"
|
||||
} else {
|
||||
if {$trip_cnt_diff != 0} {
|
||||
hmm configure fat_detector_protect_num_trip_ack $num_trips
|
||||
hmm astop
|
||||
wait 2
|
||||
hmm init
|
||||
}
|
||||
}
|
||||
}
|
||||
sicslist setatt ::histogram_memory::reset_trip klass detector
|
||||
sicslist setatt ::histogram_memory::reset_trip long_name reset_trip
|
||||
sicslist setatt ::histogram_memory::reset_trip data false
|
||||
|
||||
proc histmem {cmd args} {
|
||||
eval "_histmem $cmd $args"
|
||||
}
|
||||
|
Reference in New Issue
Block a user