<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

SqueezeOS Tips

From SqueezeboxWiki

Revision as of 00:28, 26 November 2010 by Mherger (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Capturing logs to a remote logger

To capture the logs to another system the following steps has to be taken:

On your Player change the parameters of the syslog to indicate the remote system. Here is an example:

/sbin/syslogd -L -R 192.168.0.12

The syslogd gets started from the /etc/init.d/rcS file.

On a Linux machine that is capable of capturing the logs change the syslog options to add the remote logging support. In my Ubuntu machine I edit the /etc/default/syslogd file and make the following change:

SYSLOGD="-r"

restart the syslogd on your Linux machine and restart the Player.

Some challenges that I have had with this configuration:

If you are setting up your syslog server using DHCP be aware of potential changes of IP address.

Before the 7.6 builds the SqueezePlay syslog events do not conform with the standard syslog, so they are ignored by the remote logger. This is fixed in 7.6 builds.

Capturing logs to NAND flash

It is preferred that remote logger be used to access the logs. Capturing logs to NAND should be used mostly for debugging the kernel and potential networking issues. Enabling this feature increases the CPU usage and could cause some strange behavior by Player. With the current implementation the log files on the Radio, Fab4, etc are kept in the memory and have very limited size. This means that log files will be rotated often and will be lost during boot up. To persist the log files to the NAND flash please follow the following instructions after connecting to your Player using ssh:

# mkdir /media/mylogs

# mkdir /media/mylogs/log

# /sbin/reboot

Notice that this will enable the capturing of the logs to the NAND flash, which could slow down the system and could increase the boot time. The maximum size for the log files is 60MB at the moment. To disable this feature, follow the following instructions after connecting to your player using ssh:

#rm -Rf /media/mylogs

# /sbin/reboot

Modifying files on your Controller

With SqueezeOS you can safely modify any of the files stored on the Controller for prototyping and development. The released firmware is stored in a read-only filesystem in the flash, a writeable overlay filesystem is used that allows modification of any files. You don't need to worry if these modifications stop your Controller from working, a factory reset will erase the overlay filesystem restoring the firmware to the original state.

Starting with the 7.1 firmware all modifications are removed after a firmware upgrade. All settings files are kept, this is currently all files in /etc and all settings.lua files. You can easily reapply your changes using an SD card.

Using an SD card

You can store the system log and any application core files using on an SD card. First create a /log folder using your PC, then put the SD card into your Controller and insert the battery. All log messages will now be written in the /log/messages file. If the application crashes all core files will also be stored in the /log folder for analysis.

Starting with the 7.1 firmware SqueezeOS will also use additional files on your SD card. These are:

squeezeos.patch 
the patch file is automatically applied to the filesystem following a factory reset. This lets you automatically install any local modifications to your Controller. Be warned that after an upgrade the new firmware may conflict with the local changes and prevent the Controller from working correctly. In this case remove the patch file from the SD card and perform a factory reset.
squeezeos-post-reset.sh 
this script is executed after a factory reset and can be used to modify the filesystem or perform custom actions. (In the 7.0 firmware this script was called firstboot.sh).
squeezeos-boot.sh 
this script is exeucted every time the Controller is booted, it can be used to perform custom actions. (In the 7.0 firmware this script was called jiveboot.sh).
squeezeplay 
if you create a squeezeplay directory this is added to the LUA_PATH and can be used to install lua extensions and custom applets on the SD card.

Fast and Easy Screen Captures from the Squeezebox Controller

What you do:

  1. Insert an SD card in the Controller and turn it on.
  2. Navigate to the screen you want to capture.
  3. Simultaneously press and hold the REW and PAUSE buttons for two seconds. A short “tick” sound will confirm that a screen shot has been taken.
  4. Repeat this process for whatever screen shots you need.
  5. Shut down the SBC and remove the SD card

Now all you need to do is take the SD card out of the Controller and place it in an SD card reader attached to your computer to access the images.