{"id":986,"date":"2017-03-09T17:43:58","date_gmt":"2017-03-09T17:43:58","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=986"},"modified":"2017-03-10T14:12:49","modified_gmt":"2017-03-10T14:12:49","slug":"ghetto-simple-log-parser-testing-website-performance","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2017\/03\/09\/ghetto-simple-log-parser-testing-website-performance\/","title":{"rendered":"Ghetto but simple Log Parser for testing website performance"},"content":{"rendered":"<p>So&#8230; I got fedup with constantly writing my own stuff for basic things. I&#8217;m going to turn this into something more spectacular that accepts commandline input, and also, allows you to define which days, and months, ranges, and stuff like that.<\/p>\n<p>It&#8217;s a no-frills-ghetto log parser.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\n\r\necho &quot;Total HITS: MARCH&quot;\r\ngrep &quot;\/Mar\/2017&quot; \/var\/log\/httpd\/somewebsite.com-access_log | wc -l;\r\n\r\nfor i in 0{1..9} {10..24};\r\n\r\ndo echo &quot;      &gt; 9th March 2017, hits this $i hour&quot;;\r\ngrep &quot;09\/Mar\/2017:$i&quot; \/var\/log\/httpd\/somesite.com-access_log | wc -l;\r\n\r\n        # break down the minutes in a nested visual way thats AWsome\r\nfor j in 0{1..9} {10..60};\r\ndo echo &quot;                  &gt;&gt;hits at $i:$j&quot;;\r\ngrep &quot;09\/Mar\/2017:$i:$j&quot; \/var\/log\/httpd\/somesite.com-access_log | wc -l;\r\ndone\r\n\r\ndone\r\n<\/pre>\n<p>It&#8217;s not perfect, it&#8217;s just a proof of concept, really.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So&#8230; I got fedup with constantly writing my own stuff for basic things. I&#8217;m going to turn this into something more spectacular that accepts commandline input, and also, allows you to define which days, and months, ranges, and stuff like &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2017\/03\/09\/ghetto-simple-log-parser-testing-website-performance\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,74,7,61,75,82],"tags":[],"class_list":["post-986","post","type-post","status-publish","format-standard","hentry","category-log-analysis","category-logging","category-management-tools","category-rackspace","category-rackspace-cdn-logs","category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":3,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":995,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/986\/revisions\/995"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}