1
ps -ax
PID
1
2
.
.
.
1549
1564
1569
.
.
1716
1730
1759
有没有办法,我可以生成过程PIDS在decending顺序即用户级进程,系统级的过程,然后任何方式与strace他们lisiting所有PID
PID
1759
1730
1716
.
.
2
1
ps -ax
PID
1
2
.
.
.
1549
1564
1569
.
.
1716
1730
1759
有没有办法,我可以生成过程PIDS在decending顺序即用户级进程,系统级的过程,然后任何方式与strace他们lisiting所有PID
PID
1759
1730
1716
.
.
2
1
可以使用k
修改,以指定排序顺序。说:
ps axk-pid
将通过减少PIDs排序输出。
从man ps
:
k spec Specify sorting order. Sorting syntax is
[+|-]key[,[+|-]key[,...]]. Choose a multi-letter key
from the STANDARD FORMAT SPECIFIERS section. The "+"
is optional since default direction is increasing
numerical or lexicographic order. Identical to --sort.
Examples:
ps jaxkuid,-ppid,+pid
ps axk comm o comm,args
ps kstart_time -ef
此外,你可以为了控制显示的列使用-o
选项。说:
ps axk-pid -o pid
将只显示进程ID。