From: Razvan Deaconescu Date: Mon, 28 Feb 2011 15:20:43 +0000 (+0200) Subject: Utils-eurocon: add process folder; add script for parsing hrk log file X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=33b1e08cb657d55749de5a12d558a7a9ce54644e;p=p2p-testing-infrastructure.git Utils-eurocon: add process folder; add script for parsing hrk log file --- diff --git a/Utils/test-socket-signal/test/eurocon-log/process/hrk_log_get_data b/Utils/test-socket-signal/test/eurocon-log/process/hrk_log_get_data new file mode 100755 index 0000000..49e1757 --- /dev/null +++ b/Utils/test-socket-signal/test/eurocon-log/process/hrk_log_get_data @@ -0,0 +1,18 @@ +#!/bin/bash + +grep '^ps' | awk -F '[ \t<>:,]+' ' +BEGIN { + rel_time = 0; + # printf "reltime percent upspeed dlspeed\n"; +} + +{ + dlspeed = $4 + 0; + upspeed = $6 + 0; + download = $8 + 0; + size = $12 + 0; + percent = 100.0 * download / size; + + printf "%d %.2f %.2f %.2f\n", rel_time, percent, upspeed, dlspeed; + rel_time++; +}'