Hands-on Lab·Red Hat Certified System Administrator
Process Priority with nice and renice
A one-line objective with one genuinely non-obvious rule: a normal user can make their own process nicer but cannot make it greedier again, not even back to where it started. Both directions are attempted here and the permission error is real.
Operating Running Systems Guide 26 of 67 Intermediate
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 11 min
Nice values run from -20 (most favourable) to 19 (least). The PRI column that ps shows is derived from it and moves the opposite way, which is why raising NI lowers PRI. Only NI is settable.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
This guide includes
Use this for a one-line objective with one genuinely non-obvious rule. This matters because an unprivileged user may only move a niceness in one direction, and never back again.
- reading where a process starts, and what its niceness is
- finding which way an unprivileged user is permitted to move it
- setting it at launch with
nice
Before you start
- A sudo-capable account.
- The session reuses the CPU-burning process from guide 25 and cleans it up.
-
Where a process starts
-
Which way an unprivileged user may move it
-
Setting it at launch