[12281] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: decmips 7.7C: top

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Tue Jul 26 17:47:39 1994

From: epeisach@MIT.EDU
Date: Tue, 26 Jul 1994 17:47:31 -0400
To: bugs@MIT.EDU
Cc: diego@MIT.EDU


I suspect that the '200' processes are the maximum number of processes
that can run. I.e. the process table size. 

I suspect that a process which is waiting to run is considered
'starting'. Actually, idle would be a better desription...

Looking at the 3.3beta relase of top (the Athena release has is running
3.2) I see some differences in the m_ultrix4.c file which might affect
what you are seeing...

I am appending the patch in case any brave fool decides it is worth
investigating.... (see the 425 line range)


*** m_ultrix4.c	Wed Mar 10 12:38:48 1993
--- /build/third/unsupported/top-3.3beta+alpha/machine/m_ultrix4.c	Mon Dec 13 01:43:28 1993
***************
*** 4,15 ****
   * SYNOPSIS:  any DEC running ULTRIX V4.2 or later
   *
   * DESCRIPTION:
!  * This is the machine-dependent module for ULTRIX V4.2
!  * It should work on any DEC running V4.2 or later.
   *
   * LIBS: 
   *
   * AUTHOR:  David S. Comay <dsc@seismo.css.gov>
   */
  
  #include <sys/types.h>
--- 4,16 ----
   * SYNOPSIS:  any DEC running ULTRIX V4.2 or later
   *
   * DESCRIPTION:
!  * This is the machine-dependent module for ULTRIX V4.x
!  * It should work on any DEC (mips or VAX) running V4.0 or later.
   *
   * LIBS: 
   *
   * AUTHOR:  David S. Comay <dsc@seismo.css.gov>
+  * patches: Alex A. Sergejew <aas@swin.oz.au>
   */
  
  #include <sys/types.h>
***************
*** 27,34 ****
  #include <sys/file.h>
  #include <sys/time.h>
  #include <machine/pte.h>
  
- 
  /* #define DOSWAP */
  
  #include "top.h"
--- 28,37 ----
  #include <sys/file.h>
  #include <sys/time.h>
  #include <machine/pte.h>
+ #ifdef _SIZE_T_
+ #include <sys/cpudata.h>
+ #endif
  
  /* #define DOSWAP */
  
  #include "top.h"
***************
*** 188,194 ****
  extern char *sys_errlist[];
  
  long lseek();
- long time();
  long percentages();
  
  machine_init(statics)
--- 191,196 ----
***************
*** 425,431 ****
  	 *  status field.  Processes with SSYS set are system
  	 *  processes---these get ignored unless show_sysprocs is set.
  	 */
! 	if (pp->p_stat != 0 &&
  	    (show_system || ((pp->p_type & SSYS) == 0)))
  	{
  	    total_procs++;
--- 427,433 ----
  	 *  status field.  Processes with SSYS set are system
  	 *  processes---these get ignored unless show_sysprocs is set.
  	 */
! 	if (pp->p_stat != 0 && pp->p_stat != SIDL &&
  	    (show_system || ((pp->p_type & SSYS) == 0)))
  	{
  	    total_procs++;
***************
*** 432,439 ****
  	    process_states[pp->p_stat]++;
  	    if ((pp->p_stat != SZOMB) &&
  		(pp->p_stat != SIDL) &&
! 		(show_idle || (pp->p_pctcpu != 0) || (pp->p_stat == SRUN)) &&
  		(!show_uid || pp->p_uid == (uid_t)sel->uid))
  	    {
  		*prefp++ = pp;
  		active_procs++;
--- 434,446 ----
  	    process_states[pp->p_stat]++;
  	    if ((pp->p_stat != SZOMB) &&
  		(pp->p_stat != SIDL) &&
! #ifdef vax
! 		(show_idle || (pp->p_pctcpu != 0.0) || (pp->p_stat == SRUN)) &&
  		(!show_uid || pp->p_uid == (uid_t)sel->uid))
+ #else
+   		(show_idle || (pp->p_pctcpu != 0) || (pp->p_stat == SRUN)) &&
+   		(!show_uid || pp->p_uid == (uid_t)sel->uid))
+ #endif
  	    {
  		*prefp++ = pp;
  		active_procs++;
***************
*** 457,463 ****
      return((caddr_t)&handle);
  }
  
! char fmt[128];		/* static area where result is built */
  
  char *format_next_process(handle, get_userid)
  
--- 464,470 ----
      return((caddr_t)&handle);
  }
  
! char fmt[MAX_COLS];		/* static area where result is built */
  
  char *format_next_process(handle, get_userid)
  
***************
*** 739,745 ****
--- 746,756 ----
      p2 = *pp2;
  
      /* compare percent cpu (pctcpu) */
+ #ifdef vax
+     if ((lresult = p2->p_pctcpu - p1->p_pctcpu) == 0.0)
+ #else
      if ((lresult = p2->p_pctcpu - p1->p_pctcpu) == 0)
+ #endif
      {
  	/* use cpticks to break the tie */
  	if ((result = p2->p_cpticks - p1->p_cpticks) == 0)


home help back first fref pref prev next nref lref last post