Bug 129965 - [patch] ps(1): ps -lH doesn't show the proper CPU#
Summary: [patch] ps(1): ps -lH doesn't show the proper CPU#
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2008-12-27 00:20 UTC by Nikola Knežević
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:

file.diff (570 bytes, patch)
2008-12-27 00:20 UTC, Nikola Knežević
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Knežević 2008-12-27 00:20:03 UTC
ps -Hl shows 0 in the CPU# column for every thread. It should show the correct CPU#.

Fix: Patch attached with submission follows:
How-To-Repeat: observe the output of ps -axHl
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2010-07-19 13:44:41 UTC
Responsible Changed
From-To: freebsd-bugs->gavin

I'll grab this one
Comment 2 Glen Barber freebsd_committer 2011-11-15 23:18:33 UTC
Hi Gavin,

I have a patch against HEAD that applies cleanly.  Is there any chance
this can be committed?



Glen Barber | gjb@FreeBSD.org
FreeBSD Documentation Project

Index: ps/keyword.c
--- ps/keyword.c	(revision 227541)
+++ ps/keyword.c	(working copy)
@@ -76,7 +76,7 @@
 	{"comm", "COMMAND", NULL, LJUST, ucomm, 0, CHAR, NULL, 0},
 	{"command", "COMMAND", NULL, COMM|LJUST|USER, command, 0,
 		CHAR, NULL, 0},
-	{"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0},
+	{"cpu", "CPU", NULL, 0, kvar, KOFF(ki_lastcpu), CHAR, "d", 0},
 	{"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0},
 	{"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0},
 	{"egroup", "", "group", 0, NULL, 0, CHAR, NULL, 0},
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:36 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