Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Logging SCSI应用程序客户端日志页-如何写入?_Logging_Client_Scsi - Fatal编程技术网

Logging SCSI应用程序客户端日志页-如何写入?

Logging SCSI应用程序客户端日志页-如何写入?,logging,client,scsi,Logging,Client,Scsi,正如我从《SCSI命令参考手册》中了解到的,许多SCSI设备都为自定义日志保留了位置。这是第0xF页-应用程序客户端日志页。因此,我正在寻找一种方法,将一些数据写入该区域 起初我尝试使用sg_logs命令,但没有成功。我不确定在这种情况下会出现什么问题-要么是我给了该命令错误的标志,要么是我发送的消息不正确。sg_日志的手册页显示: The Application Client log page has 64 log parameters with parameters codes 0 to 6

正如我从《SCSI命令参考手册》中了解到的,许多SCSI设备都为自定义日志保留了位置。这是第0xF页-应用程序客户端日志页。因此,我正在寻找一种方法,将一些数据写入该区域

起初我尝试使用sg_logs命令,但没有成功。我不确定在这种情况下会出现什么问题-要么是我给了该命令错误的标志,要么是我发送的消息不正确。sg_日志的手册页显示:

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>'.
其中,
aa bb cc dd
是我希望写入日志页面的内容

我收到此请求后获得以下信息,不知道如何查找问题:

open /dev/sda with flags=0x802
    inquiry cdb: 12 00 00 00 24 00
      duration=0 ms
    HGST      HUH721212AL5204   C3D0
    log select cdb: 4c 01 4f 00 00 00 00 00 08 00
    log select parameter list
00 00 83 fc aa bb cc dd
      duration=2 ms
log select:
Descriptor format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
  Descriptor type: Sense key specific: Field pointer:
        Error in Command: byte 2 bit 5
  Descriptor type: Field replaceable unit code: 0x0
  Descriptor type: Vendor specific [0x80]
    f8 23
 Raw sense data (in hex):
        72 05 24 00 00 00 00 10  02 06 00 00 cd 00 02 00
        03 02 00 00 80 02 f8 23
似乎我真的必须深入了解scsi设备如何通信以及cdb是如何构造的,但我试图作为指南使用的scsi命令参考手册似乎以一种非常笼统的方式假设了一切,我不知道在哪里寻找问题的解决方案


如果您能提供有关此问题的任何信息,我将不胜感激。

我得到了与您完全相同的结果,使用的是SanDisk SAS驱动器。有趣的是,我也同意,如何实际使用应用程序客户机日志页面一点也不清楚。我得到了与您完全相同的结果,使用SanDisk SAS驱动器。有趣的是,我也同意,实际上如何使用应用程序客户机日志页面一点也不清楚。
open /dev/sda with flags=0x802
    inquiry cdb: 12 00 00 00 24 00
      duration=0 ms
    HGST      HUH721212AL5204   C3D0
    log select cdb: 4c 01 4f 00 00 00 00 00 08 00
    log select parameter list
00 00 83 fc aa bb cc dd
      duration=2 ms
log select:
Descriptor format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
  Descriptor type: Sense key specific: Field pointer:
        Error in Command: byte 2 bit 5
  Descriptor type: Field replaceable unit code: 0x0
  Descriptor type: Vendor specific [0x80]
    f8 23
 Raw sense data (in hex):
        72 05 24 00 00 00 00 10  02 06 00 00 cd 00 02 00
        03 02 00 00 80 02 f8 23