16 lines · 377 B · Shell
RawDownload
#!/bin/bash# SPDX-License-Identifier: GPL-2.0. "$(dirname $0)/lib/get_workload_pids.sh"kthreadd_pid=$(pgrep ^kthreadd$)cnt_kernel=0cnt_user=0for pid in $(get_workload_pids)do    if [ "$(echo $(ps -o ppid= $pid))" = "$kthreadd_pid" ]    then        ((++cnt_kernel))    else        ((++cnt_user))    fidoneecho "$cnt_kernel kernel threads, $cnt_user user threads"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t