When I renice
a multithreaded process in Ubuntu 10.04, then view the results in top
, it seems that only the main thread actually gets reniced. All the other threads retain their old nice value. What's the easiest way to renice all threads in a process instead of just the main thread?
Asked
Active
Viewed 4,246 times
10
dsimcha
- 661
- 1
- 6
- 12
3 Answers
2
Inspired by zhihui's answer, what I actually used:
renice -n <niceness> -p `ps --no-heading -Lo tid <PID>`
lvella
- 284
- 2
- 13