Linux command
ionice 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Example
ionice -c [1|2|3] -n [0-7] [command]
Example
ionice -c [class] -p [pid]
ionice -p [pid]
Example
ionice -c 3 [command]
Ignore
ionice -t -n [priority] -p [pid]
说明
ionice gets or sets the I/O scheduling class and priority for a process. This controls how disk I/O requests are scheduled relative to other processes. Scheduling classes: - Realtime (1) - Highest priority, guaranteed I/O access (requires root) - Best-effort (2) - Default class, shares I/O fairly based on priority - Idle (3) - Only gets I/O time when no other process needs it
参数
- -c, --class _CLASS_
- Scheduling class: 1 (realtime), 2 (best-effort), 3 (idle)
- -n, --classdata _LEVEL_
- Priority level within class: 0 (highest) to 7 (lowest)
- -p, --pid _PID_
- Apply to process with given PID
- -P, --pgid _PGID_
- Apply to process group
- -u, --uid _UID_
- Apply to all processes owned by user
- -t, --ignore
- Ignore failures to set priority
FAQ
What is the ionice command used for?
ionice gets or sets the I/O scheduling class and priority for a process. This controls how disk I/O requests are scheduled relative to other processes. Scheduling classes: - Realtime (1) - Highest priority, guaranteed I/O access (requires root) - Best-effort (2) - Default class, shares I/O fairly based on priority - Idle (3) - Only gets I/O time when no other process needs it
How do I run a basic ionice example?
Run `ionice -c [1|2|3] -n [0-7] [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c, --class _CLASS_ do in ionice?
Scheduling class: 1 (realtime), 2 (best-effort), 3 (idle)