title: Is there a way to monitor what cause program shut down in linux for python script?
body: <p>I am trying to figure why sometimes my python script randomly receives <code>SIGINT</code> from the linux host.</p>
  
  <p>What is the usually way to debug this problem</p>
  
  <p>I am currently using</p>
  
  <pre><code>nohup python my_script.py &gt; /dev/null 2&gt;&amp;1&amp;
  </code></pre>
  
  <p>and have since switch to </p>
  
  <pre><code>nohup python my_script.py &gt; myprogram.out 2&gt; myprogram.err&amp;
  </code></pre>
  
  <p>Is there other log and channel I can inspect why the linux host is sending termination command to the script?</p>
  
  <p>I am using aws ec2 instances.</p>