From: wessels <> Date: Thu, 24 Oct 1996 12:11:56 +0000 (+0000) Subject: fix process RSS for SGI X-Git-Tag: SQUID_3_0_PRE1~5606 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2aea66ad6d18f02ae3e56eca799dfd37c8bcdca5;p=thirdparty%2Fsquid.git fix process RSS for SGI --- diff --git a/src/stat.cc b/src/stat.cc index b4df2d01ce..51510babac 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.90 1996/10/18 20:36:25 wessels Exp $ + * $Id: stat.cc,v 1.91 1996/10/24 06:11:57 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -769,8 +769,13 @@ info_get(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)); +#ifdef _SQUID_SGI_ storeAppendPrintf(sentry, "{\tProcess Size: rss %ld KB}\n", - rusage.ru_maxrss * getpagesize() >> 10); + rusage.ru_maxrss); +#else /* _SQUID_SGI_ */ + storeAppendPrintf(sentry, "{\tProcess Size: rss %ld KB}\n", + (rusage.ru_maxrss * getpagesize()) >> 10); +#endif /* _SQUID_SGI_ */ 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 d91174b3ad..09ffe17c73 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.76 1996/10/22 03:36:32 wessels Exp $ + * $Id: tools.cc,v 1.77 1996/10/24 06:11:56 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -210,11 +210,15 @@ 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); +#ifdef _SQUID_SGI_ + fprintf(lf, "Memory Usage: rss %ld KB\n", rusage.ru_maxrss); +#else fprintf(lf, "Memory Usage: rss %ld KB\n", - rusage.ru_maxrss * getpagesize() >> 10); + (rusage.ru_maxrss * getpagesize()) >> 10); +#endif /* _SQUID_SGI_ */ fprintf(lf, "Page faults with physical i/o: %ld\n", rusage.ru_majflt); -#endif +#endif /* HAVE_GETRUSAGE */ dumpMallocStats(lf); if (f) f();