Bug 144285 - [patch] ps(1): ps -axo user,%cpu,%mem - most processes using 0% of memory
Summary: [patch] ps(1): ps -axo user,%cpu,%mem - most processes using 0% of memory
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2010-02-25 14:50 UTC by admin
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:

file.diff (445 bytes, patch)
2010-02-25 14:50 UTC, admin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description admin 2010-02-25 14:50:00 UTC
Modern computers have a large amount of memory.
But, in ps(1) source I see:
(void)printf("%*.1f", v->width, getpcpu(k));
(void)printf("%*.1f", v->width, getpmem(k));
0.1% - it very big.
for 8Gb ram it = 8mb
Many of the processes is less than this number.

Fix: see patch

Patch attached with submission follows:
How-To-Repeat: ps -axo user,%cpu,%mem
Comment 1 Hiren Panchasara freebsd_committer 2013-05-11 10:32:46 UTC
Responsible Changed
From-To: freebsd-bugs->hiren

Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:49 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped