Running Orbited in the background

40 views
Skip to first unread message

Philip Bennefall

unread,
May 19, 2012, 12:19:43 PM5/19/12
to orbite...@googlegroups.com
Hi all,
 
I am trying to run Orbited2 as a background service on Ubuntu 10.04. I do the following.
 
orbited2 &
 
And usually get back a job ID of 1. So then I say:
 
disown %1
 
This works for other executable programs on Linux, such as the TCP backend server that I wrote using Boost Asio. That server just keeps running for months after I close the shell. But Orbited2 seems to shut down after only a few seconds after I close the terminal. Not immediately, but within 1 minute or so. I ran:
 
orbited2 >testlog.txt &
 
But this only prints out the regular startup message - no errors.
 
Does anyone have any tips?
 
Thanks in advance.
 
Kind regards,
 
Philip Bennefall

François Delpierre

unread,
May 21, 2012, 3:40:01 PM5/21/12
to orbite...@googlegroups.com
Hi,

In order :
  1. First let's check that orbited2 has no "deamon" mode or option.
  2. Check with the nohup linux command. 
  3. You can also use screen if you want to keep control over it. (BTW, I highly recommend screen, spending an hour to understand it and read the doc is really worth.)
Regards,

François Delpierre

unread,
May 21, 2012, 3:43:55 PM5/21/12
to orbite...@googlegroups.com
Ah, for the missing error in your file, you have to redirect file descriptor 2 also to your file, by adding 2>&1 after your command :
orbited2 > testlog.txt 2>&1

(The &1 stands for "send copy to output 1, already redirected to the file).
This has nothing to do with orbited, this is unix generality.

Philip Bennefall

unread,
May 21, 2012, 3:47:20 PM5/21/12
to orbite...@googlegroups.com
Thank you for the information. I got a tip to use screen yesterday and I have it working fine now.
 
Kind regards,
 
Philip Bennefall
--
You received this message because you are subscribed to the
Orbited discussion group.
To post, send email to
<orbite...@googlegroups.com>
To unsubscribe, send email to
<orbited-user...@googlegroups.com>
For more options, visit
<http://groups.google.com/group/orbited-users>

Niklas B

unread,
May 22, 2012, 5:28:40 AM5/22/12
to orbite...@googlegroups.com, Philip Bennefall
This is the command I run when not using screen (for orbited 0.8):

nohup orbited --config=/etc/orbited.cfg &> /home/user/logs/orbited.log &

And I use this cronjob to make sure Orbited is running (i.e restart if not):

if [ `ps ax|grep orbited|grep '/etc/orbited.cfg'|grep python|wc -l` = 0 ]
then
nohup orbited --config=/etc/orbited.cfg &> /home/user/logs/orbited.log &
fi

On Monday, May 21, 2012 9:47:20 PM UTC+2, Philip Bennefall wrote:
Thank you for the information. I got a tip to use screen yesterday and I have it working fine now.
 
Kind regards,
 
Philip Bennefall
----- Original Message -----
Sent: Monday, May 21, 2012 9:43 PM
Subject: Re: [Orbited] Running Orbited in the background

Ah, for the missing error in your file, you have to redirect file descriptor 2 also to your file, by adding 2>&1 after your command :
orbited2 > testlog.txt 2>&1

(The &1 stands for "send copy to output 1, already redirected to the file).
This has nothing to do with orbited, this is unix generality.

On Mon, May 21, 2012 at 9:40 PM, François Delpierre <francois....@gmail.com> wrote:
Hi,

In order :
  1. First let's check that orbited2 has no "deamon" mode or option.
  2. Check with the nohup linux command. 
  3. You can also use screen if you want to keep control over it. (BTW, I highly recommend screen, spending an hour to understand it and read the doc is really worth.)
Regards,

--
You received this message because you are subscribed to the
Orbited discussion group.
To post, send email to

To unsubscribe, send email to
Reply all
Reply to author
Forward
0 new messages