Reputation: 2579
I am trying to find the percentage of time a process has been in kernel routines since time it has started. The problem is that I am not sure what arguments I should be passing to the function: do_posix_clock_monotonic_gettime()
What am I meant to pass into this?
Thanks
Upvotes: 3
Views: 1447
Reputation: 4098
On Linux 2.6.39, do_posix_clock_monotomic_gettime
is defined as such in include/linux/time.h
:
#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
ktime_get_ts is implemented in kernel/time/timekeeping.c
. The comment above the implementation explains about the argument:
/**
* ktime_get_ts - get the monotonic clock in timespec format
* @ts: pointer to timespec variable
*
* The function calculates the monotonic clock from the realtime
* clock and the wall_to_monotonic offset and stores the result
* in normalized timespec format in the variable pointed to by @ts.
*/
Upvotes: 1