Reputation: 31
If I have a program written as follow:
void main() {
//some code
printf(" hi \n");
checkpoint1(); <-------- checkpoint1
//some Code with no dependency on other program/task or HW IO
checkpoint2(); <-------- checkpoint2
printf(" test end \n");
//some code
return;
}
is there any Linux API or a way in Linux that I can use to find out what task and process (including background programs, daemons and services) are running on all cores in between the checkpoints and for how long they are running ?
Edit: basically the problem is I have a program running in Linux where between the 2 checkpoint randomly will take too long to complete, and the program is not depending on other task/process or hardware IO, so I would like to debug this issue.
would be nice if there is a solution with detail or API or websites links to the solution.
Upvotes: 0
Views: 58