diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 |
commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /bin/ps | |
parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) |
Notes
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/fmt.c | 6 | ||||
-rw-r--r-- | bin/ps/keyword.c | 9 | ||||
-rw-r--r-- | bin/ps/print.c | 6 |
3 files changed, 7 insertions, 14 deletions
diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index f04ae9dc63915..76eb78c21c214 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -36,13 +36,13 @@ static char sccsid[] = "@(#)fmt.c 8.4 (Berkeley) 4/15/94"; #endif static const char rcsid[] = - "$Id: fmt.c,v 1.12 1998/06/17 11:33:10 jkoshy Exp $"; + "$Id: fmt.c,v 1.11 1998/05/15 06:29:15 charnier Exp $"; #endif /* not lint */ -#include <sys/types.h> +#include <sys/param.h> +#include <sys/syslimits.h> #include <sys/time.h> #include <sys/resource.h> -#include <err.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 6cd2c3572dc96..a0c60b11b9f18 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else static const char rcsid[] = - "$Id: keyword.c,v 1.21 1998/12/19 02:55:32 julian Exp $"; + "$Id: keyword.c,v 1.19 1998/05/25 05:07:17 steve Exp $"; #endif #endif /* not lint */ @@ -157,17 +157,10 @@ VAR var[] = { {"ruser", "RUSER", NULL, LJUST|DSIZ, runame, s_runame, USERLEN}, {"sess", "SESS", NULL, 0, evar, NULL, 6, EOFF(e_sess), KPTR, "lx"}, {"sig", "PENDING", NULL, 0, pvar, NULL, 8, POFF(p_siglist), INT, "x"}, -#ifndef COMPAT_LINUX_THREADS {"sigcatch", "CAUGHT", NULL, 0, pvar, NULL, 8, POFF(p_sigcatch), UINT, "x"}, {"sigignore", "IGNORED", NULL, 0, pvar, NULL, 8, POFF(p_sigignore), UINT, "x"}, -#else - {"sigcatch", "CAUGHT", - NULL, 0, evar, NULL, 8, EOFF(e_procsig.ps_sigcatch), UINT, "x"}, - {"sigignore", "IGNORED", - NULL, 0, evar, NULL, 8, EOFF(e_procsig.ps_sigignore), UINT, "x"}, -#endif /* COMPAT_LINUX_THREADS */ {"sigmask", "BLOCKED", NULL, 0, pvar, NULL, 8, POFF(p_sigmask), UINT, "x"}, {"sl", "SL", NULL, 0, pvar, NULL, 3, POFF(p_slptime), UINT, "d"}, diff --git a/bin/ps/print.c b/bin/ps/print.c index 9317c7be1ffc2..09fbf8e342ccb 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #endif static const char rcsid[] = - "$Id: print.c,v 1.32 1998/09/14 08:32:20 dfr Exp $"; + "$Id: print.c,v 1.31 1998/06/28 21:05:48 bde Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -503,8 +503,8 @@ getpcpu(k) if (p->p_swtime == 0 || (p->p_flag & P_INMEM) == 0) return (0.0); if (rawcpu) - return (100.0 * fxtofl(p->p_pctcpu)); - return (100.0 * fxtofl(p->p_pctcpu) / + return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu)); + return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu) / (1.0 - exp(p->p_swtime * log(fxtofl(ccpu))))); } |