home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / cake / part09 / Script / ccs next >
Encoding:
Text File  |  1987-10-15  |  538 b   |  22 lines

  1. #! /bin/sh
  2. cat > /tmp/ccs$$ << END_PROG
  3.     {
  4.         if (NF == 10)
  5.         {
  6.             otried += \$7;
  7.             ofound += \$8;
  8.             stried += \$9;
  9.             sfound += \$10;
  10.         }
  11.     }
  12. END    {
  13.         printf "output cache accesses:  %8d\n", otried;
  14.         printf "output cache hits:      %8d\n", ofound;
  15.         printf "output cache hit ratio: %8.2f\n", (ofound*100)/otried;
  16.         printf "status cache accesses:  %8d\n", stried;
  17.         printf "status cache hits:      %8d\n", sfound;
  18.         printf "status cache hit ratio: %8.2f\n", (sfound*100)/stried;
  19.     }
  20. END_PROG
  21. awk -f /tmp/ccs$$ < /u/pgrad/zs/lib/cake_stats
  22.