Re: [OSM-dev] mod_tile/renderd logging

2010-01-25 Thread Jonathan-David SCHRODER
Hi Jaak,

Instead of hacking your own renderd service start/stop/.. script (eg.
creating a file /etc/init.d/renderd)...
...you can just run renderd in a screen (apt-get install screen) in
-f(oreground) and redirect its output with redirection to some file while
keep it going to stdout.

screen -S renderd_screen #creates a screen named renderd_screen
#run this in screen now
./renderd -f 21 | tee -a /var/log/renderd
# -f = runs renderd in foreground, 21 copies stderr to stdout, | tee -a
... takes previous process's stdout and puts it into /var/log/renderd
#and (D)etach your screen with Ctrl+A then D

If you did not know screen, google for linux screen tutorial to get help on
using screen.

Take care

Jonathan

On Tue, Jan 12, 2010 at 12:08 PM, Jaak Laineste jaak.laine...@gmail.comwrote:

 Hello,
  Is there a way to save renderd debug log to a file? I can see the
 debug log when I start renderd with -f option, but I'd like to run it
 as normal service, silently, but have debug log in e.g.
 /var/log/renderd.log

  I was getting occasional Segmentation Faults in renderd (when I use
 2 threads), this may be useful for troubleshooting.

 --
 Jaak Laineste

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] mod_tile/renderd logging

2010-01-25 Thread Jonathan-David SCHRODER
get back into your screen with screen -r renderd_screen (or screen -r rend
= string that starts with the name of you screen session, as you can read
it in screen -ls or screen -list)

On Mon, Jan 25, 2010 at 1:27 PM, Jonathan-David SCHRODER 
jonathan.schro...@gmail.com wrote:

 Hi Jaak,

 Instead of hacking your own renderd service start/stop/.. script (eg.
 creating a file /etc/init.d/renderd)...
 ...you can just run renderd in a screen (apt-get install screen) in
 -f(oreground) and redirect its output with redirection to some file while
 keep it going to stdout.

 screen -S renderd_screen #creates a screen named renderd_screen
 #run this in screen now
 ./renderd -f 21 | tee -a /var/log/renderd
 # -f = runs renderd in foreground, 21 copies stderr to stdout, | tee -a
 ... takes previous process's stdout and puts it into /var/log/renderd
 #and (D)etach your screen with Ctrl+A then D

 If you did not know screen, google for linux screen tutorial to get help on
 using screen.

 Take care

 Jonathan


 On Tue, Jan 12, 2010 at 12:08 PM, Jaak Laineste 
 jaak.laine...@gmail.comwrote:

 Hello,
  Is there a way to save renderd debug log to a file? I can see the
 debug log when I start renderd with -f option, but I'd like to run it
 as normal service, silently, but have debug log in e.g.
 /var/log/renderd.log

  I was getting occasional Segmentation Faults in renderd (when I use
 2 threads), this may be useful for troubleshooting.

 --
 Jaak Laineste

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] mod_tile/renderd logging

2010-01-25 Thread Jaak Laineste
Actually I found out that log is written to /var/log/syslog and this  
was all I needed. I still have issue with number of threads over 2 (or  
even 1), I get segfaults, but this is different issue.


Jaak

On 25.01.2010, at 14:28, Jonathan-David SCHRODER jonathan.schro...@gmail.com 
 wrote:


get back into your screen with screen -r renderd_screen (or screen - 
r rend = string that starts with the name of you screen session, as  
you can read it in screen -ls or screen -list)


On Mon, Jan 25, 2010 at 1:27 PM, Jonathan-David SCHRODER jonathan.schro...@gmail.com 
 wrote:

Hi Jaak,

Instead of hacking your own renderd service start/stop/.. script  
(eg. creating a file /etc/init.d/renderd)...
...you can just run renderd in a screen (apt-get install screen) in - 
f(oreground) and redirect its output with redirection to some file  
while keep it going to stdout.


screen -S renderd_screen #creates a screen named renderd_screen
#run this in screen now
./renderd -f 21 | tee -a /var/log/renderd
# -f = runs renderd in foreground, 21 copies stderr to stdout, |  
tee -a ... takes previous process's stdout and puts it into /var/log/ 
renderd

#and (D)etach your screen with Ctrl+A then D

If you did not know screen, google for linux screen tutorial to get  
help on using screen.


Take care

Jonathan


On Tue, Jan 12, 2010 at 12:08 PM, Jaak Laineste jaak.laine...@gmail.com 
 wrote:

Hello,
 Is there a way to save renderd debug log to a file? I can see the
debug log when I start renderd with -f option, but I'd like to run it
as normal service, silently, but have debug log in e.g.
/var/log/renderd.log

 I was getting occasional Segmentation Faults in renderd (when I use
2 threads), this may be useful for troubleshooting.

--
Jaak Laineste

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] mod_tile/renderd logging

2010-01-12 Thread Jaak Laineste
Hello,
  Is there a way to save renderd debug log to a file? I can see the
debug log when I start renderd with -f option, but I'd like to run it
as normal service, silently, but have debug log in e.g.
/var/log/renderd.log

 I was getting occasional Segmentation Faults in renderd (when I use
2 threads), this may be useful for troubleshooting.

-- 
Jaak Laineste

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] mod_tile/renderd logging

2010-01-12 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 12, 2010 at 11:08, Jaak Laineste jaak.laine...@gmail.com wrote:
 Hello,
  Is there a way to save renderd debug log to a file? I can see the
 debug log when I start renderd with -f option, but I'd like to run it
 as normal service, silently, but have debug log in e.g.
 /var/log/renderd.log

You can run it under inet.d and have it capture its output iirc.

  I was getting occasional Segmentation Faults in renderd (when I use
2 threads), this may be useful for troubleshooting.

It usually doesn't help at all to capture program output when
something is segfaulting. Compile it with the -ggdb3 flag and run it
under gdb instead.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] mod_tile/renderd logging

2010-01-12 Thread Jon Burgess
On Tue, 2010-01-12 at 14:10 +, Ævar Arnfjörð Bjarmason wrote:
 On Tue, Jan 12, 2010 at 11:08, Jaak Laineste jaak.laine...@gmail.com wrote:
  Hello,
   Is there a way to save renderd debug log to a file? I can see the
  debug log when I start renderd with -f option, but I'd like to run it
  as normal service, silently, but have debug log in e.g.
  /var/log/renderd.log
 
 You can run it under inet.d and have it capture its output iirc.

If you have an intelligent syslog daemon (like rsylog or syslog-ng) then
that should let you direct the renderd output to another log file.

   I was getting occasional Segmentation Faults in renderd (when I use
 2 threads), this may be useful for troubleshooting.
 
 It usually doesn't help at all to capture program output when
 something is segfaulting. Compile it with the -ggdb3 flag and run it
 under gdb instead.

As Avar says, the backtrace from GDB is generally a lot more useful than
the log output.


 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev