Joseph wrote:

How to list real-time priority in Linux for an application (example
asterisk)?

What do you mean with listing real-time priority? You can list process priorities with commands like top or "ps -eo pri,nice,%cpu,pid,args --sort pri" (for example).

If you're interrested in asterisk's real-time responsiveness, the following might be of interrest.

Real-time priority actually doesn't exist in Linux (you'll need to use a real RTOS for that). Still, Linux makes a destinction between processes that need sort of real-time response times and processes that don't. Controlling this in a direct way is a difficult, if possible at all. Prioritizing processes is done on the fly (in real time) by the scheduling process in the Linux core.

However, there is a way to manipulate the prioritizing of processes with a command called 'nice'. Normally you use this command (with a positive adjustment value) to make a process to behave 'nice' to other processes. That is, it gives the process a lower priority that it would normally get, thus making it a relative low priority process. By using nice with a negative adjustment (you'll need to be root for that), you're able to give a certain process a higher priority than it would normally get, thus giving the process more of a 'real-time' priority.

In my experience it proved to be more usefull to give all the processes, that stood in the way of asterisk performance, a positive nice adjustment, rather than giving asterisk a negative nice adjustment. I haven't tested this thoroughly, so I'm not sure about the reasons for this. It could have something to with asterisk getting in the way of Linux's core processes when incresing it's priority. Still, it's nothing more than a guess.
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to