[comp.sys.sequent] top 2.5 on dynix

gerry@cs.keele.ac.uk (Gerry Pratt) (05/16/89)

I use the version 2.5 from edu.rice with the Sequent patches
which were posted to this newsgroup a while back. This worked
fine but the "SIZE" field is always "12K" or less as in :-

14863 xxxxx     15    0    12K  164K sleep   0:02  0.00%  0.00% csh
8168  xxxxx     15    0    12K  156K sleep   0:03  0.00%  0.00% csh
12188 xxxxx     15    0    12K  156K sleep   0:02  0.00%  0.00% csh
9912  xxxxx     15    0    12K  152K sleep   0:04  0.00%  0.00% csh
11772 xxxxx     15    0    12K  144K sleep   0:02  0.00%  0.00% csh
14749 xxxxx     15    0    12K  144K sleep   0:01  0.00%  0.00% csh

anybody know why this is?

gerry pratt - workstation support - university of keele

email: gerry@uk.ac.keele.seq1

nagel@beaver.ics.uci.edu (Mark Nagel) (05/18/89)

In article <606@kl-cs.UUCP>, gerry@cs (Gerry Pratt) writes:
|I use the version 2.5 from edu.rice with the Sequent patches
|which were posted to this newsgroup a while back. This worked
|fine but the "SIZE" field is always "12K" or less as in :-

Yup --- this was a bug I fixed.  I suppose that I should release the
new patches.  They are only about 23K, so I'll just tack them on at
the end of this message and hope no one scalds me.  The current
(working) version is available as pub/top2.5-sequent.tar.Z on
ics.uci.edu (128.195.1.1).  The patches following should work against
the titan.rice.edu release 2.5 of top.  Please advise me of any
problems you encounter.  To use the shell archive following, unshar it
and apply top.sequent.pat to the top2.5 distribution.  Add all other
files to the distribution.

Mark Nagel @ UC Irvine, Department of Information and Computer Science
                            +----------------------------------------+
ARPA: nagel@ics.uci.edu     | If you improve something long enough   |
UUCP: ucbvax!ucivax!nagel   | eventually you will throw it away.     |

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Changes.sequent top.sequent.pat
# Wrapped by nagel@beaver.ics.uci.edu on Mon May 15 10:36:36 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Changes.sequent' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Changes.sequent'\"
else
echo shar: Extracting \"'Changes.sequent'\" \(826 characters\)
sed "s/^X//" >'Changes.sequent' <<'END_OF_FILE'
XChanges for Sequent Symmetry and Balance (preprocessor constant: sequent).
X
XThese changes were made at the University of California at Irvine for
Xboth the Sequent Symmetry and Balance multiprocessors.  They were made
Xin May 1989 to version 2.5 of top by Mark nagel <nagel@ics.uci.edu>.
X
XThe only display modification done was to add code to show how many CPU's
Xare installed (at the top of the screen, near the time).
X
XOther differences specific to the Sequent code (internally) include:
X
X	in the comparison code, we must call getu twice to get the u_tsize
X	entry out of the user structure (this seems to be in the proc
X	structure on other architectures).
X
X	the p_rssize field must be multiplied by CLSIZE.
X
X	other assorted changes.  used Sequent macros where possible so
X	the code will work on both the Balance and Symmetry.
END_OF_FILE
if test 826 -ne `wc -c <'Changes.sequent'`; then
    echo shar: \"'Changes.sequent'\" unpacked with wrong size!
fi
# end of 'Changes.sequent'
fi
if test -f 'top.sequent.pat' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'top.sequent.pat'\"
else
echo shar: Extracting \"'top.sequent.pat'\" \(19597 characters\)
sed "s/^X//" >'top.sequent.pat' <<'END_OF_FILE'
X*** top2.5.orig/Makefile	Thu May 11 23:14:47 1989
X--- top2.5.sequent/Makefile	Fri May 12 00:10:10 1989
X***************
X*** 14,25 ****
X  #	TROFF	- most appropriate troff command
X  
X  OWNER  = root
X! GROUP  = staff
X! MODE   = 755
X! BINDIR = /usr/local
X! MANDIR = /usr/man/manl
X  MAN    = man
X! TROFF  = troff
X  
X  # Values for the two defaults in "top":
X  #	TOPN	- default number of processes to display
X--- 14,25 ----
X  #	TROFF	- most appropriate troff command
X  
X  OWNER  = root
X! GROUP  = kmem
X! MODE   = 2755
X! BINDIR = /usr/public
X! MANDIR = /usr/man/manp
X  MAN    = man
X! TROFF  = ditroff
X  
X  # Values for the two defaults in "top":
X  #	TOPN	- default number of processes to display
X***************
X*** 36,42 ****
X  # This hash table must be big enough to hold every name in /etc/passwd.
X  # It is possible, but not necessary, to specify the hash table size in
X  # this Makefile.  Just uncomment the following line and provide a number.
X! #TABLE = -DTable_size=
X  
X  TARFILES = README Changes Changes.scs Makefile top.c commands.c display.c \
X  	   kernel.c screen.c utils.c getopt.c \
X--- 36,42 ----
X  # This hash table must be big enough to hold every name in /etc/passwd.
X  # It is possible, but not necessary, to specify the hash table size in
X  # this Makefile.  Just uncomment the following line and provide a number.
X! TABLE = -DTable_size=619
X  
X  TARFILES = README Changes Changes.scs Makefile top.c commands.c display.c \
X  	   kernel.c screen.c utils.c getopt.c \
X***************
X*** 47,55 ****
X  
X  LINTFLAGS = -x
X  
X! # Top uses the preprocessor variables "sun", "pyr" and "scs" for specific
X! # changes required by Suns, Pyramids and Symmetrics.  No changes to "CFLAGS"
X! # or "CDEFS" are required for these architectres.
X  
X  # To make a version for 4.1, # uncomment the following two lines:
X  #CDEFS = -DFOUR_ONE
X--- 47,56 ----
X  
X  LINTFLAGS = -x
X  
X! # Top uses the preprocessor variables "sun", "pyr", "sequent", and "scs"
X! # for specific changes required by Suns, Pyramids, Sequents, and
X! # Symmetrics.  No changes to "CFLAGS" or "CDEFS" are required for
X! # these architectures.
X  
X  # To make a version for 4.1, # uncomment the following two lines:
X  #CDEFS = -DFOUR_ONE
X***************
X*** 105,108 ****
X  
X  install: top top.1
X  	install -s -o $(OWNER) -m $(MODE) -g $(GROUP) top $(BINDIR)
X! 	install -c top.1 $(MANDIR)
X--- 106,109 ----
X  
X  install: top top.1
X  	install -s -o $(OWNER) -m $(MODE) -g $(GROUP) top $(BINDIR)
X! 	install -c top.1 $(MANDIR)/top.p
X
X*** top2.5.orig/display.c	Thu May 11 23:14:43 1989
X--- top2.5.sequent/display.c	Fri May 12 00:02:58 1989
X***************
X*** 29,34 ****
X--- 29,44 ----
X  #endif
X  #include <sys/proc.h>
X  #include <sys/dk.h>
X+ #ifdef sequent
X+ #include <sys/vm.h>
X+ #include <machine/vmparam.h>
X+ #include <machine/pte.h>
X+ #include <machine/hwparam.h>
X+ #ifndef imin
X+ #define imin(i,j)	((i) < (j) ? (i) : (j))
X+ #endif
X+ #endif
X+ 
X  #include "screen.h"		/* interface to screen package */
X  #include "layout.h"		/* defines for screen position layout */
X  #include "top.h"
X***************
X*** 52,58 ****
X--- 62,73 ----
X  
X  char *state_name[] =
X  {
X+ #ifdef sequent
X+     "", "sleeping", "ABANDONED", "ready", "starting", "zombie", "stopped",
X+ 	"running"
X+ #else
X      "", "sleeping", "ABANDONED", "running", "starting", "zombie", "stopped"
X+ #endif
X  };
X  
X  /* process state names for the "STATE" column of the display */
X***************
X*** 59,65 ****
X--- 74,84 ----
X  
X  char *state_abbrev[] =
X  {
X+ #ifdef sequent
X+     "", "sleep", "WAIT", "ready", "start", "zomb", "stop", "run"
X+ #else
X      "", "sleep", "WAIT", "run", "start", "zomb", "stop"
X+ #endif
X  };
X  
X  /* cpu state names for percentages */
X***************
X*** 75,81 ****
X  i_loadave(mpid, avenrun)
X  
X  int mpid;
X! #ifdef sun
X  long *avenrun;
X  #else
X  double *avenrun;
X--- 94,100 ----
X  i_loadave(mpid, avenrun)
X  
X  int mpid;
X! #if defined(sun) || defined(sequent)
X  long *avenrun;
X  #else
X  double *avenrun;
X***************
X*** 93,99 ****
X      {
X  	printf("%c %5.2f",
X  	    i == 0 ? ':' : ',',
X! #ifdef sun
X  	    (double)avenrun[i] / FSCALE);
X  #else
X  	    avenrun[i]);
X--- 112,118 ----
X      {
X  	printf("%c %5.2f",
X  	    i == 0 ? ':' : ',',
X! #if defined(sun) || defined(sequent)
X  	    (double)avenrun[i] / FSCALE);
X  #else
X  	    avenrun[i]);
X***************
X*** 105,111 ****
X  u_loadave(mpid, avenrun)
X  
X  int mpid;
X! #ifdef sun
X  long *avenrun;
X  #else
X  double *avenrun;
X--- 124,130 ----
X  u_loadave(mpid, avenrun)
X  
X  int mpid;
X! #if defined(sun) || defined(sequent)
X  long *avenrun;
X  #else
X  double *avenrun;
X***************
X*** 126,132 ****
X      {
X  	printf("%s%5.2f",
X  	    i == 0 ? "" : ", ",
X! #ifdef sun
X  	    (double)avenrun[i] / FSCALE);
X  #else
X  	    avenrun[i]);
X--- 145,151 ----
X      {
X  	printf("%s%5.2f",
X  	    i == 0 ? "" : ", ",
X! #if defined(sun) || defined(sequent)
X  	    (double)avenrun[i] / FSCALE);
X  #else
X  	    avenrun[i]);
X***************
X*** 136,142 ****
X--- 155,165 ----
X  
X  static int ltotal = 0;
X  static int llength = 0;
X+ #ifdef sequent
X+ static int lbrkdn[8];
X+ #else
X  static int lbrkdn[7];
X+ #endif
X  
X  i_procstates(total, brkdn)
X  
X***************
X*** 162,168 ****
X--- 185,195 ----
X      position = fileptr(stdout);
X  
X      /* write the breakdowns */
X+ #ifdef sequent
X+     for (i = 1; i < 8; i++)
X+ #else
X      for (i = 1; i < 7; i++)
X+ #endif
X      {
X  	if (brkdn[i] != 0)
X  	{
X***************
X*** 230,236 ****
X--- 257,267 ----
X      position = fileptr(stdout);
X  
X      /* write summary line */
X+ #ifdef sequent
X+     for (i = 1; i < 8; i++)
X+ #else
X      for (i = 1; i < 7; i++)
X+ #endif
X      {
X  	if (brkdn[i] != 0)
X  	{
X***************
X*** 483,489 ****
X      Move_to(0, y_header);
X  }
X  
X! #ifdef sun
X  #define percent_cpu(pp) ((double)(pp)->p_pctcpu / FSCALE)
X  #else
X  #define percent_cpu(pp) ((pp)->p_pctcpu)
X--- 514,520 ----
X      Move_to(0, y_header);
X  }
X  
X! #if defined(sun) || defined(sequent)
X  #define percent_cpu(pp) ((double)(pp)->p_pctcpu / FSCALE)
X  #else
X  #define percent_cpu(pp) ((pp)->p_pctcpu)
X***************
X*** 504,510 ****
X--- 535,545 ----
X  char	    *(*get_userid)();
X  
X  {
X+ #ifdef sequent
X+     register unsigned long cputime;
X+ #else
X      register long cputime;
X+ #endif
X      register double pctcpu;
X  
X      /* get the cpu usage and calculate the cpu percentages */
X***************
X*** 521,537 ****
X  #define Size      pp->p_tsize + pp->p_dsize + pp->p_cssize + pp->p_ussize
X  #define Resident  pp->p_rssize
X  
X! #else
X  #ifdef scs
X  	get_spt(pp->p_spti, &pspt);	/* scs also needs this */
X  #define Size      pspt.spt_usedpages
X  #define Resident  pspt.spt_mempages
X  
X  #else (everything else)
X  #define Size      pp->p_tsize + pp->p_dsize + pp->p_ssize
X  #define Resident  pp->p_rssize
X  #endif !scs
X- 
X  #endif !pyr
X  
X      sprintf(thisline, Proc_format,
X--- 556,577 ----
X  #define Size      pp->p_tsize + pp->p_dsize + pp->p_cssize + pp->p_ussize
X  #define Resident  pp->p_rssize
X  
X! #else !pyr
X  #ifdef scs
X  	get_spt(pp->p_spti, &pspt);	/* scs also needs this */
X  #define Size      pspt.spt_usedpages
X  #define Resident  pspt.spt_mempages
X  
X+ #else !scs
X+ #ifdef sequent
X+ #define Size	  pp->p_dsize + pp->p_ssize + u.u_tsize
X+ #define Resident  pp->p_rssize * CLSIZE
X+ 
X  #else (everything else)
X  #define Size      pp->p_tsize + pp->p_dsize + pp->p_ssize
X  #define Resident  pp->p_rssize
X+ #endif !sequent
X  #endif !scs
X  #endif !pyr
X  
X      sprintf(thisline, Proc_format,
X***************
X*** 916,922 ****
X--- 956,966 ----
X  struct proc *pp;
X  
X  {
X+ #ifdef sequent
X+     register unsigned int retval;
X+ #else
X      register int retval;
X+ #endif
X  
X  #ifdef scs
X      (void) strcpy(u.u_comm, pp->p_infoname);
X
X*** top2.5.orig/kernel.c	Thu May 11 23:14:49 1989
X--- top2.5.sequent/kernel.c	Tue May  2 09:48:31 1989
X***************
X*** 23,28 ****
X--- 23,31 ----
X  # include <sys/vm.h>	/* for struct spt */
X  #endif
X  #include <sys/proc.h>
X+ #ifdef sequent
X+ #include <machine/vmmac.h>
X+ #endif
X  
X  #include "top.local.h"
X  
X***************
X*** 107,114 ****
X--- 110,122 ----
X      /*
X       *  Process is currently in memory, we hope!
X       */
X+ #ifdef sequent
X+     if (!getkval((unsigned long)UAREAPTES(p), (int *)uptes, sizeof(uptes),
X+ 		"!p->p_addr"))
X+ #else
X      if (!getkval((unsigned long)p->p_addr, (int *)uptes, sizeof(uptes),
X  		"!p->p_addr"))
X+ #endif
X      {
X  	/* we can't seem to get to it, so pretend it's swapped out */
X  	return(-1);
X
X*** top2.5.orig/layout.h	Thu May 11 23:14:49 1989
X--- top2.5.sequent/layout.h	Tue May  2 09:48:31 1989
X***************
X*** 10,15 ****
X--- 10,19 ----
X  #define  y_lastpid	0
X  #define  x_loadave	33
X  #define  y_loadave	0
X+ #ifdef sequent
X+ #define  x_numcpus	55
X+ #define  y_numcpus	0
X+ #endif
X  #define  x_procstate	0
X  #define  y_procstate	1
X  #define  x_brkdn	15
X
X*** top2.5.orig/top.c	Thu May 11 23:14:41 1989
X--- top2.5.sequent/top.c	Fri May 12 00:11:49 1989
X***************
X*** 40,46 ****
X  #include <stdio.h>
X  #ifdef sunos4
X  #include <kvm.h>
X! #endif
X  #include <pwd.h>
X  #include <nlist.h>
X  #include <signal.h>
X--- 40,46 ----
X  #include <stdio.h>
X  #ifdef sunos4
X  #include <kvm.h>
X! #endif /* sunos4 */
X  #include <pwd.h>
X  #include <nlist.h>
X  #include <signal.h>
X***************
X*** 52,64 ****
X  #include <sys/user.h>
X  #ifdef scs
X  # define FLOAT		/* for pctcpu in proc.h */
X! #endif
X  #include <sys/proc.h>
X  #include <sys/dk.h>
X  #include <sys/vm.h>
X  #ifdef pyr		/* just for v4??? */
X  #include <sys/systm.h>
X! #endif
X  
X  /* includes specific to top */
X  #include "layout.h"
X--- 52,74 ----
X  #include <sys/user.h>
X  #ifdef scs
X  # define FLOAT		/* for pctcpu in proc.h */
X! #endif /* scs */
X  #include <sys/proc.h>
X  #include <sys/dk.h>
X  #include <sys/vm.h>
X  #ifdef pyr		/* just for v4??? */
X  #include <sys/systm.h>
X! #endif /* pyr */
X! #ifdef sequent
X! #include <machine/vmparam.h>
X! #include <machine/pte.h>
X! #include <machine/hwparam.h>
X! #include <machine/engine.h>
X! #include <machine/plocal.h>
X! #ifndef imin
X! #define imin(i,j)	((i) < (j) ? (i) : (j))
X! #endif /* imin */
X! #endif /* sequent */
X  
X  /* includes specific to top */
X  #include "layout.h"
X***************
X*** 86,92 ****
X--- 96,123 ----
X   *  end.  Pyramid 4.0 needs "percpu" instead of "cp_time".
X   */
X  
X+ #ifdef sun386
X  struct nlist nlst[] = {
X+     { "avenrun" },
X+ #define X_AVENRUN	0
X+     { "ccpu" },
X+ #define X_CCPU		1
X+     { "hz" },
X+ #define X_HZ		2
X+     { "mpid" },
X+ #define X_MPID		3
X+     { "nproc" },
X+ #define X_NPROC		4
X+     { "proc" },
X+ #define X_PROC		5
X+     { "total" },
X+ #define X_TOTAL		6
X+     { "cp_time" },			/* all except Pyramid 4.0 */
X+ #define X_CP_TIME	7
X+     { 0 },
X+ };
X+ #else /* NOT sun386 */
X+ struct nlist nlst[] = {
X      { "_avenrun" },		/* all machines need these */
X  #define X_AVENRUN	0
X      { "_ccpu" },
X***************
X*** 107,115 ****
X      { "_maxcpu" },			/* only for Pyramid 4.0 */
X  #define X_MAXCPU	8
X  #else
X      { "_cp_time" },			/* all except Pyramid 4.0 */
X  #define X_CP_TIME	7
X! #endif
X  #ifdef scs
X      { "_spt" },				/* only for SCS 375 */
X  #define X_SPT		8
X--- 138,153 ----
X      { "_maxcpu" },			/* only for Pyramid 4.0 */
X  #define X_MAXCPU	8
X  #else
X+ #ifdef sequent
X+     { "_engine" },			/* only for Sequent Balance/Symmetry */
X+ #define X_ENGINE	7
X+     { "_Nengine" },			/* only for Sequent Balance/Symmetry */
X+ #define X_CPUS		8
X+ #else
X      { "_cp_time" },			/* all except Pyramid 4.0 */
X  #define X_CP_TIME	7
X! #endif sequent
X! #endif pyr
X  #ifdef scs
X      { "_spt" },				/* only for SCS 375 */
X  #define X_SPT		8
X***************
X*** 116,122 ****
X  #endif scs
X      { 0 },
X  };
X! 
X  /* build Signal masks */
X  #define Smask(s)	(1 << ((s) - 1))
X  
X--- 154,160 ----
X  #endif scs
X      { 0 },
X  };
X! #endif /* sun386 */
X  /* build Signal masks */
X  #define Smask(s)	(1 << ((s) - 1))
X  
X***************
X*** 156,165 ****
X         struct percpu percpu[NCPU];
X            int maxcpu = 0;
X  #else
X  unsigned long cp_time_offset;
X! #endif
X  
X! #ifdef sun
X  long ccpu;
X  long avenrun[3];
X  #else
X--- 194,211 ----
X         struct percpu percpu[NCPU];
X            int maxcpu = 0;
X  #else
X+ #ifdef sequent
X+ unsigned long *p1, *p2;
X+        struct plocal tmppl, *plp[MAXNUMCPU];
X+        struct engine *enginep, engin;
X+        struct vmmeter vm;
X+ 	  int engines;
X+ #else
X  unsigned long cp_time_offset;
X! #endif sequent
X! #endif pyr
X  
X! #if defined(sun) || defined(sequent)
X  long ccpu;
X  long avenrun[3];
X  #else
X***************
X*** 243,254 ****
X--- 289,307 ----
X      register int change;
X      register struct nlist *nlstp;
X  
X+ #ifdef sequent
X+     int j, k;
X+ #endif sequent
X      static struct proc **pref;
X      static char tempbuf1[50];
X      static char tempbuf2[50];
X      int total_procs;
X      int old_sigmask;
X+ #ifdef sequent
X+     int proc_brkdn[8];
X+ #else
X      int proc_brkdn[7];
X+ #endif
X      int topn = Default_TOPN;
X      int delay = Default_DELAY;
X      int displays = 0;		/* indicates unspecified */
X***************
X*** 403,409 ****
X--- 456,470 ----
X      /* get the list of symbols we want to access in the kernel */
X      /* errno = 0; ??? */
X  #ifdef sunos4
X+ #ifdef sun386
X+     /* For some reason, it looks like kvm_nlist() will "not find"
X+      * the null element in the array (the one that indicates the
X+      * end of the list), so it will return 1 rather than 0.
X+      */
X+     if ((i = kvm_nlist(kd, nlst)) != 1)
X+ #else
X      if (i = kvm_nlist(kd, nlst))
X+ #endif /* sun386 */
X      {
X  	if (i < 0)
X  	{
X***************
X*** 424,435 ****
X  	exit(2);
X      }
X  #endif
X- 
X      /* did we get ALL of them? */
X      i = 0;
X      for (nlstp = nlst; nlstp->n_name != NULL; nlstp++)
X      {
X  	if (nlstp->n_type == 0)
X  	{
X  	    /* this one wasn't found */
X  	    fprintf(stderr, "%s: no symbol named `%s'\n", VMUNIX,
X--- 485,506 ----
X  	exit(2);
X      }
X  #endif
X      /* did we get ALL of them? */
X      i = 0;
X      for (nlstp = nlst; nlstp->n_name != NULL; nlstp++)
X      {
X+ #ifdef sun386
X+     /* According to manual page for nlist(), on a sun386i, the
X+      * n_type returned from an nlist() MAY BE 0, even if the 
X+      * variable was found.  So, we must do the check using
X+      * n_value.
X+      *
X+      * Thanks, Sun.
X+      */
X+ 	if (nlstp->n_value == 0)
X+ #else
X  	if (nlstp->n_type == 0)
X+ #endif /* sun386 */
X  	{
X  	    /* this one wasn't found */
X  	    fprintf(stderr, "%s: no symbol named `%s'\n", VMUNIX,
X***************
X*** 456,461 ****
X--- 527,538 ----
X      (void) getkval(nlst[X_MAXCPU].n_value, &maxcpu,	sizeof(maxcpu),
X  	    nlst[X_MAXCPU].n_name);
X  #endif
X+ #ifdef sequent
X+     (void) getkval(nlst[X_CPUS].n_value,   &engines, sizeof(engines),
X+ 	    nlst[X_CPUS].n_name);
X+     (void) getkval(nlst[X_ENGINE].n_value, &enginep, sizeof(enginep),
X+ 	    nlst[X_ENGINE].n_name);
X+ #endif sequent
X  #ifdef scs
X      (void) getkval(nlst[X_SPT].n_value, (int *)(&spt), sizeof(struct spt *),
X  	    nlst[X_SPT].n_name);
X***************
X*** 469,479 ****
X  #if defined(pyr) && defined(CPUFOUND)
X      percpu_offset = nlst[X_PERCPU].n_value;
X  #else
X      cp_time_offset = nlst[X_CP_TIME].n_value;
X  #endif
X  
X      /* this is used in calculating WCPU -- calculate it ahead of time */
X! #ifdef sun
X      logcpu = log((double)ccpu / FSCALE);
X  #else
X      logcpu = log(ccpu);
X--- 546,567 ----
X  #if defined(pyr) && defined(CPUFOUND)
X      percpu_offset = nlst[X_PERCPU].n_value;
X  #else
X+ #ifndef sequent
X      cp_time_offset = nlst[X_CP_TIME].n_value;
X+ #endif sequent
X+ #endif pyr 
X+ 
X+ #ifdef sequent
X+     /* get vmmeter pointers */
X+     for (i = 0; i < engines; i++) {
X+ 	(void) getkval(enginep, &engin, sizeof(engin), "engine");
X+ 	plp[i] = (struct plocal *)engin.e_local->pp_local;
X+ 	enginep++;
X+     }
X  #endif
X  
X      /* this is used in calculating WCPU -- calculate it ahead of time */
X! #if defined(sun) || defined(sequent)
X      logcpu = log((double)ccpu / FSCALE);
X  #else
X      logcpu = log(ccpu);
X***************
X*** 589,594 ****
X--- 677,683 ----
X      if (setjmp(jmp_int) != 0)
X      {
X  	/* control ends up here after an interrupt */
X+ 
X  	reset_display();
X      }
X  
X***************
X*** 619,627 ****
X  	    }
X  	}
X  #else
X  	(void) getkval(cp_time_offset, (int *)cp_time, sizeof(cp_time),
X  		     "_cp_time");
X! #endif
X  
X  	/* get load average array */
X  	(void) getkval(avenrun_offset, (int *)avenrun, sizeof(avenrun),
X--- 708,732 ----
X  	    }
X  	}
X  #else
X+ #ifdef sequent
X+ 	/* sum up engines data structure */
X+ #define NVM	(sizeof(struct vmmeter)/sizeof(int))
X+ 	p1 = (unsigned long *)&vm;
X+ 	for (j = 0; j < NVM; j++)
X+ 	    *p1++ = 0;
X+ 	for (j = 0; j < engines; j++) {
X+ 	    (void) getkval(plp[j], &tmppl, sizeof(struct plocal), "plocal");
X+ 	    p1 = (unsigned long *)&vm;
X+ 	    p2 = (unsigned long *)&tmppl.cnt;
X+ 	    for (k = 0; k < NVM; k++, p1++)
X+ 		*p1 += *p2++;
X+ 	}
X+ 	bcopy(vm.v_time, cp_time, sizeof(cp_time));
X+ #else
X  	(void) getkval(cp_time_offset, (int *)cp_time, sizeof(cp_time),
X  		     "_cp_time");
X! #endif sequent
X! #endif pyr
X  
X  	/* get load average array */
X  	(void) getkval(avenrun_offset, (int *)avenrun, sizeof(avenrun),
X***************
X*** 663,668 ****
X--- 768,786 ----
X  	/* display the load averages */
X  	(*d_loadave)(mpid, avenrun);
X  
X+ #ifdef sequent
X+ 	/* display number of CPU's */
X+ 	if (smart_terminal)
X+ 	{
X+ 	    Move_to(x_numcpus, y_numcpus);
X+ 	}
X+ 	else
X+ 	{
X+ 	    fputs("    ", stdout);
X+ 	}
X+ 	printf("CPU's: %2d", engines);
X+ #endif
X+ 
X  	/*
X  	 *  Display the current time.
X  	 *  "ctime" always returns a string that looks like this:
X***************
X*** 868,874 ****
X      
X  			    case CMD_update:	/* merely update display */
X  				/* is the load average high? */
X! #ifdef sun
X  				if (avenrun[0] > (int)(LoadMax * FSCALE))
X  #else
X  				if (avenrun[0] > LoadMax)
X--- 986,992 ----
X      
X  			    case CMD_update:	/* merely update display */
X  				/* is the load average high? */
X! #if defined(sun) || defined(sequent)
X  				if (avenrun[0] > (int)(LoadMax * FSCALE))
X  #else
X  				if (avenrun[0] > LoadMax)
X***************
X*** 1136,1142 ****
X      register struct proc *p1;
X      register struct proc *p2;
X      register int result;
X! #ifndef sun
X      register double dresult;
X  #endif
X  
X--- 1254,1260 ----
X      register struct proc *p1;
X      register struct proc *p2;
X      register int result;
X! #if !defined(sun) && !defined(sequent)
X      register double dresult;
X  #endif
X  
X***************
X*** 1145,1151 ****
X      p2 = *pp2;
X  
X      /* compare percent cpu (pctcpu) */
X! #ifdef sun
X      if ((result = p2->p_pctcpu - p1->p_pctcpu) == 0)
X  #else
X      if ((dresult = p2->p_pctcpu - p1->p_pctcpu) == 0)
X--- 1263,1269 ----
X      p2 = *pp2;
X  
X      /* compare percent cpu (pctcpu) */
X! #if defined(sun) || defined(sequent)
X      if ((result = p2->p_pctcpu - p1->p_pctcpu) == 0)
X  #else
X      if ((dresult = p2->p_pctcpu - p1->p_pctcpu) == 0)
X***************
X*** 1177,1184 ****
X--- 1295,1313 ----
X  			result = (p2->p_tdsize + p2->p_ssize) -
X  				 (p1->p_tdsize + p1->p_ssize);
X  #else !scs
X+ #ifdef sequent
X+ 	                {
X+ 			  struct user u1, u2;
X+ 			  getu(p1, &u1);
X+ 			  getu(p2, &u2);
X+ 			    
X+ 			  result = (p2->p_dsize + p2->p_ssize + u2.u_tsize) -
X+ 				   (p1->p_dsize + p1->p_ssize + u1.u_tsize);
X+ 			}
X+ #else !sequent
X  			result = (p2->p_tsize + p2->p_dsize + p2->p_ssize) -
X  				 (p1->p_tsize + p1->p_dsize + p1->p_ssize);
X+ #endif sequent
X  #endif scs
X  #endif pyr
X  		    }
X***************
X*** 1186,1192 ****
X  	    }
X  	}
X      }
X! #ifndef sun
X      else
X      {
X  	result = dresult < 0.0 ? -1 : 1;
X--- 1315,1321 ----
X  	    }
X  	}
X      }
X! #if !defined(sun) && !defined(sequent)
X      else
X      {
X  	result = dresult < 0.0 ? -1 : 1;
END_OF_FILE
if test 19597 -ne `wc -c <'top.sequent.pat'`; then
    echo shar: \"'top.sequent.pat'\" unpacked with wrong size!
fi
# end of 'top.sequent.pat'
fi
echo shar: End of shell archive.
exit 0