This version matches exactly 'mpd' and only finds one pid, using the '-x' option in pgrep
pids=$(pgrep -x mpd)
for pid in $pids
do
chrt -r -p 99 $pid
cset proc --move --threads --toset=user --force --pid=$pid
done
I am running upmpdcli as the music server, which uses mpd as the player.
Using cpuset I have successfully got both mpd and upmpdcli running in the user cpuset, and mpd running with RT priority, which sounds pretty good.
However, I suspect that it would be beneficial to run mpd alone in the user cpuset, with upmpdcli in the system cpuset.
However I can't figure out how to achieve this. Any suggestions?
I could de-select upmpdcli as the music server and use mpd instead, but then I would need to lanch upmpdcli outside snakeoil. What would be the best way to do this?