document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode wrap\">\n");
document.write("	<pre class=\"textmate-source\"><pre class=\"sunburst\">TOPFILES=100<span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span>TOPIPS=100<span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span>DATE=<span class=\'string string_interpolated string_interpolated_backtick string_interpolated_backtick_shell\'>`date +%d.%b.%Y:%H`<\/span><span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span><span class=\'keyword keyword_control keyword_control_shell\'>for<\/span> i <span class=\'keyword keyword_control keyword_control_shell\'>in<\/span> <span class=\'string string_interpolated string_interpolated_backtick string_interpolated_backtick_shell\'>`lsof -p $(netstat \\<\/span>\n");
document.write("<span class=\"String\">-ltpn|awk \'$4 ~ /:80$/ {print substr($7,1,index($7,&quot;/&quot;)-1)}\')| awk \'$9 ~ \\<\/span>\n");
document.write("<span class=\"String\">/access.log$/ {print $9| &quot;sort -u&quot;}\'`<\/span> <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>do<\/span> echo <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;-------&quot;<\/span><span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$i<\/span><span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;------&quot;<\/span><span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$DATE<\/span><span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> awk \\\n");
document.write("<span class=\'string string_quoted string_quoted_single string_quoted_single_shell\'>\'$4 ~ /^.\'<\/span><span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$DATE<\/span><span class=\'string string_quoted string_quoted_single string_quoted_single_shell\'>\'/ {day=substr($4,2,2);hour=substr($4,14,2);sixth= \\<\/span>\n");
document.write("<span class=\"String\">substr($4,17,1); hit[day&quot;\\t&quot;hour&quot;.&quot;sixth&quot;0 - &quot;hour&quot;.&quot;sixth&quot;9&quot;]++;ip[$1]++; \\<\/span>\n");
document.write("<span class=\"String\">bytes[day&quot;\\t&quot;hour&quot;.&quot;sixth&quot;0 - &quot;hour&quot;.&quot;sixth&quot;9&quot;]+=$10; flds=split($7, req, \\<\/span>\n");
document.write("<span class=\"String\">/\\//);toss=split(req[flds],fn,/\\?/);files[fn[1]]++ } END { for (i in hit) { \\<\/span>\n");
document.write("<span class=\"String\">print hit[i]&quot;\\t&quot;i&quot;\\t&quot;sprintf(&quot;%2.2d&quot;,bytes[i]/1024)&quot;K&quot;|&quot;sort -k 3,3n&quot;}; print \\<\/span>\n");
document.write("<span class=\"String\">&quot;&quot;;for (i in ip) { if(ip[i] &gt; \'<\/span><span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$TOPIPS<\/span><span class=\'string string_quoted string_quoted_single string_quoted_single_shell\'>\') { print ip[i]&quot;\\t&quot;i|&quot;sort -n;echo \\<\/span>\n");
document.write("<span class=\"String\">\\&quot;\\&quot;&quot;}}; for (i in files) { if(files[i] &gt; \'<\/span><span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$TOPFILES<\/span><span class=\'string string_quoted string_quoted_single string_quoted_single_shell\'>\') {print files[i], i| \\<\/span>\n");
document.write("<span class=\"String\">&quot;sort -k 1,1n;echo \\&quot;\\&quot;&quot;}} }\'<\/span> <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$i<\/span><span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span><span class=\'keyword keyword_control keyword_control_shell\'>done<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/680723.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/680723\">Pastie #680723<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

