Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/tools/tracing/rtla/tests/scripts/check-priority.sh
26288 views
1
#!/bin/bash
2
# SPDX-License-Identifier: GPL-2.0
3
pids="$(pgrep ^$1)" || exit 1
4
for pid in $pids
5
do
6
chrt -p $pid | cut -d ':' -f 2 | head -n1 | grep "^ $2\$" >/dev/null
7
chrt -p $pid | cut -d ':' -f 2 | tail -n1 | grep "^ $3\$" >/dev/null
8
done && echo "Priorities are set correctly"
9
10