summaryrefslogtreecommitdiff
path: root/src/suids.sh
blob: da2fb81d436005c16f36afac6890e281dfdeca46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
awk '
  /^m/ {
    uid = $10
    messages[uid] += 1
    succ[uid] += $5
    fail[uid] += $6
    temp[uid] += $7
    mbytes[uid] += $4
    sbytes[uid] += $4 * $5
    rbytes[uid] += $4 * ($5 + $6)
  }
  /^d/ {
    uid = $10
    xdelay[uid] += $5 - $4
  }
  END {
    for (uid in messages) {
      str = sprintf("%.6f",xdelay[uid])
      print messages[uid],mbytes[uid],sbytes[uid],rbytes[uid],succ[uid] + fail[uid],succ[uid] + fail[uid] + temp[uid],str,uid
    }
  }
'