Linux 상자에서 ps -ef를 수행하면 다음이 표시됩니다. UID PID PPID C STIME TTY TIME CMD
C,TIME의 의미를 알려주세요. TIME 은 프로세스에 할당된 실제 CPU 시간인가요?
답변1
실행한 man ps
후 를 입력 하면 /SpaceShift+CSpaceEnter다음 줄이 표시됩니다.
C pcpu cpu utilization
하지만 그것은 OBSOLETE SORT KEYS
헤더 아래에 있으므로 우리가 찾고 있는 것이 아닙니다.
n
다음 일치 항목을 찾으려면 누르세요 .
c C processor utilization. Currently, this is the
integer value of the percent usage over the
lifetime of the process.
(see %cpu).
맞는 것 같네요. 자세한 내용은 다음을 검색하여 %cpu
찾아보세요.
%cpu %CPU cpu utilization of the process in "##.#" format.
Currently, it is the CPU time used divided by the
time the process has been running cputime/realtime
ratio), expressed as a percentage. ...
(alias pcpu).
두 개의 일치 항목이 있지만 형식 TIME
과 일치하는 항목은 하나만 있습니다 hh:mm:ss
.
cputime TIME cumulative CPU time, "[DD-]hh:mm:ss" format. (alias time).
누적 CPU 시간은 프로세서가 프로세스를 실행하는 데 소비한 시간입니다. 즉, 실제로 CPU 주기를 사용하고 휴면 상태가 아니며 실행을 기다리거나 I/O를 기다리는 시간입니다.
에 설명된 utime
및 값을 합산하여 결정됩니다.stime
proc(5) 매뉴얼 페이지.
utime %lu Amount of time that this process has been scheduled in user mode...
stime %lu Amount of time that this process has been scheduled in kernel mode...