Skip to content

Instantly share code, notes, and snippets.

@unfo
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unfo/f3f8bb90af6281e6ee1e to your computer and use it in GitHub Desktop.
Save unfo/f3f8bb90af6281e6ee1e to your computer and use it in GitHub Desktop.
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