/proc/<PID>/sched
有谁知道Linux文件中的指标的测量单位是什么?
cat /proc/1277/sched
flush-202:32 (1277, #threads: 1)
---------------------------------------------------------
se.exec_start : 7969759448.265086
se.vruntime : 282810360.009524
se.sum_exec_runtime : 121710.613450
se.statistics.wait_start : 0.000000
se.statistics.sleep_start : 7969759448.265086
se.statistics.block_start : 0.000000
se.statistics.sleep_max : 5005.885001
se.statistics.block_max : 9270.821298
se.statistics.exec_max : 3.988085
se.statistics.slice_max : 12.407345
se.statistics.wait_max : 12.008414
se.statistics.wait_sum : 11067.153244
se.statistics.wait_count : 1611854
se.statistics.iowait_sum : 12593.039209
se.statistics.iowait_count : 2
se.nr_migrations : 17755
se.statistics.nr_migrations_cold : 0
se.statistics.nr_failed_migrations_affine: 0
se.statistics.nr_failed_migrations_running: 58593
se.statistics.nr_failed_migrations_hot: 2
se.statistics.nr_forced_migrations : 0
se.statistics.nr_wakeups : 1593915
se.statistics.nr_wakeups_sync : 0
se.statistics.nr_wakeups_migrate : 0
se.statistics.nr_wakeups_local : 1593912
se.statistics.nr_wakeups_remote : 3
se.statistics.nr_wakeups_affine : 0
se.statistics.nr_wakeups_affine_attempts: 3
se.statistics.nr_wakeups_passive : 0
se.statistics.nr_wakeups_idle : 0
avg_atom : 0.076350
avg_per_cpu : 6.855004
nr_switches : 1594100
nr_voluntary_switches : 1593916
nr_involuntary_switches : 184
se.load.weight : 1024
policy : 0
prio : 120
clock-delta : 129
虽然计数几乎是不言自明的,但时间却不然。是秒、毫秒还是微秒?我特别感兴趣
se.statistics.iowait_sum : 12593.039209
谢谢!
答案1
值以毫秒为单位显示;它们以纳秒为单位进行跟踪,并按百万级缩放(请参阅kernel/sched/debug.c
)。所以
se.statistics.iowait_sum : 12593.039209
表示进程在 I/O 等待中花费了 12.5 秒多一点。