Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sg_logs - application client - how to add custom log to 0xf log page #61

Open
Klubenn opened this issue Oct 31, 2020 · 0 comments
Open

Comments

@Klubenn
Copy link

Klubenn commented Oct 31, 2020

As I understood from man and SCSI Commands Reference Manual SCSI devices have reserved place for client logs. Man pages tell very briefly how to use it:

The Application Client log page has 64 log parameters with parameters codes 0 to 63.
Each can hold 252 bytes of user binary data. That 252 bytes (or less) of user data, with
a 4 byte prefix (for a total of 256 bytes) can be provided with the --in=FN option. A
typical prefix would be '0,n,83,fc'. The "n" is the parameter code in hex so the last log
parameter would be '0,3f,83,fc'. That log parameter could be read back at some later
time with '--page=0xf --filter=0x<n>'.

I tried various combinations with sg_logs command, but never succeeded to write anything into that memory.

Could you please give an example what flags to the command to give and what is the structure of the message that has to be sent.

I tried this:

sg_logs --in=- --page=0xf --select /dev/sda -s
0 0 83 fc aa bb cc dd

aa bb cc dd is what I wanted to be written to the log page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant