stime.awk revision 272461
1174199Srwatson$6 !~ /^ack/ && $5 !~ /[SFR]/ { 2174199Srwatson # given a tcpdump ftp trace, output one line for each send 3174199Srwatson # in the form 4174199Srwatson # <send time> <seq no> 5174199Srwatson # where <send time> is the time packet was sent (in seconds with 6174199Srwatson # zero at time of first packet) and <seq no> is the tcp sequence 7174199Srwatson # number of the packet divided by 1024 (i.e., Kbytes sent). 8174199Srwatson # 9174199Srwatson # convert time to seconds 10174199Srwatson n = split ($1,t,":") 11174199Srwatson tim = t[1]*3600 + t[2]*60 + t[3] 12174199Srwatson if (! tzero) { 13174199Srwatson tzero = tim 14174199Srwatson OFS = "\t" 15174199Srwatson } 16174199Srwatson # get packet sequence number 17174199Srwatson i = index($6,":") 18174199Srwatson printf "%7.2f\t%g\n", tim-tzero, substr($6,1,i-1)/1024 19174199Srwatson } 20174199Srwatson