I'm running a script that executes either:
./ide.py
# or
python ./ide.py
After that I use pstree -p | grep ide.py
to check, but I only found a Python process. If I have many Python scripts running, how can I distinguish them from each other?
I'm running a script that executes either:
./ide.py
# or
python ./ide.py
After that I use pstree -p | grep ide.py
to check, but I only found a Python process. If I have many Python scripts running, how can I distinguish them from each other?
Use the -a
switch:
pstree -p -a
to show process command line arguments.
You need to run the pstree command with the "-a" switch to show command line arguments. Here's why:
All python scripts are run through the python interpreter... Even if you run them directly (i.e. ./ide.py).
although pstree is a good command i prefer ps fax which is more informative about commands