top for pyramid
Jim Knutson
knutson at SW.MCC.COM
Wed Dec 21 02:23:25 AEST 1988
Someone asked (back in September) if there was a top working for OSx4.x.
I don't know if anyone answered or not as I'm not on the list.
I have one that works fairly well. The following is a diff of the
changes needed. Unfortunately, this one doesn't figure utilization of
all CPUs, just the first.
Sorry this took so long to get out.
*** top.c.old Wed Jun 3 10:11:50 1987
--- top.c Wed Jun 3 10:19:02 1987
***************
*** 63,69 ****
--- 63,73 ----
#define X_AVENRUN 0
{ "_ccpu" },
#define X_CCPU 1
+ #ifdef pyr
+ { "_percpu" },
+ #else
{ "_cp_time" },
+ #endif
#define X_CP_TIME 2
{ "_hz" },
#define X_HZ 3
***************
*** 329,335 ****
--- 333,343 ----
mpid_offset = nlst[X_MPID].n_value;
avenrun_offset = nlst[X_AVENRUN].n_value;
+ #ifdef pyr
+ cp_time_offset = nlst[X_CP_TIME].n_value + 4*sizeof(int) + 2*sizeof(char *);
+ #else
cp_time_offset = nlst[X_CP_TIME].n_value;
+ #endif
total_offset = nlst[X_TOTAL].n_value;
/* this is used in calculating WCPU -- calculate it ahead of time */
***************
*** 1254,1257 ****
}
return(ptr);
}
-
--- 1262,1264 ----
Jim Knutson
knutson at mcc.com
cs.utexas.edu!milano!knutson
More information about the Comp.sys.pyramid
mailing list