[LAU] chrt doesn't seem to be working

Ken Restivo ken at restivo.org
Mon Nov 19 22:02:59 EST 2007


On Mon, Nov 19, 2007 at 09:41:19PM +0100, David Causse wrote:
> Ken Restivo a écrit :
> > I'm having a bit of difficulty getting chrt to, um, chrt.
> >
> > I've written a little MIDI-processing daemon and I want it to run with high priority. It is very small and tight and I don't expect it to take up much CPU, but I definitely want it running first.
> >
> > So I do this:
> > 	sudo /usr/bin/chrt -f -p 81 `pidof mydaemon`
> >
> > And then I do this:
> > 	ps -Leo pid,class,rtprio,ni,pri,pcpu,stat,comm --sort -rtprio
> >
> > And... my daemon does *not* show up in the process list at all.
> >   
> Try this :
> ps Haxo pid,class,rtprio,ni,pri,pcpu,stat,comm --sort=-rtprio
> --sort seems to skip some processes with the -edf syntax style, I don't 
> know why...

Excellent! That ps cocktail shows it, and it is apparently working. Thanks!

> But your process won't be on top because you have set the SCHED_FIFO 
> wich is not rtprio.
> You should use :
> chrt -p 81 `pidof mydaemon`
> SCHED_RT is the default.
> 


Um... JACKD runs in FIFO mode, or isn't that what the "FF" means in the ps?

  PID CLS RTPRIO  NI PRI %CPU STAT COMMAND
25176 FF      80   - 120  0.0 SLsl jackd


-ken




More information about the Linux-audio-user mailing list