]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix process RSS for SGI
authorwessels <>
Thu, 24 Oct 1996 12:11:56 +0000 (12:11 +0000)
committerwessels <>
Thu, 24 Oct 1996 12:11:56 +0000 (12:11 +0000)
src/stat.cc
src/tools.cc

index b4df2d01ce9957be921b3cc33a052f0d629d29b6..51510babac390065edd14a9308efdf99d77eeb8f 100644 (file)
@@ -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
index d91174b3ad7d327ecc1970c738cc8f357bdf8f60..09ffe17c73e820d57f4e3f7273c3116d011ae661 100644 (file)
@@ -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();