OpenELEC NFS Booting How-To
#38
(2012-12-26, 18:07)MilhouseVH Wrote: One other wrinkle with NFS booting on OpenELEC, is that connmand (the network connection manager) on the Pi will write to syslog (/var/log/messages) every 17 minutes as it updates the time (ntp). Since the logs are now located on the NAS, this log activity prevents the NAS from spinning down its disks. So, to silence ntp and allow the NAS to spin down its disks you can add the following to each Pi:

1) On the Pi in the .config folder, run the command "cp /etc/syslog.conf ." to create a copy of syslog.conf that we can modify

2) Edit ./syslog.conf so it looks like the following - basically, we're adding an entry for the daemon.info facility (used by ntp) so that log entries are written to /dev/null (ie. discarded), and we're also ignoring auth.debug messages (SOA DNS etc.) for good measure:
Code:
# all daemon.info and auth.debug to be discarded - ntp, SOA etc.
daemon.info;auth.debug      /dev/null

# all messages of kern and user facilities
kern,user.*      /var/log/messages

# all messages of kern facility with priorities lower than err (warn, notice ...)
kern.!err            /var/log/critical

# all messages with auth and authpriv facilities, except auth.debug which is ignored
auth,authpriv.*;auth.!=debug      /var/log/auth

3) Create an autostart.sh script that will replace the system default syslogd with a syslogd using our new config:
Code:
#!/bin/sh

# Restart default syslogd with modified syslog.conf to avoid excessive logging, eg. ntp
PID_SYSLOG=$(ps -o pid,args | grep "syslogd$" | grep -v grep | awk '{ print $1 }')
[ -n "${PID_SYSLOG}" ] && ( kill ${PID_SYSLOG} && syslogd -f /storage/.config/syslog.conf & )

4) chmod +x ./autostart.sh

Now, ntp updates will be discarded, giving the NAS the opportunity to spin-down its disks when RPi clients are idle.

First of all, thanks for this. Really nice How-To. It's been a few month, so I'm not sure whether this is still supposed to work, but I found that I had to replace grep "syslogd$" with a plain grep syslogd to make it work. That's running OpenELEC 3.0.6. I can confirm that I no longer have any ntp logging now.

I do have a different issue, though. I've set up PVR (Edit: In case it's relevant, I'm using NextPVR, streaming from a Windows TV server) as I use my Pi to stream Live TV, and I seem to have another log file to worry about, i.e.:

/storage/.xbmc/temp/xbmc.log

It seems to be full of the following entries, a new one being added about every 5 minutes:

07:26:23 T:2947015776 NOTICE: Thread CFileCache start, auto delete: false
07:26:24 T:2824844384 ERROR: CPVRManager - UpdateItem - no channel tag provided

Live TV seems to be working fine, despite any errors that may be logged, so does anyone have any idea how I can keep my Pi from logging this, as it still prevents my NFS drives from spinning down?

Any help with this would be much appreciated!
Reply


Messages In This Thread
OpenELEC NFS Booting How-To - by Milhouse - 2012-12-26, 18:07
RE: OpenELEC NFS Booting How-To - by gimli - 2012-12-26, 18:12
RE: OpenELEC NFS Booting How-To - by Milhouse - 2012-12-26, 18:23
RE: OpenELEC NFS Booting How-To - by wimble - 2012-12-29, 04:17
RE: OpenELEC NFS Booting How-To - by Milhouse - 2012-12-29, 06:03
RE: OpenELEC NFS Booting How-To - by ntadej - 2013-01-02, 21:51
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-01-02, 21:55
RE: OpenELEC NFS Booting How-To - by ntadej - 2013-01-03, 21:50
RE: OpenELEC NFS Booting How-To - by mylle - 2013-01-04, 08:14
RE: OpenELEC NFS Booting How-To - by mylle - 2013-01-08, 11:34
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-01-08, 22:13
RE: OpenELEC NFS Booting How-To - by wimble - 2013-01-09, 02:26
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-01-09, 02:39
RE: OpenELEC NFS Booting How-To - by wimble - 2013-01-09, 03:00
RE: OpenELEC NFS Booting How-To - by mylle - 2013-01-09, 23:30
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-01-09, 23:58
RE: OpenELEC NFS Booting How-To - by mylle - 2013-01-10, 08:08
RE: OpenELEC NFS Booting How-To - by ttabbal - 2013-02-19, 06:25
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-02-20, 20:08
RE: OpenELEC NFS Booting How-To - by wimble - 2013-02-20, 17:12
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-02-21, 13:55
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 00:09
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-02-27, 00:21
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 00:41
RE: OpenELEC NFS Booting How-To - by mylle - 2013-02-27, 08:29
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 13:54
RE: OpenELEC NFS Booting How-To - by mylle - 2013-02-27, 14:58
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 15:32
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 16:23
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 19:24
RE: OpenELEC NFS Booting How-To - by mylle - 2013-02-27, 19:36
RE: OpenELEC NFS Booting How-To - by doveman2 - 2013-02-27, 20:02
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-02-27, 20:04
RE: OpenELEC NFS Booting How-To - by jabbera - 2013-02-28, 06:12
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-02-28, 06:54
RE: OpenELEC NFS Booting How-To - by DocG - 2013-07-29, 00:52
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-07-29, 01:17
RE: OpenELEC NFS Booting How-To - by DocG - 2013-07-29, 01:27
RE: OpenELEC NFS Booting How-To - by regnets - 2013-07-30, 22:44
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-07-30, 23:00
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-08-21, 07:46
RE: OpenELEC NFS Booting How-To - by botribun - 2013-08-28, 13:29
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-10-01, 19:36
RE: OpenELEC NFS Booting How-To - by sorhol - 2013-12-28, 19:32
RE: OpenELEC NFS Booting How-To - by Milhouse - 2013-12-28, 21:28
RE: OpenELEC NFS Booting How-To - by sorhol - 2013-12-29, 00:49
RE: OpenELEC NFS Booting How-To - by Milhouse - 2014-07-09, 02:41
Logout Mark Read Team Forum Stats Members Help
OpenELEC NFS Booting How-To1