Re: understanding the sg_ses --raw output? so I can turn on the faulty light

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/02/11 16.25, Jon Bendtsen wrote:
> Hi
> 
> There has earlier been 2 threads on sg_ses 21 may 2007 and 10 june 2010,
> but unfortunately neither seemed to include information about how to
> understand the --raw output from sg_ses.
> 
> When I run this command
> 	sg_ses --page=2 /dev/sg30 --raw
> 
> I get output that looks like:
>         00 00 00 00 00 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
>         01 00 00 00 01 00 00 00  00 00 01 00 01 00 01 00
>         00 00 00 40 06 00 00 47  06 00 00 47 06 00 00 47
>         00 00 00 00 01 00 2c 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
>         06 00 00 00 06 00 00 00

I cracked it using this PDF
http://www.snia.org/events/storage-developer2008/presentations/monday/RajendraDivecha_SCSI_SES.pdf

Page 26 top diagram tells me they use 4 byte segments, aka 01 00 00 00
is one device slot.

Page 26 middle diagram tells me that 01 from the above segment must be
changed to 81 to select this device slot.

Page 27 diagram tells me that the 2. byte is not important.
Page 27 diagram tells me that the 3. byte should be 02 to signal RQST
IDENT. The result on my system is that the device slot starts to blink.

Page 27 diagram also tells me that if I set the 4. byte to 20, then I
select RSQT FAULT. The result on my systems is that the same device slot
turns on but does not blink, it stays static.

If I set both 3. byte to 02 and 4. byte to 20, then it blinks.

Below you can see the raw data blob which selects slot 16 and sets RQST
fault.

        00 00 00 00 00 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 81 00 00 20  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  00 00 01 00 01 00 01 00
        00 00 00 40 06 00 00 47  06 00 00 47 06 00 00 47
        00 00 00 00 01 00 2c 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00  06 00 00 00 06 00 00 00
        06 00 00 00 06 00 00 00

And here are the sg_ses output without --raw

    Individual element 16 status:
        Predicted failure=0, Disabled=0, Swap=0, status: OK
        OK=0, Reserved device=0, Hot spare=0, Cons check=0
        In crit array=0, In failed array=0, Rebuild/remap=0, R/R abort=0
        App client bypass A=0, Don't remove=0, Enc bypass A=0, Enc
bypass B=0
        Ready to insert=0, RMV=0, Ident=0, Report=0
        App client bypass B=0, Fault sensed=0, Fault reqstd=1, Device off=0
        Bypassed A=0, Bypassed B=0, Dev bypassed A=0, Dev bypassed B=0



JonB

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux