Files
tldr/pages.zh/linux/ionice.md

30 lines
946 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ionice
> 获取或设置程序的 I/O 调度类和优先级。
> 调度类1实时2最佳努力3空闲
> 优先级级别0最高 - 7最低
> 更多信息:<https://manned.org/ionice>。
- 以给定的调度类和优先级运行命令:
`ionice -c {{scheduling_class}} -n {{priority}} {{command}}`
- 设置特定 [p]id、[P]gid 或 [u]id 的正在运行进程的 I/O 调度[c]lass
`ionice -c {{scheduling_class}} -{{p|P|u}} {{id}}`
- 以自定义的 I/O 调度[c]lass 和优先级运行命令:
`ionice -c {{scheduling_class}} -n {{priority}} {{command}}`
- 忽略设置请求优先级失败的情况:
`ionice -t -n {{priority}} -p {{pid}}`
- 即使无法设置所需的优先级也运行命令(这可能是由于权限不足或旧内核版本导致的):
`ionice -t -n {{priority}} -p {{pid}}`
- 打印正在运行进程的 I/O 调度类和优先级:
`ionice -p {{pid}}`