From fa2ed2fe1ae213176f2dcf78697af73140bbedab Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Wed, 22 Sep 1993 23:05:44 -0800 Subject: [PATCH] changes for 4.4BSD-Lite requested by USL SCCS-vsn: bin/ps/keyword.c 8.2 SCCS-vsn: bin/ps/print.c 8.2 --- usr/src/bin/ps/keyword.c | 10 +++++----- usr/src/bin/ps/print.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/usr/src/bin/ps/keyword.c b/usr/src/bin/ps/keyword.c index ae4b8fdf77..5ff4edcf79 100644 --- a/usr/src/bin/ps/keyword.c +++ b/usr/src/bin/ps/keyword.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)keyword.c 8.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)keyword.c 8.2 (Berkeley) %G%"; #endif /* not lint */ #include @@ -65,7 +65,7 @@ VAR var[] = { {"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"}, @@ -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}, - {"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"}, @@ -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"}, - {"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"}, @@ -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}, - {"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}, diff --git a/usr/src/bin/ps/print.c b/usr/src/bin/ps/print.c index 80b5f2b7dc..c9173ff82f 100644 --- a/usr/src/bin/ps/print.c +++ b/usr/src/bin/ps/print.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)print.c 8.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)print.c 8.2 (Berkeley) %G%"; #endif /* not lint */ #include @@ -217,7 +217,7 @@ pri(k, ve) 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 @@ -492,12 +492,12 @@ getpcpu(k) #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) / - (1.0 - exp(p->p_time * log(fxtofl(ccpu))))); + (1.0 - exp(p->p_swtime * log(fxtofl(ccpu))))); } void -- 2.20.1