projects/linux·blob master · refs

11 lines · 300 B

1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3get_workload_pids() {
4 local shell_pid=$$
5 local rtla_pid=$(ps -o ppid= $shell_pid)
6
7 # kernel threads
8 pgrep -P $(pgrep ^kthreadd$) -f '^\[?(osnoise|timerlat)/[0-9]+\]?$'
9 # user threads
10 pgrep -P $rtla_pid | grep -v "^$shell_pid$"
11}