Category Archives: Embedded Linux

Easy way to get a priority of a process in Linux

So, I was researching online on how to get a priority of a Linux process (RT or not) and all asnwers used GNU top  or GNU ps , which is fine, but not on my embedded system that uses a simpler version of those tools from busy-box. Anyway, I know that procfs somehow shows that data, right. So with the help of man 5 proc  I wrote this small shell script that you can easily use to get the scheduling policy and its priority.

You can use as ./ PID .

I find this very useful on listing kernel thread priorities for PREEMPT_RT .



Bitbake’s PR Service as standalone server

bitbake support outside a OE-core or poky (yocto) environment is quite annoying. No distribution that I have used so far could write a decent package containing all dependencies and fixing PYTHONPATH problems in run-time.

Why I did need this? Because I wanted to run bitbake’s prserv as a standalone server in a build server. In order to do that I had to create an Arch package + systemd service file.

You can check out Arch support for bitbake in AUR. Also it might give a better understanding for other distributions as well.

Now for systemd, create a file /usr/lib/systemd/system/bitbake-prserv.service  and add the following content.

Make sure that the port is accessible via tcp on your firewall (39411 used here is just a random number). Also, you can notice that I couldn’t find a way to use $PRSERV_PORT  in PIDFile= option. If you know a better solution, please share with us.