1

I looking for a way to start a real-time process or set a running process as a real-time process.

  • 4
    Which operating system are we talking about? – AdminBee Aug 20 at 12:34
  • @AdminBee I thought all distribution is the same. LOL – JustWe Aug 21 at 13:39
2

To start/set a process as real-time, you should use chrt

Usage to start a new process:

chrt priority command [arguments]

Usage to set a running process:

chrt -r -p priority pid

Example:

sudo chrt -r 70 <your command>

or

<your command> & sudo chrt -r 70 $!
| improve this answer | |
2

Of course, one can do this programmatically just by calling the relevant system calls. There are various commands that wrap these so that one can do also this at the level of shell programming.

  • On HP-UX, the command wrapper for this is rtprio.
  • On FreeBSD, the command wrapper for this is rtprio with a nod in the manual to the HP-UX tool.
  • On Illumos, and on Solaris and Ultrix before it, the command wrapper is priocntl.
  • It is priocntl on Schillix, too.
  • In the util-linux toolset for Linux-based operating systems, the command wrapper is chrt.
  • In the BusyBox toolset, the command wrapper is chrt with different options available than for the util-linux tool.
  • In the ToyBox toolset, the command wrapper is chrt with a third set of different options.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.