Aus Streamboard Wiki
Version vom 17. März 2011, 13:00 Uhr von ValD (Diskussion | Beiträge) (First version of this page.)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

OSCam Übersicht OSCam Home OSCam Accueil OSCam Home

Central Logging

One thing I found very useful when debugging issues with OSCam (and not only this) is to have all the logs at my disposal. To do that, I have setup all my boxes to send their logs to my server which is always on and has sufficient disk space. The preferred protocol, supported by all devices and programs, is syslog.

Client Configuration

First, I make sure syslog is running on my boxes.

For DM500 running Gemini, the configuration is in /var/script/syslogd_script.sh:


On my TM800HD, the configuration is in /etc/syslog.conf


Then, oscam can be configured to write to syslog daemon instead of a file. Just change logfile value in oscam.conf like this:

logfile                       = syslog

Server Configuration

The best part is on the server side. This is where I wasn't happy with the default syslogd server that comes with Debian, and I installed the smarter syslog-ng. One thing I loved about syslog-ng is that I was able to configure it so that each box has its own directory on the server, making it very easy to find the log data I was looking for. This is the configuration I use in syslog-ng.conf:

# source: all logs sent from the network
source s_net {
# destination: each facility has its own log for each host destination d_hosts { file("/var/log/hosts/$HOST/$FACILITY.log" owner(root) group(root) perm(0600) dir_perm(0755) create_dirs(yes) ); };
# everything from the network is sent to the disk, under /var/log/hosts log { source(s_net); destination(d_hosts); };


The result is that I have log files on the server for all my stuff:

server:/var/log/hosts# find

Here's my son watching Cartoons:

server:/var/log/hosts/dm500fe# tail -2 daemon.log 
Mar 17 12:53:15 dm500fe oscam: 32025B50 c anonymous (0500&022F00/003D/34:EF9E): found (143 ms) by server (of 1 avail 1)
Mar 17 12:53:25 dm500fe oscam: 32025B50 c anonymous (0500&022F00/003D/34:E49B): found (147 ms) by server (of 1 avail 1)

I'm watching cricket on Sky Sports HD1:

server:/var/log/hosts/tm800# tail -2 daemon.log 
Mar 17 12:54:23 tm800 oscam: 2CDE74D0 c anonymous (0963&000000/0EDA/76:11B0): found (135 ms) by server (of 1 avail 1)
Mar 17 12:54:30 tm800 oscam: 2CDE74D0 c anonymous (0963&000000/0EDA/76:FB59): found (117 ms) by server (of 1 avail 1)

Even the server logs are in this directory structure:

server:/var/log/hosts/server# tail -2 daemon.log 
Mar 17 12:55:44 server oscam: B6419280 c tm800 (0963&000000/0EDA/76:85F5): found (111 ms) by smargo (of 1 avail 1)
Mar 17 12:55:45 server oscam: B6421280 c dm500fe (0500&022F00/003D/34:8660): found (142 ms) by omnikey (of 1 avail 1)

NOTE: In case you are wondering, phone is a VOIP adapter. Yes, it supports the syslog protocol, so I collect its logs on my server!

Diese Seite in anderen Sprachen - This page in other languages - Cette page dans d'autres langues - Queste pagine in altre Lingue

[[OSCam/de/{{#titleparts:OSCam/en/CentralLogging|3|3}}|Deutsch]] [[OSCam/en/{{#titleparts:OSCam/en/CentralLogging|3|3}}|English]] [[OSCam/fr/{{#titleparts:OSCam/en/CentralLogging|3|3}}|Français]] [[OSCam/it/{{#titleparts:OSCam/en/CentralLogging|3|3}}|Italiano]]