- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在使用 busybox 版本的 linux 并想检查进程调度策略。 PS
输出仅显示 PID USER VSZ STAT COMMAND
,而不考虑 PS
命令给出的任何选项。有没有其他方法可以查看进程调度策略?
提前致谢!
最佳答案
您可以通过查看/proc/pocess_id/sched
找到进程的调度信息。
例如:
awk '/policy/ {print $NF}' /proc/25/sched
将为您提供进程 25
的策略编号。
更多的保单号可以看man sched_setscheduler
:
Scheduling Policies:
...
For threads scheduled under one of the normal scheduling policies
(SCHED_OTHER, SCHED_IDLE, SCHED_BATCH), sched_priority is not used
in scheduling decisions (it must be specified as 0).
Processes scheduled under one of the real-time policies
(SCHED_FIFO, SCHED_RR) have a sched_priority value in the range 1
(low) to 99 (high). (As the numbers imply, real-time threads
always have higher priority than normal threads.) Note well:
POSIX.1-2001 requires an implementation to support only a minimum
32 distinct priority levels for the real-time policies, and some
systems supply just this minimum. Portable programs should
use sched_get_priority_min(2) and sched_get_priority_max(2) to
find the range of priorities supported for a particular policy.
关于linux - 如何查看 `ps` 输出以外的进程调度策略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23487699/
我在 tomcat 8.0.24 上运行 Atlassian Bitbucket,在 Ubuntu 14.04.5 LTS 上运行 Java 1.8.0 31-b13(64 位),内核 3.13.0-
docker命令reference for ps提到 docker ps -a docker ps --all 命令显示所有容器的列表。 在docker上工作时,我错误地使用了以下命令 docker
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
docker ps 不让我知道容器本身的 pid。在主机上运行的 docker ps 和 ps 的输出之间进行命令字符串匹配并不是万无一失的,因为我可以在主机上运行相同的命令。 有没有人有确定的方法将
如何通过命令“ps”或“ps -ef”知道进程是在后台运行还是在前台运行? 我首先想到的是,当我输入 ps -ef 时,有一个名为 TTY 的部分。 当我查看 TTY 列表时,大多数都是“?” (问号
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我正在使用带有 3 个文件的 GUI 编写 PowerShell 脚本: window1.ps1 - 输入变量并启动start.vbs start.vbs - 启动window2.ps1 window
这似乎是一个愚蠢的问题,但我一直无法找到明确的答案。 This website指出破折号是可选的 ps aux 然而,ps aux有效但 ps -aux出现错误 no user named 'x' .
我有一个 bash 脚本 (ScreamDaemon.sh),在其中添加了检查它的示例是否已经运行的检查。 numscr=`ps aux | grep ScreamDaemon.sh | wc -l`
我需要解释一下 ps -ef 命令的四个字段(4 或 0),这个数字的含义谢谢你 root 27116 27112 4 15:25 pts/0 00:00:00 grep -qsRw -m1 moni
我刚开始学习 linux 命令,请帮助我找出 ps -ef 和 ps -ef | 之间的区别 | linux 中的 more 命令 最佳答案 与 ps -ef | more你管| ps 的输出至 mo
# ps | grep safe 14592 root 136m S /tmp/data/safe/safe 16210 root 1664 S grep safe
我有一个 bash 脚本 (ScreamDaemon.sh),在其中添加了检查它的示例是否已经运行的检查。 numscr=`ps aux | grep ScreamDaemon.sh | wc -l`
为什么 docker compose 创建的容器只能从 docker-compose ps 访问并且在杀死正在运行的容器后仍然存在? 最佳答案 不是。 docker ps只显示正在运行的容器,dock
我试图在 unix 框中找到所有正在运行的 java 进程。我很困惑 ps –ef|grep java 和 ps –ef|grep *.java 哪一个是正确的,确切的区别是什么? PS:两者都返回不
给定一个 pid 数组和代码: for i in ${listedPids[@]} do runningCheck="ps -u $USER | grep $i"
我的 PowerShell 配置文件 (CurrentUser.AllHosts) 中有两个脚本让我抓狂,因为它们在看似相同的控制台上给出了不同的结果。在 Powershell(提升版)上,脚本没有任
对于我正在创建的 python 脚本,我需要先获取进程的 PID(基于其名称),然后使用其 PID、持续时间从该进程获取,从下面的打印输出中,将是“00:00:00” root 5686
前言 大家好,我是 god23bin。欢迎来到《 一分钟学一个 Linux 命令 》系列, 每天只需一分钟,记住一个 Linux 命令不成问题 。今天要说的是 ps 命令。
我发现 ps aux 列出了当前正在运行的进程,我发现其他人提到了 ps auxwww .我想知道这是什么意思?或者它有什么作用? ps aux有什么区别和 ps auxwww ? 最佳答案 引用 m
我是一名优秀的程序员,十分优秀!