有谁知道如何使用 procps-3.2.8 来列出 ubuntu/linux 的所有运行进程? 以及如何使用 procps-3.2.8 杀死它们?
请提供分步过程并提供有关procps 的有用链接。
最佳答案
procps 是包含提供的许多命令行实用程序的包。您可以在以下位置的 procpcs 下找到有关每个实用程序选项的完整信息:
在主页上我们可以获得以下关于procps的信息:
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.*
http://www.linuxfromscratch.org/lfs/view/7.2/chapter06/procps.html
http://procps.sourceforge.net/
How to use procps-3.2.8 in listing all the running processes?
ps 是 procps 包的一部分,有很多方法可以列出所有正在运行的进程(有关详细信息,请执行 man ps) .
mantosh@mantosh4u:~/practice$ ps -V
procps version 3.2.8
mantosh@mantosh4u:~/practice$ ps -AF
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 1 0 0 6143 2544 3 14:38 ? 00:00:00 /sbin/init
root 2 0 0 0 0 1 14:38 ? 00:00:00 [kthreadd]
.............................................................................
root 3320 2 0 0 0 0 15:13 ? 00:00:00 [kworker/u:2]
root 3334 2 0 0 0 1 15:18 ? 00:00:00 [kworker/1:0]
How to kill them using procps-3.2.8?
pkill 是 procps 包的一部分,它包含许多用于终止进程的命令行选项。有关详细信息,请在您的终端上man pkill。
mantosh@mantosh4u:~/practice$ pkill -V
pkill (procps version 3.2.8)
mantosh@mantosh4u:~/practice$ pkill -f gedit
在上面的例子中,gedit 是被杀死的进程名。
关于linux - 如何使用 procps-3.2.8 列出所有正在运行的进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23040679/