add tahoe
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 13 Jan 1986 07:26:29 +0000 (23:26 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 13 Jan 1986 07:26:29 +0000 (23:26 -0800)
SCCS-vsn: usr.bin/systat/disks.c 5.3
SCCS-vsn: usr.bin/systat/iostat.c 5.3
SCCS-vsn: usr.bin/systat/swap.c 5.3
SCCS-vsn: usr.bin/systat/vmstat.c 5.5

usr/src/usr.bin/systat/disks.c
usr/src/usr.bin/systat/iostat.c
usr/src/usr.bin/systat/swap.c
usr/src/usr.bin/systat/vmstat.c

index d043dac..9e19abd 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)disks.c    5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)disks.c    5.3 (Berkeley) %G%";
 #endif not lint
 
 #include "systat.h"
 #endif not lint
 
 #include "systat.h"
@@ -18,14 +18,18 @@ static struct nlist nlst[] = {
 #define        X_DK_MSPW       1
        { "_dk_mspw" },
 #ifdef vax
 #define        X_DK_MSPW       1
        { "_dk_mspw" },
 #ifdef vax
-#define        X_MBDINIT       2
+#define        X_MBDINIT       (X_DK_MSPW+1)
        { "_mbdinit" },
        { "_mbdinit" },
-#define        X_UBDINIT       3
+#define        X_UBDINIT       (X_DK_MSPW+2)
        { "_ubdinit" },
 #endif
 #ifdef sun
        { "_ubdinit" },
 #endif
 #ifdef sun
-#define        X_MBDINIT       2
+#define        X_MBDINIT       (X_DK_MSPW+1)
        { "_mbdinit" },
        { "_mbdinit" },
+#endif
+#ifdef tahoe
+#define        X_VBDINIT       (X_DK_MSPW+1)
+       { "_vbdinit" },
 #endif
        { "" },
 };
 #endif
        { "" },
 };
@@ -61,7 +65,7 @@ dkinit()
                if (dk_mspw[i] != 0.0)
                        dk_select[i] = 1;
        }
                if (dk_mspw[i] != 0.0)
                        dk_select[i] = 1;
        }
-       if (! read_names()) {
+       if (!read_names()) {
                free(dr_name);
                free(dk_select);
                free(dk_mspw);
                free(dr_name);
                free(dk_select);
                free(dk_mspw);
@@ -177,6 +181,38 @@ read_names()
 }
 #endif
 
 }
 #endif
 
+#ifdef tahoe
+#include <tahoevba/vbavar.h>
+
+/*
+ * Read the drive names out of kmem.
+ */
+read_names()
+{
+       struct vba_device udev, *up;
+       struct vba_driver udrv;
+       short two_char;
+       char *cp = (char *)&two_char;
+
+       up = (struct vba_device *) nlst[X_VBDINIT].n_value;
+       if (up == 0) {
+               fprintf(stderr, "vmstat: Disk init info not in namelist\n");
+               exit(1);
+       }
+       for (;;) {
+               steal(up++, udev);
+               if (udev.ui_driver == 0)
+                       break;
+               if (udev.ui_dk < 0 || udev.ui_alive == 0)
+                       continue;
+               steal(udev.ui_driver, udrv);
+               steal(udrv.ud_dname, two_char);
+               sprintf(dr_name[udev.ui_dk], "%c%c%d",
+                    cp[0], cp[1], udev.ui_unit);
+       }
+}
+#endif
+
 dkselect(args, truefalse, selections)
        char *args;
        int truefalse, selections[];
 dkselect(args, truefalse, selections)
        char *args;
        int truefalse, selections[];
index bca772d..f9b8c9b 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)iostat.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)iostat.c   5.3 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -46,10 +46,14 @@ static struct nlist nlst[] = {
 #define X_CP_TIME       5
         { "_cp_time" },
 #ifdef vax
 #define X_CP_TIME       5
         { "_cp_time" },
 #ifdef vax
-#define X_MBDINIT       6
+#define X_MBDINIT       (X_CP_TIME+1)
         { "_mbdinit" },
         { "_mbdinit" },
-#define X_UBDINIT       7
+#define X_UBDINIT       (X_CP_TIME+2)
         { "_ubdinit" },
         { "_ubdinit" },
+#endif
+#ifdef tahoe
+#define        X_VBDINIT       (X_CP_TIME+1)
+       { "_vbdinit" },
 #endif
         { "" },
 };
 #endif
         { "" },
 };
index 69a0716..da58777 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)swap.c     5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)swap.c     5.3 (Berkeley) %G%";
 #endif not lint
 
 #include "systat.h"
 #endif not lint
 
 #include "systat.h"
@@ -264,6 +264,9 @@ char        *devnames[] =
      { "hp", "ht", "up", "rk", "sw", "tm", "ts", "mt", "tu", "ra", "ut",
        "rb", "rx", "rl" };
 #endif
      { "hp", "ht", "up", "rk", "sw", "tm", "ts", "mt", "tu", "ra", "ut",
        "rb", "rx", "rl" };
 #endif
+#ifdef tahoe
+char   *devnames[] = { "ud", "vd", "xp", "cy", "sw" };
+#endif
 
 labelswap()
 {
 
 labelswap()
 {
index cc7e3e2..68cf0c8 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)vmstat.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)vmstat.c   5.5 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -25,7 +25,7 @@ static char sccsid[] = "@(#)vmstat.c  5.4 (Berkeley) %G%";
 #include <sys/proc.h>
 #include <sys/namei.h>
 
 #include <sys/proc.h>
 #include <sys/namei.h>
 
-#include <vax/pte.h>
+#include <machine/pte.h>
 
 static int ut;
 
 
 static int ut;