From owner-svn-src-head@freebsd.org Wed Sep 6 16:18:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1808BE0A4CA; Wed, 6 Sep 2017 16:18:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96707183C; Wed, 6 Sep 2017 16:18:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v86GI6Lj032058; Wed, 6 Sep 2017 16:18:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v86GI6Rc032057; Wed, 6 Sep 2017 16:18:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201709061618.v86GI6Rc032057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 6 Sep 2017 16:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323225 - head/bin/ps X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/bin/ps X-SVN-Commit-Revision: 323225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 16:18:08 -0000 Author: trasz Date: Wed Sep 6 16:18:06 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 Modified: head/bin/ps/print.c Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Wed Sep 6 16:16:11 2017 (r323224) +++ head/bin/ps/print.c Wed Sep 6 16:18:06 2017 (r323225) @@ -262,9 +262,9 @@ state(KINFO *k, VARENT *ve __unused) cp++; if (!(flag & P_INMEM)) *cp++ = 'W'; - if (k->ki_p->ki_nice < NZERO) + if (k->ki_p->ki_nice < NZERO || k->ki_p->ki_pri.pri_class == PRI_REALTIME) *cp++ = '<'; - else if (k->ki_p->ki_nice > NZERO) + else if (k->ki_p->ki_nice > NZERO || k->ki_p->ki_pri.pri_class == PRI_IDLE) *cp++ = 'N'; if (flag & P_TRACED) *cp++ = 'X';