First Steps with Rasbian

Today I freshly installed Raspian on a new SD card; basically it’s just dd’ing the downloaded image to the SD card, e.g. on MacOSX:

sudo dd if=2013-07-26-wheezy-raspbian.img of=/dev/rdiskX bs=1m

Please do not blindly run the command above as you need to know the correct device number, so replace the X with something that indicates your SD card. If you are new to this, good idea is to follow the documentation of RPi Easy SD Card Setup. It contains installation instructions from most common OS versions like Linux, MacOSX, or Windows.

First thing I wanted to figure out is details about hardware and monitoring. I found that the Broadcom VideoCore tools are useful for this and already installed on the system in /opt/vc/. With the command vcgencmd can you e.g. request the core temperature of the Broadcom SoC:

pi@pi2 /opt/vc $ /opt/vc/bin/vcgencmd measure_temp

More details about vcgencmd can be found on’s RPI vcgencmd usage page or, with a complete command overview, here:

led-set utility for Cobalt server

Today I release the first version of led-set for cobalt machines. Now there are some command line options, a help, getting led status on i386 based cobalt systems, support for MIPS architectures etc.

This small utility is based on the cobalt-panel-utils original provided by Sun Microsystems. This utilities are able to set the LCD of the Cobalt machines and read the Button, but not to set the extra LED some of the machine have.
I own a MIPS bases Qube2 and two i386 machines, the RaQ4r and a RaQ3. The Qube is a great small machine with low power consumption and ideal as use for a home server. The only thing which was disturbing are the bright LED bar on the front and I search for a method to switch it on or off based on the daytime. The both RaQ machines I use with out a FAN to reduce the noise, but if there is some traffic on the machines, the CPU’s may getting to hot. They have a special „Web LED“ which isn’t used outside the original software (all systems are updated to running Debian or Ubuntu in the meantime). I searched for a way to control the LED so that I can build some small hardware extension to control the fan’s, the Web LED is a perfect solution for this.

This ideas lead to this small util led-set.


The building and installing of this small utility is quite easy. The only thing you need is a GCC compiler and make tools installed. To build and install this utility just run:

# make && make install

This will build the utils and copy the executable to /bin/led-set


The usage should not be to complicated. By running the command with the -h option you get the help of this tool:

Usage: led-set [OPTION]...

Mandatory arguments to long options are mandatory for short options too.
-s, --state       return the actual state of the LED as exit code. To display
                  the value you might use the -v|--verbose option too.
                  This is not supported on MIPS, the return will be always 0.
-h, --help        display this help and exit
-v, --verbose     switch on verbose message, e.g. when showing the LED state .
-l, --led=STATE   Set the new state for the LED as numeric value.

Possible States:
MIPS:      0    All   Switch LEDs off
           1    Qube  Front LED bar left on (COBALT_LED_BAR_LEFT = (1<<0))
           2          Front LED bar right on (COBALT_LED_BAR_RIGHT = (1<<1))
           3          Both front LED's
           4    RaQ   Web LED on (COBALT_LED_WEB = (1 << 2))
           8          Power LED off (COBALT_LED_POWER_OFF = (1 << 3))
          15    All   Reset the LED's (COBALT_LED_RESET = (0x0f))
i386:      0    All   Switch LEDs off
           1          LED_SHUTDOWN = (1 << 0)
           2          Switch on the Web LED (LED_WEBLIGHT = (1 << 1))
           3          Switch on the Cobalt/Sun Logo (LED_COBALTLOGO = (1 << 2))

WARNING: There are more possible values for controlling LED you may wish to try.
If you try them you are trying them completely on your OWN RISK! Please
keep this always in mind that this options might be dangerous.

There might additional LED’s depending on your Cobalt machine type. To get (mostly) all supported values you may need to look up the kernel sources for the cobalt drivers, specially the files ./include/asm-mips/mach-cobalt/cobalt.h or ./include/cobalt/led.h, depending on the arch type.

If you find additional combinations, please post this as comment to this Blog entry and let me know which led-state do what on which hardware (machine name and/or systype (cat /proc/cobalt/systype) on i386 machines). If you have questions, ideas or issue, please feel free to contact me too.

Make the web LED work on a Cobalt RaQ3/RaQ4

At the moment i use a Cobalt RaQ4r (system type Pacifica) as a server running Ubuntu 7.04. The RaQ’s have a special LED on the front panel which was used from the original Software to show activities on the HTTP server. This LED is labeled as WEB.

Looking to the kernel sources I figured out that the LED on Pacifica systems is controlled by the ALi M7101 PCI device. So I tried to set the LED with the help of setpci command. This works, but the light is just flash one time, not what I expected. „Make the web LED work on a Cobalt RaQ3/RaQ4“ weiterlesen

Projects added

Two day I added the static page about projects which are hosted by this domain. At the moment there are two, SAR Report and led-set.

SAR Report is a bash script, which create from sysstats sar data a HTML report including charts which is easy to analyze.