Scheduler process info
Hello, is there a way to know if a process has been interrupted by the scheduler during his execution? I need to collect this info after the execution of the process itself. In other words, is there a way to get the file proc/pid/status after the dead of the process?
Sorry for my bad english.
Can you please try with this "echo $?" . For example
root@alex:# ls -l
-rw-r--r-- 1 root root 642 May 27 13:00 test.php
To see the previous command has successfullly executed or not you can use
"echo $?" and therefore the result will be
root@alex:# echo $?
For a unsuccessful execution of command or a script the result will be
root@alex:~# ls -T
ls: option requires an argument -- 'T'
Try `ls --help' for more information.
This command is unsuccessful so the result will be
root@alex:~# echo $?
By this way you can check the script or command has been successfully completed or not
Originally Posted by velan-support
First of all, thank you for the answer. I am not trying to see if the program is executed well or not (I assume it is), I want to know if during its life cycle it has been preempted by the scheduler. Maybe I had to use "preempted" instead of "interrupted" in the first post.
I think I've found the solution. I post the link in case someone needs too: stackoverflow.com/questions/9286009/context-switch-on-a-process