Patch for squid-stats 1.4

From: Hiroshi Naitoh <naitoh@dont-contact.us>
Date: Thu, 13 Mar 1997 19:51:52 +0900

I made a patch of squid-stats 1.4 (http://www.sbs.de/~iain/cache-stats/).

A change point as follows.

  1 UDP_HIT_OBJ is included in UDP hit %.
  2 TCP_IMS_HIT is included in TCP hit %.

  Meaning of UDP_HIT_OBJ and TCP_IMS_HIT:

        UDP_HIT_OBJ Same as UDP_HIT, but the object data was small
                        enoughto be sent in the UDP reply packet. Saves
                        thefollowing TCP request.

        TCP_IMS_HIT The client issued an If-Modified-Sincerequest
                                and the object was in the cacheand still
                                fresh.

A low value is calculated with squid-stats than a substantial hit rate,
because it isn't counted as a hit in case of these status.

I looked at Cache Server List of cachemgr and noticed this problem.

This patch will be made as follows.

        Patch < squid-stats.patch

---------------------- squid-stats.patch ----------------------
*** access-summary.pl.old Wed Mar 12 11:19:06 1997
--- access-summary.pl Wed Mar 12 11:19:45 1997
***************
*** 556,564 ****
          foreach $k (keys %{${$hashref}{COUNT}}) {
                  $v=${$hashref}{COUNT}{$k};
                  $TCP_count += $v if ($k =~ /^TCP_/);
! $THC += $v if ($k eq 'TCP_HIT');
                  $UDP_count += $v if ($k =~ /^UDP_/);
! $UHC += $v if ($k eq 'UDP_HIT');
          }
  
          foreach $k (keys %{${$hashref}{BYTES}}) {
--- 556,564 ----
          foreach $k (keys %{${$hashref}{COUNT}}) {
                  $v=${$hashref}{COUNT}{$k};
                  $TCP_count += $v if ($k =~ /^TCP_/);
! $THC += $v if ($k eq 'TCP_HIT' || $k eq 'TCP_IMS_HIT');
                  $UDP_count += $v if ($k =~ /^UDP_/);
! $UHC += $v if ($k eq 'UDP_HIT' || $k eq 'UDP_HIT_OBJ');
          }
  
          foreach $k (keys %{${$hashref}{BYTES}}) {
***************
*** 642,648 ****
          foreach $k (keys %{${$hashref}{COUNT}}) {
                  $v=${$hashref}{COUNT}{$k};
                  $TCP_count += $v if ($k =~ /^TCP_/);
! $THC += $v if ($k eq 'TCP_HIT');
                  $UDP_count += $v if ($k =~ /^UDP_/);
          }
  
--- 642,648 ----
          foreach $k (keys %{${$hashref}{COUNT}}) {
                  $v=${$hashref}{COUNT}{$k};
                  $TCP_count += $v if ($k =~ /^TCP_/);
! $THC += $v if ($k eq 'TCP_HIT' || $k eq 'TCP_IMS_HIT');
                  $UDP_count += $v if ($k =~ /^UDP_/);
          }
--------------------------------------------

If there were problems, inform me.

Thanks
-----
Hiroshi Naito, Assistant Professor, Osaka Institute of Technology
1-79-1, Kitayama, Hirakata-City, Osaka, 573-01, Japan
TEL: +81-720-66-5417 FAX: +81-720-66-8499, E-Mail: naitoh@is.oit.ac.jp
Received on Thu Mar 13 1997 - 02:57:37 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:41 MST