]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CacheMgr: display 'client_db off' instead of 0 clients accessing cache
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 8 May 2015 07:13:35 +0000 (00:13 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 8 May 2015 07:13:35 +0000 (00:13 -0700)
... to clarify why there is no record of even the mgr request happening.
The cleint_db mechanism needs to be enabled and measuring traffci for
any useful client counter value to exist.

src/stat.cc

index 0b57d16af550d6e4ebe2dc47d62dbd5d6aed9117..0ea6bc28d239a2ff19c3efaa6955693bb61b0b86 100644 (file)
@@ -621,8 +621,10 @@ DumpInfo(Mgr::InfoActionData& stats, StoreEntry* sentry)
 
     storeAppendPrintf(sentry, "Connection information for %s:\n",APP_SHORTNAME);
 
-    storeAppendPrintf(sentry, "\tNumber of clients accessing cache:\t%.0f\n",
-                      stats.client_http_clients);
+    if (Config.onoff.client_db)
+        storeAppendPrintf(sentry, "\tNumber of clients accessing cache:\t%.0f\n", stats.client_http_clients);
+    else
+        sentry->append("\tNumber of clients accessing cache:\t(client_db off)\n", 52);
 
     storeAppendPrintf(sentry, "\tNumber of HTTP requests received:\t%.0f\n",
                       stats.client_http_requests);