[Crash-utility] [PATCH v4 0/1] Filter ps output by scheduling policy

Dave Anderson anderson at redhat.com
Wed Oct 25 15:09:23 UTC 2017



----- Original Message -----
> While analyzing vmcores from customers sometimes we 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.

Hi Oleksandr,

Nice feature -- queued for crash-7.2.1:
 
  https://github.com/crash-utility/crash/commit/4550bf32a5ec1d9b7b6d5099aaee6e8e363a7827

Thanks,
  Dave


> 
> Changes in v4:
> 
> * apply Dave's modifications:
>   * throw fatal error instead of defaulting to NORMAL policy
>   * re-word and re-structure help entry
>   * relocate task_struct_policy members to the end of structs
>   * show task_struct_policy info in "help -o"
>   * replace strdup/calloc/free with wrappers
> * allow using hex values to specify policy
> 
> Changes in v3:
> 
> * fix snprintf format specifier for ulong
> * fix snprintf block indentation
> * add one more comma to help output
> 
> 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    |  14 +++++-
>  symbols.c |   3 ++
>  task.c    | 143
>  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
>  tools.c   |   5 ++-
>  5 files changed, 170 insertions(+), 10 deletions(-)
> 
> --
> 2.14.2
> 
> 




More information about the Crash-utility mailing list