freebsd-nq/bin/ps
Piotr Pawel Stefaniak 4f47f5111f ps(1): reuse keyword "cpu" to show CPU number
This flag will now show the processor number on which a process is running.

This change was inspired by PR129965. Initially I didn't think that the
patch attached to it was correct -- it sacrificed ki_estcpu use in "cpu"
for ki_lastcpu and I thought that the old functionality should be kept and
the new (cpu#) one added to it. But I've since discovered that ki_estcpu is
sched_4bsd-specific. What's worse, it represents the same thing as
ki_pctcpu, except ki_pctcpu is universal -- so "%cpu" has been using it
successfully. Therefore, I've decided to replace information based on
ki_estcpu with information based on ki_oncpu/ki_lastcpu.

Key parts of the code and manual changes were borrowed from top(1).

PR:		129965
Reported by:	Nikola Knežević
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25377
2020-06-27 19:09:33 +00:00
..
extern.h ps(1): reuse keyword "cpu" to show CPU number 2020-06-27 19:09:33 +00:00
fmt.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
keyword.c ps(1): reuse keyword "cpu" to show CPU number 2020-06-27 19:09:33 +00:00
Makefile Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nlist.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
print.c ps(1): reuse keyword "cpu" to show CPU number 2020-06-27 19:09:33 +00:00
ps.1 ps(1): reuse keyword "cpu" to show CPU number 2020-06-27 19:09:33 +00:00
ps.c ps(1): reuse keyword "cpu" to show CPU number 2020-06-27 19:09:33 +00:00
ps.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00