Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
awk '/(18|19|2.)\/Sep/ {
ts=substr($4,2,14);
if (ts != prevts) {
printf("\n%s ", ts);
prevts=ts;
};
if ($9 == 200) { printf("."); }
else if ($9 == 500) { printf("!"); }
else if ($9 == 404) { printf("?"); }
else if (substr($9,1,1) == "3") { printf(">"); }
else { printf(substr($9, 1,1)); }
}' access_log* | sort -k1 ; echo
18/Sep/2014:15 ................>>>>...>...>>>>>..>....>>>>>>>............>............>............>............>............>............>............
18/Sep/2014:16 >............>............>............>............>............>............>............>............>......>>>>>>......>>.....>.>>>......>>>....>..>>>>>>>............>............>............>............>............>............>......>>......>>......>>......>......>>......
18/Sep/2014:17 ......>......>.......................>............>......>............>.>................>......
19/Sep/2014:12 ......>......................?>......
19/Sep/2014:13 ..............................>>......
19/Sep/2014:15 >......>>>>>>......>>......>>......>
20/Sep/2014:10 ......>>>
21/Sep/2014:10 ......................................................................................>>>..........................................
21/Sep/2014:11 ....................................
21/Sep/2014:12 ......!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!..........!!!!!!!!!!!!!......!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!......!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.