Re: [Savonet-users] liquidsoap: ubuntu upstart script, log reader script

2011-02-08 Thread Peter Retep
Hi David,

Of course you can distribite the scripts, I would feel honored.

As far as I understand upstart's exec method, it will fail as soon as the 
executed command returns.
When I use liquidsoap's daemon mode upstart will respawn immediately after 
starting daemon and give up after 10 attempts in a short time.
Maybe upstart offers an alternative mechanism to work with daemon processes, I 
just don't know.

Thanks for answering to active/standby configuration thread, I have learned a 
lot from it, once again.

BR, Peter

Am 08.02.2011 08:42, schrieb David Baelde:
 Thanks Peter for sharing those. I assume we can distribute them?

 The upstart script is particularly interesting. However, I'm wondering
 why you didn't use the daemon mode (which would have merged
 stdout/stderr with the logs).

 See ya,


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


[Savonet-users] liquidsoap: ubuntu upstart script, log reader script

2011-02-07 Thread Peter Retep

Hi,

1)

I have written a upstart ( http://upstart.ubuntu.com/ ) script for liquidsoap, 
because I found none.
It can be used to increase availability.
If liquidsoap fails, it will immediately be respawned by upstart.

You need to check the file paths and log directory.
Best check its exec line before setting it live.
Then you can place it at /etc/init/liquidsoap.conf.

You can start, stop, restart liquidsoap by

sudo start liquidsoap
sudo stop liquidsoap
sudo restart liquidsoap

After a few respawns in short time the upstart job will finally fail,
so you could use an additional root cronjob to restart in case of failure.

* * * * * start liquidsoap

For each running liquidsoap service you will have to copy and modify the file.
Another limitation is that upstart currently only works with super user acount.
Liquidsoap's daemon mode is not used, STD output should be enabled and will be 
piped to log file.
(to see errors directly when starting it manually)

Since I am not a upstart expert: If you have any ideas how to improve this, 
please share it.

2)

Another script I want to share is a log merger for syslog, icecast and 
liquidsoap logs.

./log.pl

It merges output of all 3 logs mentioned above in a tail-f manner.
It helped me when checking logs of multiple processes on remote machine without 
GUI.
Of cause you can use it for additional/other logs, too: Just change the log 
paths at the script.

BR, Peter


description liquidsoap

start on (
net-device-up
local-filesystems
and runlevel [2345]
)

stop on runlevel [016]

respawn

exec su - liquidsoap -c /usr/local/bin/liquidsoap /etc/liquidsoap/radio.liq  
21  /var/log/liquidsoap/radio.log



log.pl
Description: Perl program
--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


Re: [Savonet-users] liquidsoap: ubuntu upstart script, log reader script

2011-02-07 Thread David Baelde
Thanks Peter for sharing those. I assume we can distribute them?

The upstart script is particularly interesting. However, I'm wondering
why you didn't use the daemon mode (which would have merged
stdout/stderr with the logs).

See ya,
-- 
David

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users