how to find running script in raspberry pi 3
<p>I have raspberry pi 3 and i m running python script at startup of raspberry pi using /etc/rc.local. I want to find which python script running in background so login using putty and i had run following command:</p>

<pre><code>ps aux|grep mail
</code></pre>

<p>so it displays two script running like following:</p>

<pre><code>root       593  0.0  0.3   7808  3076 ?        S    04:42   0:00 sudo python /usr/BCMaster/mail_captureimage_final.py
root       678  1.4  0.9  13220  9356 ?        S    04:42   0:07 python /usr/BCMaster/mail_captureimage_final.py
pi        1434  0.0  0.2   4280  1944 pts/0    S+   04:50   0:00 grep --color=auto mail
</code></pre>

<p>where mail_captureimage_final.py is my python script which i had put on startup of raspberry pi. So my question is why it is displaying two times? Plz help me. Thanks in advance.</p>

<p>Use <code>ps -alx</code> and look at the PID and PPID fields, you find that the 'sudo python' process is the parent of the 'python' process.  Sudo is an executable program that runs it's arguments as a sub-process.</p>

python windows putty raspberry-pi3