{"id":489,"date":"2004-08-21T01:10:48","date_gmt":"2004-08-20T23:10:48","guid":{"rendered":"http:\/\/vasil.ludost.net\/blog\/?p=489"},"modified":"2004-08-21T01:10:48","modified_gmt":"2004-08-20T23:10:48","slug":"2004-08-21-0110","status":"publish","type":"post","link":"https:\/\/vasil.ludost.net\/blog\/?p=489","title":{"rendered":"2004-08-21 01:10"},"content":{"rendered":"<p>It was a lot of walking, but in the end I got the documents for a personal doctor, at Monday I&#8217;mm bring them where I should (If haven&#8217;t died by then). Looks like I&#8217;m getting better, I wrote a small shell script today, something like a rudimentary apache log analyzer, with a specific task &#8211; to say how much traffic did some directories generate. There are a few problems that need fixing (to clean up the referrers, before the main grep), but I&#8217;ll do that after understanding something in regex&#8230;. Here&#8217;s the script:<\/p>\n<pre>\r\n#!\/bin\/sh\r\n(\r\nfor i in Anime\/* upload\/*\/* Manga\/* AMV\/*  ;  do \r\n        nm=`echo $i|sed 's\/ \/%20\/g; s\/\\[\/%5b\/g;s\/\\]\/%5d\/g'` ;\r\n        mb=`( \\\r\n\techo -n '(';grep -iw \"$nm\" \/var\/log\/apache\/chise.ludost.net.log \/var\/log\/apache\/chise.ludost.net.log.1 |\\ \r\n\tgrep GET |sed 's\/\"GET .* HTTP\\\/1.[01]\" \/asd\/g'|grep -v asd304 |awk '{print $7}' |tr '\\n' '+'| \\ \r\n\tsed 's\/\\+$\/\/g'; echo ')\/(1024*1024)' \\\r\n\t) |bc 2>\/dev\/null`\r\n\r\n        if [ -z \"$mb\" ]; then mb=0; fi\r\n        echo -e \"$mb\\t$i\" \r\ndone\r\n)| sort -rn\r\n<\/pre>\n<p>The result can be seen <a href=\"http:\/\/chise.ludost.net\/stat.txt\">here<\/a>.<\/p>\n<p>I still haven&#8217;t halved Quicksilver, Bobson, could you bring me the book on the next IBB (I promise I&#8217;ll return it), because it&#8217;s not easy to read on these pages (I&#8217;ve reached around page 300)?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was a lot of walking, but in the end I got the documents for a personal doctor, at Monday I&#8217;mm bring them where I should (If haven&#8217;t died by then). Looks like I&#8217;m getting better, I wrote a small shell script today, something like a rudimentary apache log analyzer, with a specific task &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489"}],"version-history":[{"count":0,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions"}],"wp:attachment":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}