Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to change name of my processes in Ubuntu?

By
Pascal Tremblay
on 2/20/15, 3:35 PM 1,251 views

Hello all,

I'm now able to run 2 differents instances of Odoo on the same computer. How could I change de process name? It is alway « python »...

Thanks for your idea.

0

Pascal Tremblay

--Pascal Tremblay--
1312
| 5 2 7
Alma, Canada
--Pascal Tremblay--


Pascal Tremblay
On 2/28/15, 6:49 AM

Since I'm not able to rename process, I use this to kill particular process on my Ubuntu.

killall -v python -u odoo-test; (by user odoo-test)

 

 

Its safer to do a ps aux and then do a sudo kill -9 procesNumber. Then you're sure you're only killing that one process you'd like.

Yenthe
on 2/28/15, 7:58 AM
0
Jordan Vrtanoski
On 2/28/15, 7:32 AM

Linux/Unix way will be to use 

bash -c "exec -a MyUniqueProcessName <command> &"

however, THIS WILL NOT WORK due to the way odoo.py is executed. The shabang in the odoo.py (the #!/usr/bin/env python) is starting an instance of python which overrides the name of the process.

A workaround is to get  the PID of the process and store it in a file which you can later use to kill the process you want. Here is the most rudimentary example:

Crate file with name start_as.sh with following content:
#!/bin/bash
./odoo.py &
odoo_pid=$!
echo $odoo_pid >$1

Than you can use
./start_as.sh mynew.pid
kill `cat mynew.pid`

He he!!! it is surely not the first time you work in Bash... Thanks!

Pascal Tremblay
on 2/28/15, 7:36 AM

Well, bash is not pretty, but it saves time :)

Jordan Vrtanoski
on 2/28/15, 7:38 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/20/15, 3:35 PM
Seen: 1251 times
Last updated: 3/16/15, 8:10 AM