Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 1995 19:59:39 +0200
From:      Mark Murray <mark@grondar.za>
To:        current@FreeBSD.org
Subject:   Patch for systat...
Message-ID:  <199503281759.TAA01578@grunt.grondar.za>

next in thread | raw e-mail | index | archive | help
Hi

I got irritated with not seeing the interrupt numbers in a (crowded)
"systat -vmstat" display, so I fixed it. Here is a patch to please be
applied in src/usr.bin/systat

----------------------------8<------------------------------------
*** vmstat.c#ctm#	Sat Mar 25 14:46:00 1995
--- vmstat.c	Tue Mar 28 19:48:44 1995
***************
*** 170,176 ****
  #define PAGEROW		 2	/* uses 4 rows and 26 cols */
  #define PAGECOL		36
  #define INTSROW		 2	/* uses all rows to bottom and 17 cols */
! #define INTSCOL		63
  #define PROCSROW	 7	/* uses 2 rows and 20 cols */
  #define PROCSCOL	 0
  #define GENSTATROW	 7	/* uses 2 rows and 30 cols */
--- 170,176 ----
  #define PAGEROW		 2	/* uses 4 rows and 26 cols */
  #define PAGECOL		36
  #define INTSROW		 2	/* uses all rows to bottom and 17 cols */
! #define INTSCOL		61
  #define PROCSROW	 7	/* uses 2 rows and 20 cols */
  #define PROCSCOL	 0
  #define GENSTATROW	 7	/* uses 2 rows and 30 cols */
***************
*** 333,339 ****
  	for (i = 0; i < nintr; i++) {
  		if (intrloc[i] == 0)
  			continue;
! 		mvprintw(intrloc[i], INTSCOL + 9, "%-8.8s", intrname[i]);
  	}
  }
  
--- 333,339 ----
  	for (i = 0; i < nintr; i++) {
  		if (intrloc[i] == 0)
  			continue;
! 		mvprintw(intrloc[i], INTSCOL + 9, "%-10.10s", intrname[i]);
  	}
  }
  
***************
*** 389,403 ****
  			if (nextintsrow == LINES)
  				continue;
  			intrloc[i] = nextintsrow++;
! 			mvprintw(intrloc[i], INTSCOL + 9, "%-8.8s",
  				intrname[i]);
  		}
  		X(intrcnt);
  		l = (int)((float)s.intrcnt[i]/etime + 0.5);
  		inttotal += l;
! 		putint(l, intrloc[i], INTSCOL, 8);
  	}
! 	putint(inttotal, INTSROW + 1, INTSCOL, 8);
  	Z(ncs_goodhits); Z(ncs_badhits); Z(ncs_miss);
  	Z(ncs_long); Z(ncs_pass2); Z(ncs_2passes); Z(ncs_neghits);
  	s.nchcount = nchtotal.ncs_goodhits + nchtotal.ncs_badhits +
--- 389,403 ----
  			if (nextintsrow == LINES)
  				continue;
  			intrloc[i] = nextintsrow++;
! 			mvprintw(intrloc[i], INTSCOL + 9, "%-10.10s",
  				intrname[i]);
  		}
  		X(intrcnt);
  		l = (int)((float)s.intrcnt[i]/etime + 0.5);
  		inttotal += l;
! 		putint(l, intrloc[i], INTSCOL + 2, 6);
  	}
! 	putint(inttotal, INTSROW + 1, INTSCOL + 2, 6);
  	Z(ncs_goodhits); Z(ncs_badhits); Z(ncs_miss);
  	Z(ncs_long); Z(ncs_pass2); Z(ncs_2passes); Z(ncs_neghits);
  	s.nchcount = nchtotal.ncs_goodhits + nchtotal.ncs_badhits +
----------------------------8<------------------------------------

Thanks!

M

-- 
Mark Murray
46 Harvey Rd, Claremont, Cape Town 7700, South Africa
+27 21 61-3768 GMT+0200



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503281759.TAA01578>