Find out why a running process dies

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?







share|improve this question






















  • The answer should be in the logs! What OS is this?
    – George Udosen
    Dec 24 '17 at 12:08











  • Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:20










  • Each process is a python script.
    – Miguel
    Dec 24 '17 at 12:28










  • stackoverflow.com/questions/25678978/…
    – dirkt
    Dec 25 '17 at 9:07














up vote
0
down vote

favorite












I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?







share|improve this question






















  • The answer should be in the logs! What OS is this?
    – George Udosen
    Dec 24 '17 at 12:08











  • Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:20










  • Each process is a python script.
    – Miguel
    Dec 24 '17 at 12:28










  • stackoverflow.com/questions/25678978/…
    – dirkt
    Dec 25 '17 at 9:07












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?







share|improve this question














I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?









share|improve this question













share|improve this question




share|improve this question








edited Dec 25 '17 at 9:07









dirkt

14.1k2931




14.1k2931










asked Dec 24 '17 at 12:01









Miguel

101




101











  • The answer should be in the logs! What OS is this?
    – George Udosen
    Dec 24 '17 at 12:08











  • Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:20










  • Each process is a python script.
    – Miguel
    Dec 24 '17 at 12:28










  • stackoverflow.com/questions/25678978/…
    – dirkt
    Dec 25 '17 at 9:07
















  • The answer should be in the logs! What OS is this?
    – George Udosen
    Dec 24 '17 at 12:08











  • Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:20










  • Each process is a python script.
    – Miguel
    Dec 24 '17 at 12:28










  • stackoverflow.com/questions/25678978/…
    – dirkt
    Dec 25 '17 at 9:07















The answer should be in the logs! What OS is this?
– George Udosen
Dec 24 '17 at 12:08





The answer should be in the logs! What OS is this?
– George Udosen
Dec 24 '17 at 12:08













Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
– Miguel
Dec 24 '17 at 12:20




Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
– Miguel
Dec 24 '17 at 12:20












Each process is a python script.
– Miguel
Dec 24 '17 at 12:28




Each process is a python script.
– Miguel
Dec 24 '17 at 12:28












stackoverflow.com/questions/25678978/…
– dirkt
Dec 25 '17 at 9:07




stackoverflow.com/questions/25678978/…
– dirkt
Dec 25 '17 at 9:07










1 Answer
1






active

oldest

votes

















up vote
2
down vote













you should trace your process by Strace Commande :



strace -p <PID> -o <OUTPUT_FILE>


or



sudo strace -p <PID> -o <OUTPUT_FILE>


in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.






share|improve this answer




















  • My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:38






  • 1




    Sorry, I end up installing it. Ok, thank you.
    – Miguel
    Dec 24 '17 at 12:40










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412799%2ffind-out-why-a-running-process-dies%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













you should trace your process by Strace Commande :



strace -p <PID> -o <OUTPUT_FILE>


or



sudo strace -p <PID> -o <OUTPUT_FILE>


in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.






share|improve this answer




















  • My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:38






  • 1




    Sorry, I end up installing it. Ok, thank you.
    – Miguel
    Dec 24 '17 at 12:40














up vote
2
down vote













you should trace your process by Strace Commande :



strace -p <PID> -o <OUTPUT_FILE>


or



sudo strace -p <PID> -o <OUTPUT_FILE>


in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.






share|improve this answer




















  • My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:38






  • 1




    Sorry, I end up installing it. Ok, thank you.
    – Miguel
    Dec 24 '17 at 12:40












up vote
2
down vote










up vote
2
down vote









you should trace your process by Strace Commande :



strace -p <PID> -o <OUTPUT_FILE>


or



sudo strace -p <PID> -o <OUTPUT_FILE>


in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.






share|improve this answer












you should trace your process by Strace Commande :



strace -p <PID> -o <OUTPUT_FILE>


or



sudo strace -p <PID> -o <OUTPUT_FILE>


in OUTPUT_FILE you will find all Informations about the execution of your Python Script and you can have some information about what causes their ends.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 24 '17 at 12:34









Hamza Jabbour

41117




41117











  • My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:38






  • 1




    Sorry, I end up installing it. Ok, thank you.
    – Miguel
    Dec 24 '17 at 12:40
















  • My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
    – Miguel
    Dec 24 '17 at 12:38






  • 1




    Sorry, I end up installing it. Ok, thank you.
    – Miguel
    Dec 24 '17 at 12:40















My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
– Miguel
Dec 24 '17 at 12:38




My OS don't have that command. Is there any alternative? I'm using Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
– Miguel
Dec 24 '17 at 12:38




1




1




Sorry, I end up installing it. Ok, thank you.
– Miguel
Dec 24 '17 at 12:40




Sorry, I end up installing it. Ok, thank you.
– Miguel
Dec 24 '17 at 12:40












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412799%2ffind-out-why-a-running-process-dies%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?