From 3693bb6a1f8eb3e461d20740c0d86bbc6d660816 Mon Sep 17 00:00:00 2001 From: Razvan Deaconescu Date: Mon, 28 Feb 2011 17:35:43 +0200 Subject: [PATCH] Utils-eurocon: script for discarding "error" lines error lines are lines where measured inactivity time is (erroneously) reported to be less than inactive time --- .../process/inactive_timespan_drop_irrelevant | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant diff --git a/Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant b/Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant new file mode 100755 index 0000000..209336d --- /dev/null +++ b/Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant @@ -0,0 +1,21 @@ +#!/usr/bin/awk -f + +# +# expect lines consisting of inactivity time and manifested time +# 512 564 +# 32 54 +# +# discard irrelevant/error lines where manifested time is shorter than +# inactivity time +# + +{ + # only print relevant + if ($2 > 0) { + if ($2 > $1) + print $1, $2; + if (($1-$2) / $1 < 0.10) { + print $1, $2; + } + } +} -- 2.20.1