How to see NI and PR of a process in BalenaOS?

As stated in the question, how can I see niceness and priority of a process at Host OS level?

Hi there, you could just run top in the Host OS terminal for point in time sampling.

@ab77 Mm unlike in Ubuntu, top in BalenaOS (which I see is coming from Busybox) does not seem to show any of them… am I missing something?

Yes, good point. The bysybox we are using hasn’t been compiled with the relevant flags to show these extra fields, howrver you could use something like this instead:

# cat /proc/1234/stat | awk '{print "priority " $18 " nice " $19}'
priority 0 nice -20

where 1234 is the process ID you are interested in.

works, thanks.