Bug 81757

Summary: realtime processes are not marked with '<' in ps(1) output.
Product: Base System Reporter: trasz <trasz>
Component: binAssignee: Garance A Drosehn <gad>
Status: Closed FIXED    
Severity: Affects Only Me CC: trasz
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description trasz 2005-06-01 11:30:02 UTC
      manual page for ps(1) reads '<       The process has raised CPU scheduling priority.'.  however, if a process has a realtime priority, it's not marked with '<' in STAT column.
Comment 1 Robert Watson freebsd_committer freebsd_triage 2005-06-01 14:08:54 UTC
Responsible Changed
From-To: freebsd-bugs->gad

Assign to gad, who has strong interests in this area.
Comment 2 Bruce Evans 2005-06-02 03:36:40 UTC
On Wed, 1 Jun 2005, trasz wrote:

>> Description:
>      manual page for ps(1) reads '<       The process has raised CPU scheduling priority.'.  however, if a process has a realtime priority, it's not marked with '<' in STAT column.

'<' currently only applies to niced processes.  I think there should
be different indicators for realtime and idle priority and other
scheduling classes.

In top(1), scheduling classes are supposed to be encoded as fake
nice values and a single indicator almost works since the indicator is
numeric so it can indicate the scheduling class; however, the encoding
is limited and broken; a non-numeric indicator of the class combined
with a shorter numeric indicator of the the priority within the class
might be better.

Bruce
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-09-06 16:18:27 UTC
A commit references this bug:

Author: trasz
Date: Wed Sep  6 16:18:06 UTC 2017
New revision: 323225
URL: https://svnweb.freebsd.org/changeset/base/323225

Log:
  Reflect realtime and idle priorities in ps(1) state flags, same like
  we do for the usual nice values.  It could be argued that they should
  use another set of indicators, since the underlying mechanism is
  different, but they match the description in the manual page, and so
  I think it's ok to not overcomplicate things.

  PR:		81757
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL

Changes:
  head/bin/ps/print.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-10-04 12:01:29 UTC
A commit references this bug:

Author: trasz
Date: Wed Oct  4 12:01:03 UTC 2017
New revision: 324270
URL: https://svnweb.freebsd.org/changeset/base/324270

Log:
  MFC r323225:

  Reflect realtime and idle priorities in ps(1) state flags, same like
  we do for the usual nice values.  It could be argued that they should
  use another set of indicators, since the underlying mechanism is
  different, but they match the description in the manual page, and so
  I think it's ok to not overcomplicate things.

  PR:		81757

Changes:
_U  stable/11/
  stable/11/bin/ps/print.c