当我在输出后读取stat文件时
15465(out1)S 15290 15465 15290 34817 15465 4202496 185 0 0 0 0 0 0 0 20 0 1 0 1505506 4263936 89 18446744073709551615 4194304 4196524 140733951429456 140733951428040 139957189597360 0 0 0 0 18446744071582981369 0 0 17 1 0 0 0 0 0 6295080 6295608 23592960 140733951431498 140733951431506 140733951431506 140733951434736 0
即。那里有52条线......而在man proc中,大约有44条线。 为什么要提供这些额外信息?
任何人都可以详细说明。我正在研究Ubuntu 12.04,内核是3.5.0-40-generic。
答案 0 :(得分:1)
以下是构成/proc/[pid]/stat
文件内容
http://lxr.free-electrons.com/source/fs/proc/stat.c?v=3.5#L74
答案 1 :(得分:0)
这里有关于统计内容的非常好的文档:
Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
..............................................................................
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
priority priority level
nice nice level
num_threads number of threads
it_real_value (obsolete, always 0)
start_time time the process started after system boot
vsize virtual memory size
rss resident set memory size
rsslim current limit in bytes on the rss
start_code address above which program text can run
end_code address below which program text can run
start_stack address of the start of the main process stack
esp current value of ESP
eip current value of EIP
pending bitmap of pending signals
blocked bitmap of blocked signals
sigign bitmap of ignored signals
sigcatch bitmap of caught signals
0 (place holder, used to be the wchan address, use /proc/PID/wchan instead)
0 (place holder)
0 (place holder)
exit_signal signal to send to parent thread on exit
task_cpu which CPU the task is scheduled on
rt_priority realtime priority
policy scheduling policy (man sched_setscheduler)
blkio_ticks time spent waiting for block IO
gtime guest time of the task in jiffies
cgtime guest time of the task children in jiffies
start_data address above which program data+bss is placed
end_data address below which program data+bss is placed
start_brk address above which program heap can be expanded with brk()
arg_start address above which program command line is placed
arg_end address below which program command line is placed
env_start address above which program environment is placed
env_end address below which program environment is placed
exit_code the thread's exit_code in the form reported by the waitpid system call
..............................................................................