diff options
author | Doug Rabson <dfr@FreeBSD.org> | 1998-11-25 09:34:00 +0000 |
---|---|---|
committer | Doug Rabson <dfr@FreeBSD.org> | 1998-11-25 09:34:00 +0000 |
commit | eb235b13c745b75e1fad835fba4556accd78af90 (patch) | |
tree | 551ae2edb75d8372ff6538a4b97c62c93e4ef7f8 /bin/ps | |
parent | c699f45e35a8b1216ecfbe687306e201a6f2d74a (diff) | |
download | src-eb235b13c745b75e1fad835fba4556accd78af90.tar.gz src-eb235b13c745b75e1fad835fba4556accd78af90.zip |
Fix formatting of %CPU value on alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Notes
Notes:
svn path=/head/; revision=41324
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 09fbf8e342cc..9317c7be1ffc 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.31 1998/06/28 21:05:48 bde Exp $"; + "$Id: print.c,v 1.32 1998/09/14 08:32:20 dfr 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 (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu)); - return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu) / + return (100.0 * fxtofl(p->p_pctcpu)); + return (100.0 * fxtofl(p->p_pctcpu) / (1.0 - exp(p->p_swtime * log(fxtofl(ccpu))))); } |