Subversion Repositories wimsdev

Rev

Rev 23 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #! /bin/sh
  2.  
  3. tmpfile=$PWD/$session_dir/stat
  4. modstatfile=$PWD/../bin/modstat
  5. cd ../log/account
  6.  
  7. site_start=19980101
  8. site_end=`date '+%Y%m%d'`
  9.  
  10. if [ -z "$w_stat_module" ]; then w_stat_module=00access.act; fi
  11.  
  12. start=$w_date1
  13. end=$w_date2
  14. if [ "$start" -lt $site_start ]; then start=$site_start; fi
  15. if [ -z "$end" ]; then end=$site_end; fi
  16. if [ "$end" -gt $site_end ]; then end=$site_end; fi
  17.  
  18. access=`awk 'BEGIN {a=0;b=0;c=0}; $1>='$start' && $1 <='$end'{a=a+$2;b=b+$3;c=c+$4}; END {print a" "b" "c}' $w_stat_module`
  19.  
  20. echo $access
  21.  
  22. if [ "$w_modules" != "yes" ]; then exit; fi
  23.  
  24. rm -f $tmpfile.mod >/dev/null
  25. ll=`ls [EHLUct]* | grep -v 'classes@' | sed 's/\...$//g' | sort | uniq`
  26.  
  27. export ll start end
  28. $modstatfile >$tmpfile.mod
  29.  
  30. cat $tmpfile.mod | sort -nr 2>/dev/null | head -n $(($w_max_modules+5))
  31.  
  32. #rm $tmpfile.mod
  33.  
  34.