Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* procinfo AXP
       [not found] <33A10FD8.41C67EA6@iis.fhg.de>
@ 1997-06-13 12:31 ` Woodstock
  0 siblings, 0 replies; 4+ messages in thread
From: Woodstock @ 1997-06-13 12:31 UTC (permalink / raw)


Hey!  I just installed Redhat 4.2 on my UDB.  And I was kind of hoping
that they'd have fixed the broken procps package since 4.1. It appears
not. Is there some place that I can find a package that gives me some
_real_ results with procinfo rather than:

user  :      15:45:19.41  94.1%  page in :   258044  disk 1:  56040r 45183w
nice  :       0:00:00.00   0.0%  page out:   213797
system:       2:48:31.89  16.8%  swap in :     9756
idle  :   6d  8:54:48.19 913.2%  swap out:     1751
uptime:      16:44:45.09         context :   579355   

Out of everything, I believe only the uptime is correct. I compiled the
GIMP overnight on it, but it didn't take 15.75 hours to do it!  And the
idle time is just an outright lie! :)

Thanks.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

owEBhQB6/4kAdQMFADOY711p6jxcKfx94QEBCM0C/1SR9+g91qTi9o42V6AYOh49
IsVnSN4K37BRszn2zeaHXaq0z136ShMzAEp6ZPFUFHKH6AQbjJjaCmKfjVTZLfV0
NV6XfPn1Tiu1EyXQKvJaWr3czjqexR0jkfU81haeFawLYgV3b29keQAAAAA=
=EUPA
-----END PGP SIGNATURE-----

woody@beer.com	 http://homepages.udayton.edu/~balintrc   - Woody
balint@udayton.edu                                    SysAdmin of WoodyNet!

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: procinfo AXP
       [not found] <Pine.LNX.3.95.970613082848.16924A-100000@balintrc.ppp.udayton.edu>
@ 1997-06-13 15:28 ` Thomas Bogendoerfer
  1997-06-13 16:19   ` Woodstock
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Bogendoerfer @ 1997-06-13 15:28 UTC (permalink / raw)


> Out of everything, I believe only the uptime is correct. I compiled the
> GIMP overnight on it, but it didn't take 15.75 hours to do it!  And the
> idle time is just an outright lie! :)

try the patch below, it's against procinfo-0.11. I've already sent this
patch to the author of procinfo, and will probably show up in the next
release.

Thomas.

diff -ru orig/procinfo-0.11/procinfo.c procinfo-0.11/procinfo.c
--- orig/procinfo-0.11/procinfo.c	Wed May 28 14:21:50 1997
+++ procinfo-0.11/procinfo.c	Thu May 29 23:10:17 1997
@@ -94,7 +94,7 @@
     fclose (uptimefp); uptimefp = myfopen (PROC_DIR "uptime");
 #endif
     fgets (line, sizeof (line), uptimefp);
-    new.uptime = (long) (atof (strtok (line, " ")) * 100.0);
+    new.uptime = (long) (atof (strtok (line, " ")) * HZ);
 
 /*=== /proc/meminfo ===*/
 
@@ -264,13 +264,16 @@
 
     elapsed = new.uptime;
 
+#ifndef __alpha__
     if (irq_array) {
 	if (fs && old.uptime)
 	    elapsed = DIFF (intr[0]);
-    } else {
+    } else 
+#endif
+    {
 	if (fs && old.uptime)
 	   /* This won't be exact... */
-	    elapsed = 100 * sl;
+	    elapsed = DIFF (uptime);
     }
 
     printf ("user  : %s %s",
diff -ru orig/procinfo-0.11/routines.c procinfo-0.11/routines.c
--- orig/procinfo-0.11/routines.c	Wed May 28 14:21:53 1997
+++ procinfo-0.11/routines.c	Thu May 29 23:14:53 1997
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <termios.h>
 #include <termcap.h>
+#include <sys/param.h.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
@@ -57,6 +58,7 @@
     int d, h, m, s;
     static char buf[22];
 
+    t = t * 100 / HZ;
     d = (int) (t / 8640000);
     t = t - (long) (d * 8640000);
     h = (int) (t / 360000);

-- 
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
                   [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: procinfo AXP
  1997-06-13 15:28 ` procinfo AXP Thomas Bogendoerfer
@ 1997-06-13 16:19   ` Woodstock
  0 siblings, 0 replies; 4+ messages in thread
From: Woodstock @ 1997-06-13 16:19 UTC (permalink / raw)


On Fri, 13 Jun 1997, Thomas Bogendoerfer wrote:

> > Out of everything, I believe only the uptime is correct. I compiled the
> > GIMP overnight on it, but it didn't take 15.75 hours to do it!  And the
> > idle time is just an outright lie! :)
> 
> try the patch below, it's against procinfo-0.11. I've already sent this
> patch to the author of procinfo, and will probably show up in the next
> release.

Thanks for the patches!  Worked great... other than manually patching the
second patch in procinfo.c and adding <sys/param.h> to it. (I got
undefined references to HZ)  

Also, your patch for routines.c says:
+#include <sys/param.h.h>

it should be:
+#include <sys/param.h>

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

owEBhQB6/4kAdQMFADOY711p6jxcKfx94QEBCM0C/1SR9+g91qTi9o42V6AYOh49
IsVnSN4K37BRszn2zeaHXaq0z136ShMzAEp6ZPFUFHKH6AQbjJjaCmKfjVTZLfV0
NV6XfPn1Tiu1EyXQKvJaWr3czjqexR0jkfU81haeFawLYgV3b29keQAAAAA=
=EUPA
-----END PGP SIGNATURE-----

woody@beer.com	 http://homepages.udayton.edu/~balintrc   - Woody
balint@udayton.edu                                    SysAdmin of WoodyNet!

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: procinfo AXP
       [not found] <Pine.LNX.3.95.970613121731.17685A-100000@balintrc.ppp.udayton.edu>
@ 1997-06-13 22:21 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 1997-06-13 22:21 UTC (permalink / raw)


> Thanks for the patches!  Worked great... other than manually patching the
> second patch in procinfo.c and adding <sys/param.h> to it. (I got
> undefined references to HZ)  

uups, next time I will make a new diff instead of editing a diff file. My
first patch included <time.h> to get HZ, but on Linux/Intel you must include 
sys/param.h (which also works for Linux/Alpha).

Thomas.

-- 
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
                   [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-06-13 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.95.970613082848.16924A-100000@balintrc.ppp.udayton.edu>
1997-06-13 15:28 ` procinfo AXP Thomas Bogendoerfer
1997-06-13 16:19   ` Woodstock
     [not found] <Pine.LNX.3.95.970613121731.17685A-100000@balintrc.ppp.udayton.edu>
1997-06-13 22:21 ` Thomas Bogendoerfer
     [not found] <33A10FD8.41C67EA6@iis.fhg.de>
1997-06-13 12:31 ` Woodstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox