Sun T3 StorEdge : Batteries refresh …

if you get this kind of “error” :
Dec 14 02:36:31 hostname StoreX (Dec 14, 2005 2:36:31 AM FQDN):P3:System hostname-t3 (XX.XX.XX.XX) - Unit-unit-1 - Power-Module-2 (u1pcu2) : Power supply unit has switched to battery. Fru ID: u1pcu2, Model: 300-1454-01(50), Serial Number: XXXXXX
Dec 14 02:58:31 hostname StoreX (Dec 14, 2005 2:58:30 AM FQDN):P3:System hostname-t3 (XX.XX.XX.XX) - Unit-unit-1 - Power-Module-2 (u1pcu2) : The FRU has some error. Fru ID: u1pcu2, Model: 300-1454-01(50), Serial Number: XXXXX

then be aware that a T3 performs a battery refresh every so and then (this is by default every 28 days, but can be modified in /etc/schd.conf). This battery refresh can provoke this kind of error messages which are no error at all …

Sun T3 StorEdge : Identifying a failure

when logged on the T3, you can see the state of each FRU with the command

fru stat

Example :

hostname-t3:/:fru stat
CTLR    STATUS   STATE       ROLE        PARTNER    TEMP
------  -------  ----------  ----------  -------    ----
u1ctr   ready    enabled     master      -          32.5

DISK    STATUS   STATE       ROLE        PORT1      PORT2      TEMP  VOLUME
------  -------  ----------  ----------  ---------  ---------  ----  ------
u1d1    ready    enabled     data disk   ready      ready      34    v0
u1d2    ready    enabled     data disk   ready      ready      30    v0
u1d3    ready    enabled     data disk   ready      ready      43    v0
u1d4    ready    enabled     data disk   ready      ready      31    v0
u1d5    ready    enabled     data disk   ready      ready      39    v0
u1d6    ready    enabled     data disk   ready      ready      31    v0
u1d7    ready    enabled     data disk   ready      ready      32    v0
u1d8    ready    enabled     data disk   ready      ready      30    v0
u1d9    ready    enabled     standby     ready      ready      31    v0

LOOP    STATUS   STATE       MODE        CABLE1     CABLE2     TEMP
------  -------  ----------  -------     ---------  ---------  ----
u1l1    ready    enabled     master      -          -          27.5
u1l2    ready    enabled     slave       -          -          30.0

POWER   STATUS   STATE       SOURCE  OUTPUT  BATTERY  TEMP    FAN1    FAN2
------  -------  ---------   ------  ------  -------  ------  ------  ------
u1pcu1  ready    enabled     line    normal  normal   normal  normal  normal
u1pcu2  ready    enabled     line    normal  normal   normal  normal  normal

Parsing an ICal file with Perl

I finally almost got it …

Here is a code snippet for parsing and showing pieces of an ICal file :

use strict;
use warnings;

use Data::ICal;
use Data::ICal::DateTime;
use DateTime;

my $cal = Data::ICal->new(filename => 'holidays.ics');

my @events = $cal->events();

foreach my $event (@events) {
        print "summary:", $event->property('summary')->[0]->value, "n";
        print "dtstart:", $event->start, "n";
        print "dtend:", $event->end, "n";
}
print DateTime->now, "n";

What I want to do ? Drive my home automation events with my Mozilla Calendar !! I’ll soon be there, if I gather enough time to do it !

Some pointers :

  • DateTime perl module : a hell of a lot of computations with dates and times
  • Data::ICal perl modules : for all the parsing stuff
  • Data::ICal::DateTime perl module : to get it to work with DateTime
  • Home automation

    This is related to one of my geek hobbies : I am playing with home automation.

    Here is what I use :
    * Technology : x10
    * Software : MisterHouse
    * Hardware : a CM11, few AM12, LM12 etc

    This is really great since it allows you to control anything in your house (lights, washing machine, heaters, …) from your computer, while still being fairly simple.

    Using MisterHouse requires to know at least a little bit of Perl to get the most out of it, though.

    First post !

    Hello,

    My name is Stephane Kattoor, I work as an IT Engineer, and I created this blog with the idea to use it to store the little technical tips or hints I find in my every day work … with the hope it will help me and perhaps some others as well !

    Come from time to time, I plan to keep it updated !

    Stephane