From: wessels <> Date: Tue, 22 Sep 1998 23:50:33 +0000 (+0000) Subject: added counters for cleaned store files and unlinked files X-Git-Tag: SQUID_3_0_PRE1~2674 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64b54eed746ee1d02200820354ef2ef55492a291;p=thirdparty%2Fsquid.git added counters for cleaned store files and unlinked files --- diff --git a/src/structs.h b/src/structs.h index 0a1eafab77..68eb89f808 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,7 +1,7 @@ /* - * $Id: structs.h,v 1.231 1998/09/19 17:06:17 wessels Exp $ + * $Id: structs.h,v 1.232 1998/09/22 17:50:33 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1452,6 +1452,7 @@ struct _StatCounters { int reads; int writes; int seeks; + int unlinks; } disk; struct { int accepts; @@ -1470,6 +1471,7 @@ struct _StatCounters { int selects; #endif } syscalls; + int store_files_cleaned; }; /* per header statistics */ diff --git a/src/tools.cc b/src/tools.cc index 647655fabf..96e9719982 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.167 1998/08/24 22:06:49 wessels Exp $ + * $Id: tools.cc,v 1.168 1998/09/22 17:50:33 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -439,6 +439,7 @@ safeunlink(const char *s, int quiet) quiet ? NULL : safeunlinkComplete, quiet ? NULL : xstrdup(s)); #else + Counter.syscalls.disk.unlinks++; if (unlink(s) < 0 && !quiet) debug(50, 1) ("safeunlink: Couldn't delete %s: %s\n", s, xstrerror()); #endif