The priority value of a process is called the nice value of the process, with a total of 40 different values (represented by numbers-20 to 19) The greater the Nice value, the lower the priority of the process.
The nice value of the process allows only the root user to set the negative nice, and the other user only allows the positive nice value to be set and can only be raised and not lowered.
view process Nice values1. Use top to view the nice value of the process NI represents the actual nice value of the process, and the PR displays the nice level as mapped to a larger priority queue 2. Nice value for viewing process using PS # PS Axo pid,comm,nice--sort=-nice Some process nice values are--that means these processes are running with different scheduling policies
set the nice value of a process1. When you start a process, specify its nice value (the Nice setting defaults to 10)
[Email protected] ~]# nice-n -Cat/dev/zero >/dev/NULL&[2]5045[[Email protected]~]# PS Axo pid,comm,nice |grep5045 5045Cat -[[Email protected]~]# Nice Cat/dev/zero >/dev/NULL&[3]5058[[Email protected]~]# PS Axo pid,comm,nice |grep5058 5058CatTen
2. Change the existing process nice value
[Email protected] ~]# renice-n-450455045New Priority-4 50455045 cat -4
RHCE7 managing the priority of the II-5 management process