61.150.114.19 x - [09/Sep/2015:10:30:00 + 0800] "GET HTXP://wg43 HTTP/1.1" 206 4194767 "-" "MOBILE" 7194 21 x. 145.171.23 TCP_HIT NONE
219.1 x5.171.23 TCP_HIT NONE
60.161.186.12 x - [09/Sep/2015:10:30:00 + 0800] "GET HXTP://WGDCDN intid=HTTP/1.1 3859992-44" 200 20277911 "-" "-" 21122 219.1 x5.171.23 TCP_HIT NONE
Now need statistics on the number of records every five minutes, as the above two records, that is, when the 10:30 points have two such records, the log file is very big, write an instruction to statistics how many such records every five minutes (that is, the access requests)
Ps: I'm a train of thought is the number of minutes in every hour except at five, but also didn't want to know to write out
The segmentation method of time I wrote the split ($4, a,///:/) is a [4] hours, [5] is the number of minutes, a
Access number per minute statement: awk '{split ($4, a,///:/); B [[5]] + +} END {for (I) in b print I, b} [I] 'test6. TXT
Every five minutes I am really don't want to clear answer!
CodePudding user response:
Help ah,, someoneCodePudding user response:
Every minute, every five minutes is not very simple, in addition to the 5 minute field directlyCodePudding user response: