Results 1 to 3 of 3
I'm using a realtime-enabled kernel, and I noticed that when I do the command:
Code:
ps axo pid,nice,rtprio,comm
It does not print the nice value for a process if the ...
- 07-17-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 2
"ps" does not give nice value of process if realtime priority set...
I'm using a realtime-enabled kernel, and I noticed that when I do the command:
It does not print the nice value for a process if the process has a realtime value. If I "renice" a process that has a realtime value set, renice will give the old nice value as well as the new value being set, so I know that the nice value doesn't seem to be lost just by setting the realtime priority. Also, the correct nice value is also displayed in ksysguard for example.Code:ps axo pid,nice,rtprio,comm
So why doesn't the ps command above display the nice value for realtime prioritized processes?
I'm wondering if maybe the crucial question to ask first is--does the nice value matter if the process has a realtime priority? In other words, does a process with a realtime priority (even the lowest realtime priority) always take precedence over other processes that may have a nice value of -20 (highest nice priority)? Is that why the ps command above doesn't give a nice value for realtime prioritized processes? Thanks for any help.
- 07-18-2008 #2
I don't know the specifics about how ps works, but I know that when I use the "ionice" command it kind of behaves like that. It switches it ( the process ) off of the "nice" scheduler and on to the real-time one, so maybe, and It's a total stab in the dark, "ps" is trying to read the nice value from the process itself, and perhaps "renice" and "ksysguard" are reading values stored in /proc/.
Oh, I don't know if "ionice" is the program you're using, but I know that the scheduler it uses ( I think whatever one is usually used in real-time kernels, I'm not really well-versed on the subject ) supersedes the "nice" one.
- 07-19-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 2
I tried "ionice -p <pid>" and it seems to return a nice value of 0 regardless of how I set the nice value of the process with renice. I did a search through /proc/<pid> for the correct nice value and didn't find anything either. Thanks for the reply, but I guess I'm still confused since I don't know where ksysguard (for example) is getting its nice value for a process when ps/ionice won't display it.


Reply With Quote
