0

Does anyone know what are the measurement units for the metrics in /proc/<PID>/sched file in 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

whereas the counts are pretty much self explanatory, the times are not. Is it seconds, millisecond or microseconds? I'm especially interested in

se.statistics.iowait_sum           :         12593.039209

Thanks!

3

The values are displayed in milliseconds; they’re tracked in nanoseconds, and scaled by one million (see kernel/sched/debug.c). So

se.statistics.iowait_sum           :         12593.039209

means the process spent just over 12.5 seconds in I/O wait.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.