3 回答
TA贡献1845条经验 获得超8个赞
/proc/<PID>/stat
Documentation/filesystems/proc.txt
Table 1-3: Contents of the stat files (as of 2.6.22-rc3)
..............................................................................
Field Content
pid process id
tcomm filename of the executable
state state (R is running, S is sleeping, D is sleeping in an
uninterruptible wait, Z is zombie, T is traced or stopped)
ppid process id of the parent process
pgrp pgrp of the process
sid session id
tty_nr tty the process uses
tty_pgrp pgrp of the tty
flags task flags
min_flt number of minor faults
cmin_flt number of minor faults with child's
maj_flt number of major faults
cmaj_flt number of major faults with child's
utime user mode jiffies
stime kernel mode jiffies
cutime user mode jiffies with child's
cstime kernel mode jiffies with child's
utime
stime
cpu
/proc/stat
cpu 192369 7119 480152 122044337 14142 9937 26747 0 0
time_total
utime
stime
time_total
/proc/stat
user_util = 100 * (utime_after - utime_before) / (time_total_after - time_total_before); sys_util = 100 * (stime_after - stime_before) / (time_total_after - time_total_before);
- 3 回答
- 0 关注
- 887 浏览
添加回答
举报