she*_*wen 5 process top cpuinfo
我的系统出现问题,phantomjs
在完成工作后仍然运行。为了调试这个问题,两天前我重新启动了系统:
今天跑步的时候top
看到了这个:
如果我理解正确,这两个phantomjs
过程已经存在大约 5 天了。所以他们以某种方式在重启后幸存下来?
Byt*_*der 11
来自man top
,“3a. 字段说明”部分:
29. TIME -- CPU Time
Total CPU time the task has used since it started. When Cumulative
mode is On, each process is listed with the cpu time that it and its
dead children have used. You toggle Cumulative mode with `S', which
is both a command-line option and an interactive command.
See the `S' interactive command for additional information regarding
this mode.
30. TIME+ -- CPU Time, hundredths
The same as TIME, but reflecting more granularity through hundredths
of a second.
Run Code Online (Sandbox Code Playgroud)
CPU 时间是指单个 CPU 内核忙于处理此任务或(如果开启累积模式)其任何子进程的时间。
这意味着 CPU 时间与挂墙时间完全没有关系,它当然可以短于进程在挂墙时间中运行的时间(如果它不是一直使用完整的 CPU 内核),但也可以是比实际进程运行时间长(如果您有一个多核 CPU 并且该进程使用其中一个以上)。
use*_*274 10
该TIME+
列不是以小时和分钟为单位的挂钟时间,而是以分钟和秒(百分之一秒)为单位消耗的 CPU 时间。您的屏幕截图显示了两个 phantomjs 进程,每个进程使用了两个多小时的 CPU 时间。