In CEE we often analyze vmcores from customers and sometimes want
to filter tasks by scheduling policy, for instance, to identify
if customer runs realtime tasks. Doing this via foreach grepping
and then feeding back pointers to task_struct and grepping it again
is very slow, especially if customer runs thousands of tasks.
So, let's add another option for ps to filter tasks by scheduling
policy.
Changes in v2:
* handle task_struct.policy member size correctly
* accept comma-separated list of policies
instead of requiring multiple -y arguments
* policy can be specified as a number too
* policy name is case-insensitive now
* warn about incorrect policy name
* fix help message formatting
* mark upper_case() source string pointer as a const
(minor cleanup)
Oleksandr Natalenko (1):
task: also filter ps output by ->policy
defs.h | 15 +++++++-
help.c | 7 +++-
task.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
tools.c | 5 ++-
4 files changed, 152 insertions(+), 10 deletions(-)
--
2.14.2