How set the Priority of a process
by
Giulio Ballardin
—
last modified
2006-05-19 09:49
Few lines to modify the priority of a process
To set the priority of a process:
> ps -ax
> prio xx pid
where:
- xx is the priority: 0 is the minimum and 255 is the Maximum
- pid is the id of the process
Example:
> prio 30 gdb -d /virgoDev/Sa/EServerDSP/v3r12p1/src /virgoDev/Sa/EServerDSP/v3r12p1/RIO806X/ESDSP.exe 147
Otherwise it's possibile set the priority in the code:
int main(int argc, char* argv[])
{
.....
.....
setpriority(witch, who, prio);
}
For more details use online manual of Linux:
> man setpriority