6

Could some one direct me to a command or a way on Linux to measure the number of migrations experienced by a thread or a process? Thank you.

1 Answer 1

6

I'm not sure if you have a better tool, but you can use perf tool for that.

Perf is a profiler tool for Linux 2.6+ based systems that abstracts away CPU hardware differences in Linux performance measurements and presents a simple commandline interface. Perf is based on the perf_events interface exported by recent versions of the Linux kernel.

I have never personally used it, but on their website you have a tutorial and an output example of Counting with perf stat, where the number of migrations is part of the output.

I hope it helps.

2
  • Thank you very much. But the data getting from the tool is somewhat mysterious. So much variation from run to run.
    – samarasa
    Commented Jan 14, 2012 at 17:41
  • 2
    The data that you are collecting depends on a number of factors such as the load of your system, the scheduling policy, input/output operations etc. Most probably, the variations that you are obtaining in the data that you are analyzing are due to those factors.
    – CRM
    Commented Jan 14, 2012 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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