Date: Tue, 18 Nov 2003 15:55:57 +0100 (CET) From: Jan Willem Knopper <jwk@stack.nl> To: FreeBSD-gnats-submit@FreeBSD.org Cc: jilles@stack.nl Subject: bin/59417: ps -o rtprio does not work Message-ID: <20031118145557.829D51CC71@turtle.stack.nl> Resent-Message-ID: <200311181500.hAIF0LDW028839@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 59417
>Category: bin
>Synopsis: ps -o rtprio does not work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 18 07:00:21 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Jan Willem Knopper
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
M.C.G.V. Stack
>Environment:
System: FreeBSD turtle.stack.nl 5.1-CURRENT FreeBSD 5.1-CURRENT #15: Thu Oct 9 11:43:55 CEST 2003 jilles@turtle.stack.nl:/usr/obj/usr/src/sys/TURTLE i386
>Description:
'ps -o rtprio' gives junk output: for example '208:208' instead of
'normal'
>How-To-Repeat:
% ps -p $$ -O rtprio
PID RTPRIO TT STAT TIME COMMAND
50378 208:208 pi Ss 0:00,32 -zsh (zsh)
instead of
jwk@turtle:/home/jwk/src/ps% ./ps -p $$ -O rtprio
PID RTPRIO TT STAT TIME COMMAND
50378 normal pi Ss 0:00,33 -zsh (zsh)
>Fix:
patch below
--- ps-print-rtprio.patch begins here ---
--- /usr/src/bin/ps/print.c.orig Tue Nov 18 15:47:44 2003
+++ /usr/src/bin/ps/print.c Tue Nov 18 15:45:36 2003
@@ -655,7 +655,7 @@
unsigned class, level;
v = ve->var;
- lpri = (struct priority *) ((char *)k + v->off);
+ lpri = (struct priority *) ((char *)k->ki_p + v->off);
class = lpri->pri_class;
level = lpri->pri_level;
switch (class) {
--- ps-print-rtprio.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031118145557.829D51CC71>
