I have a process (testsuit). In this process I use two pthreads ( T1 and T2 ).
Is there a possibility to display information about this threads on the shell ( especially the priority)?
If I use top -H I can see noting.
ps axms show me this
UID PID PENDING BLOCKED IGNORED CAUGHT STAT TTY TIME COMMAND
0 1 00000000 - - - - ? 0:00 init [3
.
.
.
0 1063 00000000 - - - - ttyS0 0:00 ./tests
0 - 00000000 00000000 00000000 <80000000 Sl - 0:00 -
0 - 00000000 00000000 00000000 <80000000 Rl - 0:00 -
0 - 00000000 00000000 00000000 <80000000 Rl - 0:00 -
I think there is no indication of Priority.
That are the things I found out. ( feel free to edit it )
NOTE:
I use Linux 2.4.36 without gui
You can use a programmatic way.
pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param);
This function gives ya the scheduling parameters, in the struct sched_param you can find the scheduling priority as an integer.
Use that and print it to the screen.
For a better explanation, please check this man page:
http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_setschedparam.3.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With