What does process priority control?
How aggressively a process competes for CPU time.
What is niceness in Linux?
A value that influences process scheduling priority.
What is the range of niceness values?
From -20 (highest priority) to 19 (lowest priority).
What does the nice command do?
Sets the initial niceness value when launching a process.
Syntax for nice command?
nice [-n adjustment] command [arguments…]
Example of nice command?
nice -n 15 tar -czf /srv/backups/home-$(date +%F).tgz /home
What does -n 15 mean in nice command?
Sets niceness to 15.
What does tar -czf do?
Creates a compressed archive.
What is /srv/backups/home-$(date +%F).tgz?
The output archive file.
What directory is being backed up in the example?
/home.
How to monitor niceness of a process?
Use ps -o pid,ni,cmd -C tar.
Example output of ps command?
10234 15 tar -czf /srv/backups/home-2025-04-30.tgz /home
What does the renice command do?
Modifies niceness value of an already running process.
What privilege is required to raise priority?
Super-user privileges.
Syntax for renice command?
renice [-n adjustment] { -p pid | -g pgid | -u user }
Example of renice command?
sudo renice -n -5 -p 10234
What does sudo do in renice example?
Grants super-user privileges.
What does -n -5 mean in renice command?
Sets new niceness value 5 points higher in priority.
What does -p 10234 mean in renice command?
Targets process ID 10234.
Example output of renice command?
10234 old priority 15, new priority 10.