Hello,
I am trying to find out the average response time per minute from a log file that contains the response time in milliseconds. I would like to pipe the results into Awk and end up with the summary. I am looking for the most effective way to do it. The desired result is one line per minute that aggregates the results and provides the average. This is what I have so far to get the data from the application logs but still missing the last piece.
my data looks like this.
APP01 2016-02-16 00:00:05 85
APP01 2016-02-16 00:00:19 101
APP01 2016-02-16 00:00:37 147
APP01 2016-02-16 00:00:40 140
APP01 2016-02-16 00:00:54 161
APP01 2016-02-16 00:00:58 93
APP01 2016-02-16 00:00:59 19
APP01 2016-02-16 00:01:04 77
APP01 2016-02-16 00:01:08 83
APP01 2016-02-16 00:01:09 102
APP01 2016-02-16 00:01:11 91
APP01 2016-02-16 00:01:29 79
APP01 2016-02-16 00:01:29 133
APP01 2016-02-16 00:01:36 198
APP01 2016-02-16 00:01:40 135
APP01 2016-02-16 00:01:41 125
APP01 2016-02-16 00:01:48 105
APP01 2016-02-16 00:01:50 76
APP01 2016-02-16 00:01:55 196
APP01 2016-02-16 00:02:14 65
APP01 2016-02-16 00:02:36 87
APP01 2016-02-16 00:02:40 103
APP01 2016-02-16 00:02:50 159
APP01 2016-02-16 00:02:50 32
APP01 2016-02-16 00:02:56 135
APP01 2016-02-16 00:03:05 73
APP01 2016-02-16 00:03:09 133
APP01 2016-02-16 00:03:11 105
APP01 2016-02-16 00:03:15 84
APP01 2016-02-16 00:03:15 155
APP01 2016-02-16 00:03:18 111
APP01 2016-02-16 00:03:30 145
APP01 2016-02-16 00:03:43 231
APP01 2016-02-16 00:03:57 132
APP01 2016-02-16 00:03:59 73
I am trying to find out the average response time per minute from a log file that contains the response time in milliseconds. I would like to pipe the results into Awk and end up with the summary. I am looking for the most effective way to do it. The desired result is one line per minute that aggregates the results and provides the average. This is what I have so far to get the data from the application logs but still missing the last piece.
Code:
grep ">> DisplayStream" %1 | gawk "{print $1,$2,$NF}" | sed -e "s/^/%2 /g" -e "s/,[0-9][0-9][0-9]//g" >> results\%2.%3.log
my data looks like this.
APP01 2016-02-16 00:00:05 85
APP01 2016-02-16 00:00:19 101
APP01 2016-02-16 00:00:37 147
APP01 2016-02-16 00:00:40 140
APP01 2016-02-16 00:00:54 161
APP01 2016-02-16 00:00:58 93
APP01 2016-02-16 00:00:59 19
APP01 2016-02-16 00:01:04 77
APP01 2016-02-16 00:01:08 83
APP01 2016-02-16 00:01:09 102
APP01 2016-02-16 00:01:11 91
APP01 2016-02-16 00:01:29 79
APP01 2016-02-16 00:01:29 133
APP01 2016-02-16 00:01:36 198
APP01 2016-02-16 00:01:40 135
APP01 2016-02-16 00:01:41 125
APP01 2016-02-16 00:01:48 105
APP01 2016-02-16 00:01:50 76
APP01 2016-02-16 00:01:55 196
APP01 2016-02-16 00:02:14 65
APP01 2016-02-16 00:02:36 87
APP01 2016-02-16 00:02:40 103
APP01 2016-02-16 00:02:50 159
APP01 2016-02-16 00:02:50 32
APP01 2016-02-16 00:02:56 135
APP01 2016-02-16 00:03:05 73
APP01 2016-02-16 00:03:09 133
APP01 2016-02-16 00:03:11 105
APP01 2016-02-16 00:03:15 84
APP01 2016-02-16 00:03:15 155
APP01 2016-02-16 00:03:18 111
APP01 2016-02-16 00:03:30 145
APP01 2016-02-16 00:03:43 231
APP01 2016-02-16 00:03:57 132
APP01 2016-02-16 00:03:59 73