I have a program that runs serval hours. Is there any way to know cpu times of all threads, including threads that already died long before the process terminated.
Yes, that's the default behaviour of time and similar programs. In fact, it's harder to get the time spent on individual threads than getting the whole process's time.
Yes, that's the default behaviour of
time
and similar programs. In fact, it's harder to get the time spent on individual threads than getting the whole process's time.