Hi,
I am looking for information about optimizing the performance of my raspberry pi's program. There are really useful two commands that change the priority of my program: chrt and nice
I want to use them to get better performance but I do not know how I have to use. I have a script to run my program that executes:
1. sudo nice -n-20 ./MyProgram
Then, manually I set chrt command but the way I set it is not very comfortable. I have to run top command an see my program's PID number, for example 835. So now, I set chrt command.
2. sudo chrt -f -p 99 835
The problem is that when I set the second command (the priority is changed, I see in top window), my program give up writing in a csv (it is what It should do), and the other problem is that I want to do all this process automatically (set chrt command).
Any help would be very appreciate.

