How to find out which python script is using resources?

Posted by Jesse the Wind Wanderer on Ask Ubuntu See other posts from Ask Ubuntu or by Jesse the Wind Wanderer
Published on 2013-06-29T09:08:59Z Indexed on 2013/06/29 10:29 UTC
Read the original article Hit count: 365

Filed under:
|
|
|
|

Can someone tell me how to find out which python script is using lots of system resources?

I can see with the 'top' command that a process called "python" is always near the top of the list.

2603 jesse     20   0  159m  27m  13m S    6  1.4   1:47.74 python

Can someone tell me how to find this specific python script's name?

I could go through the arduous process of disabling startup apps/processes until I finally found the one that starts this python process but there must be a better way of determining what exactly this python process is, yes?

Doing a ps -AH doesn't yield anything useful.

ps -AH

   1 ?        00:00:00 init
...
1325 ?        00:00:00   lightdm
1382 tty7     00:01:57     Xorg
2265 ?        00:00:00     lightdm
2510 ?        00:00:00       gnome-session
2546 ?        00:00:00         ssh-agent
2560 ?        00:00:02         gnome-settings-
2582 ?        00:00:01           syndaemon
2578 ?        00:00:49         compiz
3009 ?        00:00:00           sh
3010 ?        00:00:01             gtk-window-deco
2590 ?        00:00:00         nm-applet
2591 ?        00:00:00         bluetooth-apple
2592 ?        00:00:00         indicator-ubunt
2593 ?        00:00:00         gnome-fallback-
2600 ?        00:00:05         nautilus
2601 ?        00:00:00         everpad
2603 ?        00:02:24         python

© Ask Ubuntu or respective owner

Related posts about python

Related posts about scripts