Syslog functionality

Ir abajo

Syslog functionality Empty Syslog functionality

Mensaje  jpg12305 el Jue Dic 30, 2010 3:59 pm

Hi,

Needing to investigate further why I get so many issues with recording crashes, I wanted to trace the sytem and kernel messages, but found the "dmesg" command too restrictive.
I therefore added a script in root/etc/init.d to fire syslogd/klogd and get system messages sent to root/log/messages.
It seems to work fine. Possible functionality to be added in a next version of the Harmony pack?

Content of init.d (S05syslog link, and syslog script added)
root@Venus:~/custom/etc/init.d# ls -la
total 12
drwxr-xr-x 2 root root 1024 Dec 29 13:11 .
drwxr-xr-x 4 root root 1024 Dec 30 13:36 ..
lrwxrwxrwx 1 root root 8 Dec 29 11:13 S01libcache -> libcache
lrwxrwxrwx 1 root root 7 Dec 29 11:13 S01opendns -> opendns
lrwxrwxrwx 1 root root 6 Dec 29 13:11 S05syslog -> syslog
lrwxrwxrwx 1 root root 5 Dec 29 11:13 S10samba -> samba
lrwxrwxrwx 1 root root 8 Dec 29 11:13 S15lighttpd -> lighttpd
lrwxrwxrwx 1 root root 8 Dec 29 11:13 S50rtorrent -> rtorrent
-rwxr-xr-x 1 root root 229 Aug 11 21:09 libcache
-rwxr-xr-x 1 root root 1433 Aug 10 14:14 lighttpd
-rwxr-xr-x 1 root root 239 Aug 18 00:41 opendns
-rwxr-xr-x 1 root root 3634 Oct 11 23:10 rtorrent
-rwxr-xr-x 1 root root 587 Oct 25 21:55 samba
-rwxr-xr-x 1 root root 208 Dec 30 10:01 syslog


Syslog script
#!/bin/sh
# Startup script for syslog - logs to root/messages
syslogd -n -b 2 -O /tmp/hdd/root/log/messages &
klogd -n &
#echo "1 4 1 7" > /proc/sys/kernel/printk
echo "Syslog started through custom script"


Happy new year, and congratulations for all the good job done!

jpg12305

Mensajes : 4
Fecha de inscripción : 20/06/2010

Volver arriba Ir abajo

Syslog functionality Empty Re: Syslog functionality

Mensaje  Keltek el Vie Dic 31, 2010 12:16 am

This is good Smile thank you.

But (I have always some "but" Wink ) you log into very small partition and the main application logs too much events so you can quickly went into "no disk space" situation.
If you log locally, use the main partition for recordings (/tmp/hddmedia) - but be careful, filesystem can be little corrupted while the logging is activated and you reboot the PVR (this can happen if you log to EXT3 or NTFS too)
I would prefer network logging using syslogd parameter "-R hostname[:port]". This should work even you cannot log-in to PVR. If we can reproduce the reboot-loop issue, I'll use this method to get what's happen.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 42
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

Syslog functionality Empty Re: Syslog functionality

Mensaje  jpg12305 el Sáb Ene 01, 2011 1:20 pm

Keltek escribió:
But (I have always some "but" Wink ) you log into very small partition and the main application logs too much events so you can quickly went into "no disk space" situation.
Right, but the log goes to the HDD (EXT3 partition), and the logrotate functionality automatically ensures things are not going out of control (in my case 2 archives of 256K + the active log). The point is rather that the log comes regularly clogged with I2C0 TXABORT warnings, which makes difficult finding something in between.

If you log locally, use the main partition for recordings (/tmp/hddmedia) - but be careful, filesystem can be little corrupted while the logging is activated and you reboot the PVR (this can happen if you log to EXT3 or NTFS too)
Good point. For EXT3 anyway, maybe the journaling feature of the file system can manage the potential corruption?

I would prefer network logging using syslogd parameter "-R hostname[:port]". This should work even you cannot log-in to PVR. If we can reproduce the reboot-loop issue, I'll use this method to get what's happen.
If you try this I am interested in the setup.
And I had yesterday the infinite reboot issue, after a power supply disconnection! I solved this by firmware reinstallation, but no trace in the log. In my case syslogd is started after the event triggeringthe system's reboot, so no help.

Happy new year !
cheers

jpg12305

Mensajes : 4
Fecha de inscripción : 20/06/2010

Volver arriba Ir abajo

Syslog functionality Empty Re: Syslog functionality

Mensaje  Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.