DiagnosticService
更新时间: 2026/07/01
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/Managers/manager_id/DiagnosticService

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue诊断服务资源模型的OData描述信息
@odata.idstringtrue诊断服务资源的访问路径
@odata.typestringtrue诊断服务资源的类型
Idstringtrue诊断服务资源的ID
Namestringtrue诊断服务资源的名称
VideoRecordingEnabledbooleanfalse录像使能说明GA140C机型不支持
ScreenShotEnabledbooleanfalse最后一屏使能说明GA140C机型不支持
PCIeInterfaceEnabledbooleanfalsePCIe接口使能说明GA140C机型不支持
BlackBoxDumpEnabledbooleanfalse黑匣子数据导出使能
BlackBoxEnabledbooleanfalsePCIe接口使能和黑匣子数据导出使能说明GA140C机型不支持
SerialPortDataEnabledbooleanfalse系统串口数据记录功能说明GA140C机型不支持
DfpServiceEnabledbooleanfalse硬盘和链路故障预测使能
VideoPlaybackConnNumnumbertrue录像回放个数说明GA140C机型不支持
VideoRecordInfoarraytrue录像信息说明GA140C机型不支持
VideoSizeBytenumbertrue录像大小,单位:字节说明GA140C机型不支持
CreateTimestringtrue录像创建时间说明GA140C机型不支持
ScreenShotCreateTimearraytrue截屏图片时间信息说明GA140C机型不支持
DrivesLogCollectEnablebooleanfalse硬盘日志自动收集开启状态
DrivesLogCollectIntervalnumberfalse硬盘日志自动收集开启周期(单位:小时)
WorkRecordobjecttrue工作记录资源访问路径
PRBSTestobjecttruePRBS测试资源访问路径
DiagnosticService.StopVideoPlaybackobjecttrue停止录像回放说明GA140C机型不支持
DiagnosticService.ExportVideoobjecttrue导出录像文件说明GA140C机型不支持
DiagnosticService.CaptureScreenShotobjecttrue手动截屏说明GA140C机型不支持
DiagnosticService.DeleteScreenShotobjecttrue删除手动截屏说明GA140C机型不支持
DiagnosticService.ExportBlackBoxobjecttrue导出黑匣子数据说明GA140C机型不支持
DiagnosticService.ExportSerialPortDataobjecttrue导出串口信息数据
DiagnosticService.ExportNPULogobjecttrue导出NPU日志
DiagnosticService.StartCollectDrivesLogobjecttrue收集硬盘日志信息
DiagnosticService.ExportDiagnosticMetricsobjecttrue导出诊断度量数据
BlackBoxSizenumbertrue黑匣子数据大小单位:字节
SerialPortDataSizenumbertrue串口数据大小单位:字节
DiskSubhealthFunctionobjectfalse硬盘亚健康功能集合
LifespanEstimateEnabledbooleanfalse硬盘预估寿命使能
LifespanEstimateAlarmEnabledbooleanfalse硬盘预估寿命过低告警使能
OpticalModuleSubhealthFunctionobjectfalse光模块亚健康功能开关集
DeteriorationPredictionEnabledbooleanfalse光模块老化预测功能开关状态说明BMC300 5.8.3.79及以上至BMC300 5.9.0(不含)以下, BMC300 5.10.0及以上版本支持光模块老化预测功能,仅适用于机型:A900 A3 SuperPoD,A800T A3
codestringtrue指示消息注册表中特定消息ID的字符串。
messagestringtrue与消息注册表中的消息对应的易读的错误消息。
MessageIdstringtrue消息ID
RelatedPropertiesarraytrue消息相关属性
Messagestringtrue详细信息
MessageArgsarraytrue信息参数
Severitystringtrue严重性Redfish支持的严重级别包括:OK、Warning、Critical。
Resolutionstringtrue解决建议
Descriptionstringtrue任务描述
TaskStatestringtrue任务执行状态
● New
● Starting
● Running
● Suspended
● Interrupted
● Pending
● Stopping
● Completed
● Killed
● Exception
● Service
TaskStatusstringtrue指定任务的完成状态。
● OK
● Warning
● Major
● Critical
StartTimestringtrue任务的起始时间
Messagesarraytrue任务相关的消息
PercentCompletestringtrue任务完成的百分比进度。
TaskPercentagestringtrue任务执行的进度

supported_methods

  • GET
  • PATCH
  • POST

HTTP methods

GET

命令功能

查询诊断服务资源

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService

请求头:

X-Auth-Token: auth_value

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
auth_value请求消息的鉴权参数可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

使用实例

请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService

X-Auth-Token: auth_value 请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#HwDiagnosticService.HwDiagnosticService",
  "@odata.id": "/redfish/v1/Managers/1/DiagnosticService",
  "@odata.type": "#HwDiagnosticService.v1_0_0.HwDiagnosticService",
  "Id": "DiagnosticService",
  "Name": "Diagnostic",
  "VideoRecordingEnabled": true,
  "ScreenShotEnabled": true,
  "PCIeInterfaceEnabled": true,
  "BlackBoxDumpEnabled": true,
  "BlackBoxEnabled": true,
  "SerialPortDataEnabled": true,
  "DfpServiceEnabled": false,
  "DiskSubhealthFunction": {
    "LifespanEstimateEnabled": true,
    "LifespanEstimateAlarmEnabled": false
  },
  "OpticalModuleSubhealthFunction": {
    "DeteriorationPredictionEnabled": false
  },
  "VideoPlaybackConnNum": 0,
  "VideoRecordInfo": [
    {
      "VideoSizeByte": 7738538,
      "CreateTime": "2019-06-12 07:14:20"
    },
    null,
    null
  ],
  "ScreenShotCreateTime": [
    "2019-06-12 18:17:36",
    "2019-06-12 09:46:50",
    "2019-06-12 07:14:35",
    "2019-06-12 09:36:45"
  ],
  "DrivesLogCollectEnable": true,
  "DrivesLogCollectInterval": 24,
  "Oem": {
    "Public": {
      "BlackBoxSize": 4194304,
      "SerialPortDataSize": 2097152
    }
  },
  "WorkRecord": {
    "@odata.id": "/redfish/v1/Managers/1/DiagnosticService/WorkRecord"
  },
  "PRBSTest": {
    "@odata.id": "/redfish/v1/Managers/1/DiagnosticService/PRBSTest"
  },
  "ContaminationDetection": {
    "@odata.id": "/redfish/v1/Managers/1/DiagnosticService/ContaminationDetection"
  },
  "Actions": {
    "#DiagnosticService.StopVideoPlayback": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.StopVideoPlayback",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/StopVideoPlaybackActionInfo"
    },
    "#DiagnosticService.ExportVideo": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportVideo",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportVideoActionInfo"
    },
    "#DiagnosticService.CaptureScreenShot": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.CaptureScreenShot",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/CaptureScreenShotActionInfo"
    },
    "#DiagnosticService.DeleteScreenShot": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.DeleteScreenShot",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/DeleteScreenShotActionInfo"
    },
    "#DiagnosticService.ExportBlackBox": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportBlackBox",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportBlackBoxActionInfo"
    },
    "#DiagnosticService.ExportSerialPortData": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportSerialPortData",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportSerialPortDataActionInfo"
    },
    "#DiagnosticService.ExportNPULog": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportNPULog",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportNPULogActionInfo"
    },
    "#DiagnosticService.StartCollectDrivesLog": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.StartCollectDrivesLog",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/StartCollectDrivesLogActionInfo"
    },
    "#DiagnosticService.ExportDiagnosticMetrics": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportDiagnosticMetrics",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportDiagnosticMetricsActionInfo"
    }
  }
}

响应码:200

PATCH

命令功能

修改诊断服务资源

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService

请求头:

X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value

请求消息体:

json
{
  "VideoRecordingEnabled": videorecordingenabled_value,
  "ScreenShotEnabled": screenshotenabled_value,
  "PCIeInterfaceEnabled": pcieinterfaceenabled_value,
  "BlackBoxDumpEnabled": blackboxdumpenabled_value,
  "BlackBoxEnabled": blackboxenabled_value,
  "SerialPortDataEnabled": serialportdataenabled_value,
  "DfpServiceEnabled": dfpserviceenabled_value,
  "DiskSubhealthFunction": {
    "LifespanEstimateEnabled": lifespanestimateenabled_value,
    "LifespanEstimateAlarmEnabled": lifespanestimatealarmenabled_value,
    "OpticalModuleSubhealthFunction": {
      "DeteriorationPredictionEnabled": DeteriorationPredictionEnabled_value,
      "DrivesLogCollectEnable": driveslogcollectenable_value,
      "DrivesLogCollectInterval": driveslogcollectinterval_value
    }
  }
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
videorecordingenabled_value开启或关闭录像功能说明GA140C机型不支持● true
● false
screenshotenabled_value开启或关闭屏幕截图功能说明GA140C机型不支持● true
● false
pcieinterfaceenabled_value启用或关闭PCIe接口功能说明GA140C机型不支持● true
● false
blackboxdumpenabled_value启用或关闭黑匣子数据下载功能● true
● false
blackboxenabled_value同时启用或关闭PCIe接口功能和黑匣子数据下载功能说明GA140C机型不支持● true
● false
serialportdataenabled_value启用或关闭串口数据下载记录功能说明GA140C机型不支持● true
● false
dfpserviceenabled_value启用或关闭硬盘和链路故障预测功能● true
● false
lifespanestimateenabled_value启用或关闭硬盘预估寿命过开关功能说明关闭硬盘预估寿命功能开关,硬盘预估寿命过低告警功能不生效● true
● false
lifespanestimatealarmenabled_value启用或关闭硬盘预估寿命过低告警功能● true
● false
DeteriorationPredictionEnabled_value启用或关闭光模块老化预测功能● true
● false
driveslogcollectenable_value启用或关闭硬盘日志自动收集功能● true
● false
driveslogcollectinterval_value硬盘日志自动收集开启周期1~255的整数,单位为小时,默认为24

使用指南

使用实例

请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService

X-Auth-Token: auth_value Content-Type: header_type If-Match: ifmatch_value 请求消息体:

json
{
  "VideoRecordingEnabled": videorecordingenabled_value,
  "ScreenShotEnabled": screenshotenabled_value,
  "PCIeInterfaceEnabled": pcieinterfaceenabled_value,
  "BlackBoxDumpEnabled": blackboxdumpenabled_value,
  "BlackBoxEnabled": blackboxenabled_value,
  "SerialPortDataEnabled": serialportdataenabled_value,
  "DfpServiceEnabled": dfpserviceenabled_value,
  "DiskSubhealthFunction": {
    "LifespanEstimateEnabled": lifespanestimateenabled_value,
    "LifespanEstimateAlarmEnabled": lifespanestimatealarmenabled_value,
    "OpticalModuleSubhealthFunction": {
      "DeteriorationPredictionEnabled": DeteriorationPredictionEnabled_value,
      "DrivesLogCollectEnable": driveslogcollectenable_value,
      "DrivesLogCollectInterval": driveslogcollectinterval_value
    }
  }
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#HwDiagnosticService.HwDiagnosticService",
  "@odata.id": "/redfish/v1/Managers/1/DiagnosticService",
  "@odata.type": "#HwDiagnosticService.v1_0_0.HwDiagnosticService",
  "Id": "DiagnosticService",
  "Name": "Diagnostic",
  "VideoRecordingEnabled": true,
  "ScreenShotEnabled": true,
  "PCIeInterfaceEnabled": true,
  "BlackBoxDumpEnabled": true,
  "BlackBoxEnabled": true,
  "SerialPortDataEnabled": true,
  "DfpServiceEnabled": true,
  "DiskSubhealthFunction": {
    "LifespanEstimateEnabled": true,
    "LifespanEstimateAlarmEnabled": true
  },
  "OpticalModuleSubhealthFunction": {
    "DeteriorationPredictionEnabled": true
  },
  "VideoPlaybackConnNum": 0,
  "VideoRecordInfo": [
    {
      "VideoSizeByte": 7738538,
      "CreateTime": "2019-06-12 07:14:20"
    },
    null,
    null
  ],
  "ScreenShotCreateTime": [
    "2019-06-12 18:17:36",
    "2019-06-12 09:46:50",
    "2019-06-12 07:14:35",
    "2019-06-12 09:36:45"
  ],
  "DrivesLogCollectEnable": true,
  "DrivesLogCollectInterval": 24,
  "Oem": {
    "Public": {
      "BlackBoxSize": 4194304,
      "SerialPortDataSize": 2097152
    }
  },
  "WorkRecord": {
    "@odata.id": "/redfish/v1/Managers/1/DiagnosticService/WorkRecord"
  },
  "Actions": {
    "#DiagnosticService.StopVideoPlayback": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.StopVideoPlayback",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/StopVideoPlaybackActionInfo"
    },
    "#DiagnosticService.ExportVideo": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportVideo",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportVideoActionInfo"
    },
    "#DiagnosticService.CaptureScreenShot": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.CaptureScreenShot",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/CaptureScreenShotActionInfo"
    },
    "#DiagnosticService.DeleteScreenShot": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.DeleteScreenShot",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/DeleteScreenShotActionInfo"
    },
    "#DiagnosticService.ExportBlackBox": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportBlackBox",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportBlackBoxActionInfo"
    },
    "#DiagnosticService.StartCollectDrivesLog": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.StartCollectDrivesLog",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/StartCollectDrivesLogActionInfo"
    },
    "#DiagnosticService.ExportSerialPortData": {
      "target": "/redfish/v1/Managers/1/DiagnosticService/Actions/DiagnosticService.ExportSerialPortData",
      "@Redfish.ActionInfo": "/redfish/v1/Managers/1/DiagnosticService/ExportSerialPortDataActionInfo"
    }
  }
}

响应码:200

POST (ACTION)

StopVideoPlayback

命令功能

停止录像回放

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.StopVideoPlayback

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{}

请求头参数说明

参见 请求头参数说明

请求体参数说明

使用指南

GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.StopVideoPlayback

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{}

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_0_0.Message",
        "MessageId": "Base.1.0.Success",
        "RelatedProperties": [],
        "Message": "Successfully Completed Request",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200

POST (ACTION)

ExportVideo

命令功能

导出录像

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportVideo

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "Type": type_value,
  "Content": Content,
  "VideoType": video_type
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”
● 远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp
video_type录像类型● OsresetVideo:重启录像
● CaterrorVideo:CPU出错录像
● PoweroffVideo:关机录像

使用指南

GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportVideo

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "Type": type_value,
  "Content": Content,
  "VideoType": video_type
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "1",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

Screenshot

命令功能

截屏

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.CaptureScreenShot

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{}

请求头参数说明

参见 请求头参数说明

请求体参数说明

使用指南

GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.CaptureScreenShot

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

StartVideoRecording

命令功能

删除截屏

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.DeleteScreenShot

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{}

请求头参数说明

参见 请求头参数说明

请求体参数说明

使用指南

GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.DeleteScreenShot

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{}

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_0_0.Message",
        "MessageId": "Base.1.0.Success",
        "RelatedProperties": [],
        "Message": "Successfully Completed Request",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200

POST (ACTION)

StopVideoRecording

命令功能

导出黑匣子

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportBlackBox

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”
● 远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp

使用指南

GA140C机型不支持

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportBlackBox

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "1",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

ExportKvmLog

命令功能

导出串口数据

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportSerialPortData

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”

使用指南

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportSerialPortData

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "1",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

ExportNPULog

命令功能

导出 NPU 日志

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportNPULog

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "NpuId": npu_id,
  "Type": type_value,
  "Content": Content
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”
● 远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp

使用指南

NPU芯片日志收集时长与具体机型和硬件配置相关,可能会耗时较长。

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportNPULog

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "NpuId": npu_id,
  "Type": type_value,
  "Content": Content
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "1",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

ExportNPUDeviceLog

命令功能

导出 NPU 运行日志

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportNPUDeviceLog

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "NpuId": npu_id,
  "Type": type_value,
  "LogType": logtype_value,
  "Content": Content
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
logtype_valueNPU日志类型支持的日志类型包括
● Blackbox
● Device
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”
● 远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp

使用指南

NPU芯片日志收集时长与具体机型和硬件配置相关,可能会耗时较长。

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportNPUDeviceLog

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "NpuId": npu_id,
  "Type": type_value,
  "LogType": logtype_value,
  "Content": Content
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "1",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "PercentComplete": null,
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

ExportDiagnosticMetrics

命令功能

导出诊断度量数据

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportDiagnosticMetrics

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
type_value导出类型● URI
Content导出文件路径操作路径
● 本地导出:“/tmp/文件路径”
● 远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp

使用指南

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.ExportDiagnosticMetrics

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "Type": type_value,
  "Content": Content
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
  "@odata.type": "#Task.v1_0_2.Task",
  "@odata.id": "/redfish/v1/TaskService/Tasks/1",
  "Id": "1",
  "Name": "export diagnostic metrics data",
  "Description": "",
  "TaskState": "Running",
  "TaskStatus": "OK",
  "StartTime": "2017-05-09T16:57:14+00:00",
  "Messages": [],
  "PercentComplete": null,
  "Oem": {
    "Public": {
      "TaskPercentage": null
    }
  }
}

响应码:202

POST (ACTION)

StartCollectDrivesLog

命令功能

收集硬盘日志信息

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.StartCollectDrivesLog

请求头:

X-Auth-Token: auth_value
Content-Type: header_type

请求消息体:

json
{
  "DriveName": "drive_name"
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
drive_name硬盘名称字符串,取值范围指定硬盘名称:收集指定硬盘日志信息不指定硬盘名称:“*”表示收集所有硬盘日志信息

使用指南

使用实例

请求样例: POST https://device_ip/redfish/v1/Managers/manager_id/DiagnosticService/Actions/DiagnosticService.StartCollectDrivesLog

X-Auth-Token: auth_value Content-Type: header_type 请求消息体:

json
{
  "DriveName": "drive_name"
}

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_0_0.Message",
        "MessageId": "Base.1.0.Success",
        "RelatedProperties": [],
        "Message": "Successfully Completed Request",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      }
    ]
  }
}

响应码:200