0

For the perf analysis and to make decision based on system and app performance I need to find the idle time of system. I want the precise value in microseconds.

I know that I can get the value in jiffies using procfs /proc/uptime but I heard reading procfs has extra overhead and can be slow as these files are created on demand basis.

Please correct me if I am wrong but this value is in jiffies which is not as precise as value return by function clock_gettime which I am using to query system uptime(CLOCK_BOOTTIME), process's and thread's time spent in kernel and system. Same thing applies to /proc/stat (value is in jiffies)

I am asking any other any way to query the process idle time and since other value (uptime. kernel/user space time is in mico-sec) so I was expecting the idle time in microseconds only.

Any help and comments would be appreciated.

  • 1
    If you care about microseconds, then give your definition of the idle time of system of precision matching the unit chosen. – Incnis Mrsi Sep 14 '15 at 10:35
  • I am newbie so If you think I am doing something wrong or talking nonsense, please correct me :-) – Pointer Sep 14 '15 at 10:46
  • The fact is: i don't understand what is your question ! – netmonk Sep 14 '15 at 11:41
  • I am asking any other any way to query the process idle time and since other value (uptime. kernel/user space time is in mico-sec) so I was expecting the idle time in microseconds only. – Pointer Sep 14 '15 at 11:50

Your Answer

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

Browse other questions tagged or ask your own question.