In my process list under Ubuntu (using top
/System Monitor
) one of the largest memory hogs (200+Mb) was python
. I searched a bit for one of my programs to be the cause until I realised this was my Python IDE (Wing), which itself is written in Python.
I thought I could change the name of the program by inserting setproctitle from the setproctitle package, but the python version that Wing is using is different from my own. setproctitle
needs to be compiled and the python that wing uses is not a full installation (I asked Wing Support but they are unlikely to change that/incorporate setproctitle).
setproctitle
can only change the name of the running process, so I could not make a script that starts Wing and then change the process name either.
After that I tried to write to /proc/PIDNUM/comm, but although that 'file' is 'rw', I am not allowed to write there.
I finally found a, not-so-portable, solution for this particular case. But I would like to know if there is a standard way of changing the process name of another (possible a child-) process with a Linux system call.
$!
? – Bratchley Apr 26 '13 at 14:03python setup.py install
. – Anthon Apr 26 '13 at 14:31