changes for 4.4BSD-Lite requested by USL
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 23 Sep 1993 07:05:44 +0000 (23:05 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 23 Sep 1993 07:05:44 +0000 (23:05 -0800)
SCCS-vsn: bin/ps/keyword.c 8.2
SCCS-vsn: bin/ps/print.c 8.2

usr/src/bin/ps/keyword.c
usr/src/bin/ps/print.c

index ae4b8fd..5ff4edc 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)keyword.c  8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)keyword.c  8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -65,7 +65,7 @@ VAR var[] = {
        {"blocked", "", "sigmask"},
        {"caught", "", "sigcatch"},
        {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 16},
        {"blocked", "", "sigmask"},
        {"caught", "", "sigcatch"},
        {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 16},
-       {"cpu", "CPU", NULL, 0, pvar, 3, POFF(p_cpu), ULONG, "d"},
+       {"cpu", "CPU", NULL, 0, pvar, 3, POFF(p_estcpu), ULONG, "d"},
        {"cputime", "", "time"},
        {"f", "F", NULL, 0, pvar, 7, POFF(p_flag), LONG, "x"},
        {"flags", "", "f"},
        {"cputime", "", "time"},
        {"f", "F", NULL, 0, pvar, 7, POFF(p_flag), LONG, "x"},
        {"flags", "", "f"},
@@ -103,7 +103,7 @@ VAR var[] = {
        {"pmem", "", "%mem"},
        {"ppid", "PPID", NULL, 0, evar, PIDLEN, EOFF(e_ppid), LONG, PIDFMT},
        {"pri", "PRI", NULL, 0, pri, 3},
        {"pmem", "", "%mem"},
        {"ppid", "PPID", NULL, 0, evar, PIDLEN, EOFF(e_ppid), LONG, PIDFMT},
        {"pri", "PRI", NULL, 0, pri, 3},
-       {"re", "RE", NULL, 0, pvar, 3, POFF(p_time), ULONG, "d"},
+       {"re", "RE", NULL, 0, pvar, 3, POFF(p_swtime), ULONG, "d"},
        {"rgid", "RGID", NULL, 0, evar, UIDLEN, EOFF(e_pcred.p_rgid),
                ULONG, UIDFMT},
        {"rlink", "RLINK", NULL, 0, pvar, 8, POFF(p_rlink), KPTR, "x"},
        {"rgid", "RGID", NULL, 0, evar, UIDLEN, EOFF(e_pcred.p_rgid),
                ULONG, UIDFMT},
        {"rlink", "RLINK", NULL, 0, pvar, 8, POFF(p_rlink), KPTR, "x"},
@@ -114,7 +114,7 @@ VAR var[] = {
                ULONG, UIDFMT},
        {"ruser", "RUSER", NULL, LJUST, runame, USERLEN},
        {"sess", "SESS", NULL, 0, evar, 6, EOFF(e_sess), KPTR, "x"},
                ULONG, UIDFMT},
        {"ruser", "RUSER", NULL, LJUST, runame, USERLEN},
        {"sess", "SESS", NULL, 0, evar, 6, EOFF(e_sess), KPTR, "x"},
-       {"sig", "PENDING", NULL, 0, pvar, 8, POFF(p_sig), LONG, "x"},
+       {"sig", "PENDING", NULL, 0, pvar, 8, POFF(p_siglist), LONG, "x"},
        {"sigcatch", "CAUGHT", NULL, 0, pvar, 8, POFF(p_sigcatch), LONG, "x"},
        {"sigignore", "IGNORED",
                NULL, 0, pvar, 8, POFF(p_sigignore), LONG, "x"},
        {"sigcatch", "CAUGHT", NULL, 0, pvar, 8, POFF(p_sigcatch), LONG, "x"},
        {"sigignore", "IGNORED",
                NULL, 0, pvar, 8, POFF(p_sigignore), LONG, "x"},
@@ -190,7 +190,7 @@ VAR var[] = {
        {"poip", "POIP", NULL, 0, pvar, 4, POFF(p_poip), SHORT, "d"},
        {"ppid", "PPID", NULL, 0, pvar, PIDLEN, POFF(p_ppid), LONG, PIDFMT},
        {"pri", "PRI", NULL, 0, pri, 3},
        {"poip", "POIP", NULL, 0, pvar, 4, POFF(p_poip), SHORT, "d"},
        {"ppid", "PPID", NULL, 0, pvar, PIDLEN, POFF(p_ppid), LONG, PIDFMT},
        {"pri", "PRI", NULL, 0, pri, 3},
-       {"re", "RE", NULL, 0, pvar, 3, POFF(p_time), ULONG, "d"},
+       {"re", "RE", NULL, 0, pvar, 3, POFF(p_swtime), ULONG, "d"},
        {"rgid", "RGID", NULL, 0, pvar, UIDLEN, POFF(p_rgid), USHORT, UIDFMT},
        {"rlink", "RLINK", NULL, 0, pvar, 8, POFF(p_rlink), KPTR, "x"},
        {"rss", "RSS", NULL, 0, p_rssize, 4},
        {"rgid", "RGID", NULL, 0, pvar, UIDLEN, POFF(p_rgid), USHORT, UIDFMT},
        {"rlink", "RLINK", NULL, 0, pvar, 8, POFF(p_rlink), KPTR, "x"},
        {"rss", "RSS", NULL, 0, p_rssize, 4},
index 80b5f2b..c9173ff 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)print.c    8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)print.c    8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -217,7 +217,7 @@ pri(k, ve)
        VAR *v;
 
        v = ve->var;
        VAR *v;
 
        v = ve->var;
-       (void)printf("%*d", v->width, KI_PROC(k)->p_pri - PZERO);
+       (void)printf("%*d", v->width, KI_PROC(k)->p_priority - PZERO);
 }
 
 void
 }
 
 void
@@ -492,12 +492,12 @@ getpcpu(k)
 #define        fxtofl(fixpt)   ((double)(fixpt) / fscale)
 
        /* XXX - I don't like this */
 #define        fxtofl(fixpt)   ((double)(fixpt) / fscale)
 
        /* XXX - I don't like this */
-       if (p->p_time == 0 || (p->p_flag & SLOAD) == 0)
+       if (p->p_swtime == 0 || (p->p_flag & SLOAD) == 0)
                return (0.0);
        if (rawcpu)
                return (100.0 * fxtofl(p->p_pctcpu));
        return (100.0 * fxtofl(p->p_pctcpu) /
                return (0.0);
        if (rawcpu)
                return (100.0 * fxtofl(p->p_pctcpu));
        return (100.0 * fxtofl(p->p_pctcpu) /
-               (1.0 - exp(p->p_time * log(fxtofl(ccpu)))));
+               (1.0 - exp(p->p_swtime * log(fxtofl(ccpu)))));
 }
 
 void
 }
 
 void