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.
Find system idle time using any system call in microseconds
linux;linux kernel;performance;c;system calls