linux - 如何调试此问题。chrt:未能设置 pid 14490 的策略:不允许操作
问题描述
chrt -p 14490
pid 14490's current scheduling policy: SCHED_OTHER
pid 14490's current scheduling priority: 0`
我正在尝试使用以下命令将此进程的调度优先级更改为 SCHED_RR 并遇到以下错误。
chrt -r -p 25 14490
chrt: failed to set pid 14490's policy: Operation not permitted
我该如何调试为什么会失败?
解决方案
您未能指定您的 Linux 版本... ...但这里有几个选项:
sysctl -w kernel.sched_rt_runtime_us=-1
https://lists.opensuse.org/opensuse-security/2011-04/msg00015.html
... 和 ...
我在虚拟化的 slackware 14.2 上进行了测试。没有错误。我从当前升级到 util-linux-2.28.2,然后我遇到了那个错误。
上游提交:https ://github.com/karelzak/util-lin...ec919bec94089f
将线程标记为已解决。
换句话说:
- 你可以试试
sysctl -w kernel.sched_rt_runtime_us=-1
- 但是至少有两个报告的实例表明这是一个错误:在 slackware 和 util-linux 中。这两种情况的解决方案都是更新 Linux 版本。
推荐阅读
- python - 我们可以在调用时设置 AWS python lambda 的环境变量吗
- javascript - 无法使输入默认按钮提交
- javascript - 如何处理 Unexpected use of comma operator no-sequences EsLINT 警告
- android - Android 11 生成 PDF、Excel 文件
- css - 用于在较小设备中从左侧缩小图像的 CSS
- node.js - 将 PDF 缓冲区转换为 PNG 缓冲区
- conda - 如何让 conda 正确检测我的 cuda 版本?
- machine-learning - 分类问题的强化学习?
- google-cloud-platform - Google AI Platform 错误:VM:对项目“PROJECT ID”的写访问被拒绝。如何允许写访问?
- java - 有没有办法使用私钥从签名数据中获取纯文本?