views:

47

answers:

3

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?

+2  A: 

Use the -a switch:

pstree -p -a

to show process command line arguments.

Greg Hewgill
+1  A: 

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

Dan McDougall
A: 

although pstree is a good command i prefer ps fax which is more informative about commands

amin