From: Douglas Gilbert <dgilbert@interlog.com>
To: Benjamin ESTRABAUD <be@mpstor.com>
Cc: Jeff Johnson <jeff.johnson@aeoncomputing.com>,
linux-scsi@vger.kernel.org
Subject: Re: Best approach for using sg_ses to control locate/fault leds?
Date: Thu, 10 Jun 2010 12:42:55 -0400 [thread overview]
Message-ID: <4C11160F.3090700@interlog.com> (raw)
In-Reply-To: <4C110A2B.4060009@mpstor.com>
On 10-06-10 11:52 AM, Benjamin ESTRABAUD wrote:
> Hi,
>
> As far as I know, you unfortunately have to send back the entire page
> when it comes to SES.
>
> Ben.
>
> Jeff Johnson wrote:
>> Greetings,
>>
>> I am using sg_ses to poll a SAS JBOD for locate and fault led status
>> and light leds if needed. So far the only method I can figure out how
>> to accomplish this is by reading page 2 of the SES management device
>> in the jbod chassis, dumping the raw hex output to a file, setting the
>> select and RQST IDENT or RQST FAULT bits and sending back the entire
>> 480 bytes with modified bits.
>>
>> Turn locate led on:
>> sg_ses --page=0x2 /dev/sg18 -f --raw > /tmp/out
>> ...twittle bits in /tmp/out with editor of choice...
>> sg_ses --control --page=2 -d - /dev/sg18 < /tmp/out
>>
>> Is there a utility, a '--element=' arg or another method by which only
>> the four bytes of the element control diag page can be sent instead of
>> all 480 bytes?
Jeff,
No, that is the only way. Ugly but relatively simple
to code. I'm open to suggestions and especially code.
Short of writing something as complicated as sdparm
(for example) I don't see an easy way.
I did notice that the '--data <H,H...>' option was
limited to 512 bytes and you were at 480. So I
increased that to 2048.
Doug Gilbert
prev parent reply other threads:[~2010-06-10 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 22:35 Best approach for using sg_ses to control locate/fault leds? Jeff Johnson
2010-06-10 15:52 ` Benjamin ESTRABAUD
2010-06-10 16:42 ` Douglas Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C11160F.3090700@interlog.com \
--to=dgilbert@interlog.com \
--cc=be@mpstor.com \
--cc=jeff.johnson@aeoncomputing.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox