'ps' command with 'thcount' option does not work in Red Hat Enterprise Linux 7
Environment
- Red Hat Enterprise Linux (RHEL) 7
- procps-ng < 3.3.10-10.el7
Issue
- In prior releases, the 'ps' command accepted either 'nlwp' or 'thcount' as output-column specifications with the '-o' flag. In RHEL7, 'thcount' no longer works. The man page, however, still says both forms are valid.
[root@rhel7 ~]# ps -o pid,cmd,thcount
error: unknown user-defined format specifier "thcount"
Resolution
This issue is addressed in the following procps
updates:
procps-ng-3.3.10-10.el7
This package is available via Errata RHSA-2016:2447 . The related Red Hat Bug is 1174311
Root Cause
Addition of tgid
option introduced a bug which caused thcount
option failed to be recognized.
Diagnostic Steps
- On RHEL 6.5:
[root@rhel6~]# ps -o pid,cmd,thcount <==========works fine
PID CMD THCNT
6761 -bash 1
7334 ps -o pid,cmd,thcount 1
- on RHEL 7 :
[root@rhel7 ~]# ps -o pid,cmd,thcount
error: unknown user-defined format specifier "thcount"
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments