Question

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?

Was it helpful?

Solution

Use the -a switch:

pstree -p -a

to show process command line arguments.

OTHER TIPS

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top