]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix ru.ru_maxrss in various ways
authorwessels <>
Tue, 14 Jan 1997 05:58:03 +0000 (05:58 +0000)
committerwessels <>
Tue, 14 Jan 1997 05:58:03 +0000 (05:58 +0000)
src/stat.cc
src/tools.cc

index 994e41dee239f930f2deb8d39ccc32439f33a180..0725dd377189a2b6a841d8ce8e70dfaab6cab602 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.115 1997/01/07 20:31:24 wessels Exp $
+ * $Id: stat.cc,v 1.116 1997/01/13 22:58:03 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -772,13 +772,13 @@ info_get(const cacheinfo * obj, StoreEntry * sentry)
     storeAppendPrintf(sentry, "{\tCPU Usage: %d%%}\n",
        percent(rusage.ru_utime.tv_sec + rusage.ru_stime.tv_sec,
            squid_curtime - squid_starttime));
-#if defined(_SQUID_SGI_) || defined(_SQUID_OSF_)
-    storeAppendPrintf(sentry, "{\tProcess Size: rss %ld KB}\n",
+#if defined(_SQUID_SGI_) || defined(_SQUID_OSF_) || defined(BSD4_4)
+    storeAppendPrintf(sentry, "{\tMaximum Resident Size: %ld KB}\n",
        rusage.ru_maxrss);
-#else /* _SQUID_SGI_ */
-    storeAppendPrintf(sentry, "{\tProcess Size: rss %ld KB}\n",
+#else
+    storeAppendPrintf(sentry, "{\tMaximum Resident Size: %ld KB}\n",
        (rusage.ru_maxrss * getpagesize()) >> 10);
-#endif /* _SQUID_SGI_ */
+#endif
     storeAppendPrintf(sentry, "{\tPage faults with physical i/o: %ld}\n",
        rusage.ru_majflt);
 #endif
index 986fe53e1e5caa10a0a1bd9fb35ebc3cd8ab72b4..acd9eb4e9de3cdeb0d701496ad93fa0bac51bd60 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.93 1997/01/07 20:31:25 wessels Exp $
+ * $Id: tools.cc,v 1.94 1997/01/13 22:58:04 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -212,10 +212,10 @@ PrintRusage(void (*f) (void), FILE * lf)
     getrusage(RUSAGE_SELF, &rusage);
     fprintf(lf, "CPU Usage: user %d sys %d\n",
        (int) rusage.ru_utime.tv_sec, (int) rusage.ru_stime.tv_sec);
-#if defined(_SQUID_SGI_) || defined(_SQUID_OSF_)
-    fprintf(lf, "Memory Usage: rss %ld KB\n", rusage.ru_maxrss);
+#if defined(_SQUID_SGI_) || defined(_SQUID_OSF_) || defined(BSD4_4)
+    fprintf(lf, "Maximum Resident Size: %ld KB\n", rusage.ru_maxrss);
 #else /* _SQUID_SGI_ */
-    fprintf(lf, "Memory Usage: rss %ld KB\n",
+    fprintf(lf, "Maximum Resident Size: %ld KB\n",
        (rusage.ru_maxrss * getpagesize()) >> 10);
 #endif /* _SQUID_SGI_ */
     fprintf(lf, "Page faults with physical i/o: %ld\n",