Linux
/proc/PID/sched 測量單位
/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
謝謝!
這些值以毫秒為單位顯示;它們在納秒內被跟踪,並按一百萬縮放(請參閱 參考資料
kernel/sched/debug.c
)。所以se.statistics.iowait_sum : 12593.039209
意味著程序在 I/O 等待中花費了超過 12.5 秒。