RENICE(8)

πŸ“¦
version 329 Β· 2 versions
, in freebsd 15.1, nixpkgs unstable

πŸ’… RENICE(8) β€” like, the System Manager's Manual, bestie ✨

okay so real talk β€” this is renice from section 8 of the manual, and it's genuinely one of the most useful lil gremlins in your toolbox. buckle up πŸŽ€


🌸 NAME 🌸

renice β€” alters the priority of running processes. that's it. that's the whole vibe. she changes how much the scheduler cares about a process that's already running πŸ‘‘


✨ SYNOPSIS ✨

renice priority [[-gpu] target]
renice -n increment [[-gpu] target]

two moods, pick one, no cap πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

The renice utility alters the scheduling priority of one or more running processes. (running! already alive! not spawning new ones, we're doing a glow-up on the ones already here πŸ’…)

The following target parameters are interpreted as process ID's (that's the default, iykyk), process group ID's, user ID's, or user names. And like, the scoping is important:

  • the renice'ing of a process group causes all processes in the process group to have their scheduling priority altered 🌈
  • the renice'ing of a user causes all processes owned by the user to have their scheduling priority altered πŸ‘‘

The following options are available β€” here we go, main character energy:

  • -n β€” instead of changing the specified processes to the given priority, interpret the following argument as an increment to be applied to the current priority of each process. it's relative, babes, not absolute 🧚
  • -g β€” interpret target parameters as process group ID's.
  • -p β€” interpret target parameters as process ID's (this is the default, fyi).
  • -u β€” interpret target parameters as user names or user ID's.

now the part where the system is kinda strict with you 😭 β€” users other than the super-user may only alter the priority of processes they own, and can only monotonically increase their ``nice value'' within the range 0 to PRIO_MAX (20). (this prevents overriding administrative fiats β€” yes that's the actual reason, it's giving bureaucracy but make it scheduling πŸ“‹)

The super-user though? the super-user may alter the priority of any process, and set the priority to any value in the range PRIO_MIN (-20) to PRIO_MAX. absolute icon behavior πŸ‘‘

Useful priorities, ranked like a tier list πŸ†:

  • 20 β€” the affected processes will run only when nothing else in the system wants to. like, bottom of the group chat, last to be picked πŸ’€
  • 0 β€” the ``base'' scheduling priority. the neutral one. the beige one.
  • anything negative β€” to make things go very fast πŸ”₯

πŸŽ€ FILES πŸŽ€

  • /etc/passwd β€” to map user names to user ID's. that's her only job here, let her live 🫢

⭐ EXAMPLES ⭐

change the priority of process ID's 987 and 32, and all processes owned by users daemon and root. look at the mixing and matching, she ate:

renice +1 987 -u daemon root -p 32

πŸ”₯ SEE ALSO πŸ”₯

nice(1), rtprio(1), getpriority(2), setpriority(2)

(the whole friend group fr fr πŸ«‚)


πŸ‘‘ STANDARDS πŸ‘‘

The renice utility conforms to IEEE Std 1003.1-2001 (β€œPOSIX.1”). certified. standards-approved. iconic behavior only πŸ’…


🌈 HISTORY 🌈

The renice utility appeared in 4.0BSD. she's been doing this since forever, a true veteran πŸ•°οΈπŸ’–


πŸ’€ BUGS πŸ’€

Non super-users cannot increase scheduling priorities of their own processes, even if they were the ones that decreased the priorities in the first place.

like... not even to undo your own mess?? that's the whole bug. you dig the hole, you can't climb out, only the super-user has the ladder πŸ˜­πŸ™ˆ


and that's the whole page, bestie β€” go forth and renice responsibly πŸ¦‹πŸ’œ

this lil beauty is from the Debian fam, dated October 27, 2020, and it lives in section 8 of the manual. mwah πŸ“βœ¨

πŸ“¦ where this page comes from