]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Mon, 26 Jun 2000 09:36:05 +0000 (09:36 +0000)
committerwessels <>
Mon, 26 Jun 2000 09:36:05 +0000 (09:36 +0000)
 - Added store swapin and swapout counters.
 - Changed the location of 'swap_files_cleaned' in StatCounters structure.

src/fs/aufs/store_dir_aufs.cc
src/fs/diskd/store_dir_diskd.cc
src/fs/ufs/store_dir_ufs.cc
src/stat.cc
src/store_swapin.cc
src/store_swapout.cc
src/structs.h

index dd96090c9dde8a6c18eb0d399e34299b6c9bb9d7..70e8bf3d6265d32ea5130d70518605b9149627ab 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_aufs.cc,v 1.4 2000/06/08 18:05:37 hno Exp $
+ * $Id: store_dir_aufs.cc,v 1.5 2000/06/26 03:36:13 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1177,7 +1177,7 @@ storeAufsDirClean(int swap_index)
 #else
        safeunlink(p2, 0);
 #endif
-       Counter.swap_files_cleaned++;
+       Counter.swap.files_cleaned++;
     }
     debug(36, 3) ("Cleaned %d unused files from %s\n", k, p1);
     return k;
index cd18992e235afd9020b710c606cef7cc1ad64e49..e4314ae6d63f3f24b3f56cc67566408acc623906 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_diskd.cc,v 1.12 2000/06/21 07:32:13 wessels Exp $
+ * $Id: store_dir_diskd.cc,v 1.13 2000/06/26 03:36:15 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1353,7 +1353,7 @@ storeDiskdDirClean(int swap_index)
 #else
        safeunlink(p2, 0);
 #endif
-       Counter.swap_files_cleaned++;
+       Counter.swap.files_cleaned++;
     }
     debug(36, 3) ("Cleaned %d unused files from %s\n", k, p1);
     return k;
index df51ca615efa175b70c1bb2b90021e13b0cf6c3c..afa340419c334d1584d0fe2d592fc082b35e3f7f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.5 2000/06/08 18:05:39 hno Exp $
+ * $Id: store_dir_ufs.cc,v 1.6 2000/06/26 03:36:15 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1177,7 +1177,7 @@ storeUfsDirClean(int swap_index)
 #else
        safeunlink(p2, 0);
 #endif
-       Counter.swap_files_cleaned++;
+       Counter.swap.files_cleaned++;
     }
     debug(36, 3) ("Cleaned %d unused files from %s\n", k, p1);
     return k;
index 34ce9e0c996469cd8e5718285716f934b9ca7cc4..66718f4db3d64645765f3d97070dfd490b467109 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.329 2000/06/26 01:38:37 wessels Exp $
+ * $Id: stat.cc,v 1.330 2000/06/26 03:36:05 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -779,8 +779,12 @@ statAvgDump(StoreEntry * sentry, int minutes, int hours)
        : 0.0);
     x = statHistDeltaMedian(&l->select_fds_hist, &f->select_fds_hist);
     storeAppendPrintf(sentry, "median_select_fds = %f\n", x);
-    storeAppendPrintf(sentry, "swap_files_cleaned = %f/sec\n",
-       XAVG(swap_files_cleaned));
+    storeAppendPrintf(sentry, "swap.outs = %f/sec\n",
+       XAVG(swap.outs));
+    storeAppendPrintf(sentry, "swap.ins = %f/sec\n",
+       XAVG(swap.ins));
+    storeAppendPrintf(sentry, "swap.files_cleaned = %f/sec\n",
+       XAVG(swap.files_cleaned));
     storeAppendPrintf(sentry, "aborted_requests = %f/sec\n",
        XAVG(aborted_requests));
 
@@ -1156,8 +1160,12 @@ statCountersDump(StoreEntry * sentry)
        f->cputime);
     storeAppendPrintf(sentry, "wall_time = %f\n",
        tvSubDsec(f->timestamp, current_time));
-    storeAppendPrintf(sentry, "swap_files_cleaned = %d\n",
-       f->swap_files_cleaned);
+    storeAppendPrintf(sentry, "swap.outs = %d\n",
+       f->swap.outs);
+    storeAppendPrintf(sentry, "swap.ins = %d\n",
+       f->swap.ins);
+    storeAppendPrintf(sentry, "swap.files_cleaned = %d\n",
+       f->swap.files_cleaned);
     storeAppendPrintf(sentry, "aborted_requests = %d\n",
        f->aborted_requests);
 }
index 4a5817f0a2a390a92f28e4d454325619393acb27..1e7f6c30046244115ae4f4ef78464e6bc140a033 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapin.cc,v 1.24 2000/05/12 00:29:09 wessels Exp $
+ * $Id: store_swapin.cc,v 1.25 2000/06/26 03:36:05 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapin Functions
  * AUTHOR: Duane Wessels
@@ -80,6 +80,7 @@ storeSwapInFileClosed(void *data, int errflag, storeIOState * sio)
        sc->callback = NULL;
        callback(sc->callback_data, sc->copy_buf, errflag);
     }
+    Counter.swap.ins++;
 }
 
 static void
index 19d6cbf5c51e7c52cef3bd4d85b897bcf9b453f4..697f00b7beda822ff6a52d050961d4a856cd9690 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.cc,v 1.71 2000/06/25 22:28:43 wessels Exp $
+ * $Id: store_swapout.cc,v 1.72 2000/06/26 03:36:06 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -303,6 +303,7 @@ storeSwapOutFileClosed(void *data, int errflag, storeIOState * sio)
            storeLog(STORE_LOG_SWAPOUT, e);
            storeDirSwapLog(e, SWAP_LOG_ADD);
        }
+       Counter.swap.outs++;
     }
     debug(20, 3) ("storeSwapOutFileClosed: %s:%d\n", __FILE__, __LINE__);
     mem->swapout.sio = NULL;
index 09ee833f1952e659bae9e4567f5317c00584faa3..04ef188eb9d74629f4a26b805d3bc59e55beeebc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.342 2000/06/26 01:38:38 wessels Exp $
+ * $Id: structs.h,v 1.343 2000/06/26 03:36:06 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -1676,8 +1676,12 @@ struct _StatCounters {
        int selects;
 #endif
     } syscalls;
-    int swap_files_cleaned;
     int aborted_requests;
+    struct {
+       int files_cleaned;
+       int outs;
+       int ins;
+    } swap;
 };
 
 /* per header statistics */