#!/bin/sh

#!/bin/sh


help="
. http://www.ras.ru
WWW .
      www__root/logs

      -who
      -what
      -clear "
YEAR=`date +%y`
MONTH=${MONTH:-`date +%h`} MAX_URLS=400
FILE_PROTOKOLOW="access_log `ls httpd-log.???2[89]$YEAR httpd-log.???3[01]$YEAR`" FILE_PROTOKOLOW_M="`ls httpd-log.${MONTH}??${YEAR}`"
help(){echo "$help"}
otsekaem_domashnie_zaprosy() { #### echo " " *.ac.msk.su *.systud.msk.su jupp[12].gmd.de *.maths.ox.ac.uk
cat $FILE_PROTOKOLOW $FILE_PROTOKOLOW_M |\
      egrep -v '^[a-z_0-9]*[.]ac[.]msk[.]su|^193.232.17[23]|^193.124.14[89]' |\
      egrep -v '^jupp[12].gmd.de|poligate[.]gmd[.]de|rbrf[.]msk[.]su' |\
      egrep -v 'guru[.]inm[.]ras[.]ru| ips[.]ras[.]ru|shade[.]msu[.]ru' |\
      egrep -v '[.]mian[.]su|mcalcin|ipsun[.]ras[.]ru|polimos[.]ras[.]ru' }
naibolee_potreblqemye_fajly() { sed -e 's/^.* "*GET //' | sed -e 's/^.* HEAD //' | sed -e 's/ HTTP[/]1.0.*$//' | sort | uniq -c | sort -n | tail -${MAX_URLS}l }
kto_nas_bolxshe_wseh_smotrit() { sed -e 's/ .*//' | sort | uniq -c | sort -n }
case "$1" in "") otsekaem_domashnie_zaprosy ;; -what) echo mosaice ; otsekaem_domashnie_zaprosy | naibolee_potreblqemye_fajly ;; -who) echo ; otsekaem_domashnie_zaprosy | kto_nas_bolxshe_wseh_smotrit ;; -clear) otsekaem_domashnie_zaprosy ;; *) help ;; esac



Home | UK Shop Center |Contact | Buy Domain | Directory | Web Hosting | Resell Domains


Copyleft 2005 ruslib.us