I have a process which in earlier release took some time.
Now the same process in the current release is taking more time. But there are no changes in the code when compared to earlier. One observation I saw is there are some other processes on the server which are consuming high cpu when compared to earlier releases. So I doubt my process is not getting the cpu time which is why it is taking more time.
But I need to prove this that the process is waiting(idle) for most of the time.
So for doing this i am thinking of using getrusage()
. But asI am not sure how do I calculate the process idle time using that.
Could anybody please tell me a simple example as to how to use getrusage
specifically for calculating the idle time of the process.
Thanks in advance.