renice
Overview
The renice
command alters the scheduling priority of running processes. It allows you to change the niceness (priority) of one or more running processes.
Syntax
renice priority [[-p] pid...] [[-g] pgrp...] [[-u] user...]
Common Options
Option | Description |
---|---|
-n |
Priority value |
-p |
Process IDs |
-g |
Process groups |
-u |
Users |
-h |
Show help |
-v |
Verbose mode |
--version |
Show version |
Priority Values
Value | Priority |
---|---|
-20 | Highest |
-10 | High |
0 | Normal |
10 | Low |
19 | Lowest |
Key Use Cases
- Adjust priority
- Resource control
- Performance tuning
- System optimization
- Process management
Examples with Explanations
Example 1: Process Priority
renice +5 -p 1234
Lower process priority
Example 2: User Processes
renice +10 -u username
Adjust user priorities
Example 3: Process Group
renice -5 -g 100
Higher group priority
Common Usage Patterns
Single process:
renice -n 10 -p PID
Multiple PIDs:
renice 5 -p PID1 PID2
User processes:
renice -n 15 -u user
Priority Management
- Current priority
- Adjustment limits
- User restrictions
- System impact
- Process groups
Additional Resources
Best Practices
- Check limits
- Monitor impact
- Document changes
- Test settings
- Regular review
Security Considerations
- User permissions
- System resources
- Priority limits
- Process control
- Resource abuse
Troubleshooting
- Permission denied
- Priority limits
- System load
- Process behavior
- Resource conflicts
System Impact
- CPU scheduling
- Process priority
- System load
- User experience
- Resource sharing