]> 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>
Sat, 9 May 2015 11:43:14 +0000 (04:43 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 9 May 2015 11:43:14 +0000 (04:43 -0700)
... to clarify why there is no record of even the mgr request happening.
The client_db mechanism needs to be enabled and measuring traffic for
any useful client counter value to exist.

src/stat.cc

index 232c9b3d56ad325fcc702475ed2d50eecb592bf5..d56ffe5bc01ab12060d6cfbaad6c6d3e009abcdf 100644 (file)
@@ -620,8 +620,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);