From: wessels <> Date: Tue, 14 Jan 1997 05:58:03 +0000 (+0000) Subject: fix ru.ru_maxrss in various ways X-Git-Tag: SQUID_3_0_PRE1~5212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fe4a4e1d88f097f1cfee23610fbed97b8fa1931;p=thirdparty%2Fsquid.git fix ru.ru_maxrss in various ways --- diff --git a/src/stat.cc b/src/stat.cc index 994e41dee2..0725dd3771 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -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 diff --git a/src/tools.cc b/src/tools.cc index 986fe53e1e..acd9eb4e9d 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -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",