Facebook
From Mi, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 198
  1. BEGIN{
  2.         start = 0
  3.         okres = 0.1
  4.         ile_bajtow = 0
  5.         print start, 0
  6. }
  7. {
  8.         if(($1 == "r") && ($4 == 1) && ($5 == "tcp")) {
  9.                 ile_bajtow = ile_bajtow +$6
  10.                 }
  11.         if(($2 - start)>okres){
  12.                 print $2, ile_bajtow*8/($2 - start)
  13.                 ile_bajtow = 0
  14.                 start = $2
  15.                 }
  16. }
  17. END{
  18. }