Hi!
We are an ISP in India. We wish to compute:
the fraction of bytes "Completely" transferred. (successful download)
the fraction of bytes "Partially" transferred (read timeout, user abort)
the fraction of bytes "Erroneously" transferred (file not found)
I append a portion of our perl script we use to process the logs.
Please let me know if I have made any mistakes.
Question/Doubts:
1. Why would a TCP_MISS result in 0 bytes being transferred?
Is this a valid case?
2. Does TCP_IMS_HIT results in a connection to the origin server?
3. Why would a TCP_CLIENT_REFRESH result in 0 bytes being transferred?
Is this a valid case?
4. When we get a ZERO_SIZED_OBJECT, does it mean we received the HTTP
header, but not the data, or does it mean we did not receive
either the header, or the data.
5. Does a TCP_IMS_MISS result in a connection to the origin server?
I think so. Not sure. Does it result in a re-download of the URL's
contents.
6. What should I take to be the value of average HTTP response header size?
7. Is there a simpler way I can use to find what requests resulter in a
connection to the wan transfer. And how bytes came in from the
origin server?
Thanks.
Dinesh
----
# process only cache non-hits (dangers: process errors only if required)
if ($squid_english_code eq "TCP_MISS") {
$cnb += $nb;
warn "ERROR: TCP_MISS should not have zero byte transfer" if ($nb == 0);
} elsif ($squid_english_code eq "ERR_CONNECT_FAIL") {
# BUGFIX:
next; # no wan xfer
} elsif ($squid_english_code eq "ERR_READ_ERROR") {
$enb += $nb; # BUG: remove http error message code
} elsif ($squid_english_code eq "TCP_IMS_HIT") {
next; # ignoring this = i DO NOT KNOW HOW TO PROCESS
} elsif ($squid_english_code eq "TCP_REFRESH_HIT") {
$cnb += $http_header_nb; # ignoring this = i DO NOT KNOW HOW TO PROCESS
warn "ERROR: TCP_REFRESH_HIT should not have zero byte transfer" if ($http_header_nb == 0);
} elsif ($squid_english_code eq "ERR_CLIENT_ABORT") {
$pnb += $nb; # BUG? : does this include error message if any
} elsif ($squid_english_code eq "TCP_CLIENT_REFRESH") {
$cnb += $nb; # BUG? : does this include error message if any
warn "ERROR: TCP_CLIENT_REFRESH should not have zero byte transfer" if ($nb == 0);
} elsif ($squid_english_code eq "TCP_DENIED") {
# BUGFIX: error was included in nreqs, now not being included
next; # no wan connection
} elsif ($squid_english_code eq "TCP_REFRESH_MISS") {
$cnb += $nb; # wan connection - fresh object loaded from internet
warn "ERROR: TCP_REFRESH_MISS should not have zero byte transfer" if ($nb == 0);
} elsif ($squid_english_code eq "ERR_DNS_FAIL") {
# BUGFIX: error was included in nreqs, now not being included
next; # no wan connection - http-wise
} elsif ($squid_english_code eq "ERR_INVALID_URL") {
# BUGFIX: error was included in nreqs, now not being included
next; # no wan connection - http-wise
} elsif ($squid_english_code eq "TCP_REF_FAIL_HIT") {
# no response from the origin server, outbound http request sent,
# but no inbound http response
# NOTE: TODO: actually another measure of healthiness
next; # no response (i think) so returned stale object
} elsif ($squid_english_code eq "ERR_READ_TIMEOUT") {
$pnb += $nb; # this is a partial xfer
} elsif ($squid_english_code eq "ERR_ZERO_SIZE_OBJECT") {
# BUGFIX: error was included in nreqs, now not being included
next; # no byte came in via inbound link on the wan
} elsif ($squid_english_code eq "TCP_IMS_MISS") {
$cnb += $nb; # wan connection done - I AM NOT SURE ABOUT THIS
warn "ERROR: TCP_IMS_MSS should not have zero byte transfer" if ($nb == 0);
} else {
die "$tascii $squid_english_code [$_]";
# die "$tascii $squid_english_code [$_]" unless ($squid_english_code eq "TCP_MISS");
}
------
Received on Sun Jul 18 1999 - 22:03:52 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:27 MST