@@ -152,17 +152,33 @@ $ xe host-call-plugin host-uuid=<uuid> plugin=lsblk.py fn=list_block_devices
152
152
153
153
## Smartctl parser
154
154
155
- A xapi plugin to get information and health of physical disks on the host
155
+ This XAPI plugin provides information and health details for the physical disks on the host.
156
+
157
+ It uses the ` smartctl --scan ` command to retrieve the list of devices. For devices managed by
158
+ MegaRAID, the device names may be identical. To handle this, the plugin returns information
159
+ for each unique "name: type " pair.
160
+
161
+ The plugin parses the JSON output from the ` smartctl ` command to gather information and health
162
+ data. As a result, it requires a version of ` smartctl ` capable of producing JSON output.
163
+ This functionality is available in ** XCP-ng 8.3** , but not in ** XCP-ng 8.2** .
164
+
156
165
### ` information ` :
166
+
167
+ This function returns information about all detected devices. The JSON can be quite big.
168
+
157
169
```
158
170
xe host-call-plugin host-uuid=<uuid> plugin=smartctl.py fn=information
159
- {"/dev/sdf": {"power_on_time": {"hours": 9336}, "ata_version": {"minor_value": 94, "string": "ACS-4 T13/BSR INCITS 529 revision 5", "major_value": 2556}, "form_factor": {"ata_value": 3, "name": "2.5 inches"}, "firmware_version": "SVQ02B6Q", "wwn": {"oui": 9528, "naa": 5, "id": 65536604056}, "smart_status": {"passed": true}, "smartctl": {"build_info": "(local build)", "exit_status": 0, "argv": ["smartctl", "-j", "-a", "/dev/sdf"], "version": [7, 0], "svn_revision": "4883", "platform_info": "x86_64-linux-4.19.0+1"}, "temperature": {"current": 35}, "rotation_rate": 0, "interface_speed": {"current": {"sata_value": 3, "units_per_second": 60, "string": "6.0 Gb/s", "bits_per_unit": 100000000}, [...] }
171
+ {"/dev/nvme1:nvme": {"smart_status": {"nvme": {"value": 0}, "passed": true}, "nvme_controller_id": 0, "smartctl": {"build_info": "(local build)", "exit_status": 0, "argv": ["smartctl", "-j", "-a", "-d", "nvme",
172
+ "/dev/nvme1"], "version": [7, 0], "svn_revision": "4883", "platform_info": "x86_64-linux-4.19.0+1"}, "temperature": {"current": 32}, ...
160
173
```
161
174
162
175
### ` health ` :
176
+
177
+ This function returns health status per detected devices.
178
+
163
179
```
164
180
xe host-call-plugin host-uuid=<uuid> plugin=smartctl.py fn=health
165
- {"/dev/sdf ": "PASSED", "/dev/sdg ": "PASSED", "/dev/sdd ": "PASSED", "/dev/sde": "PASSED", "/dev/sdb" : "PASSED", "/dev/sdc": "PASSED", "/dev/sda ": "PASSED"}
181
+ {"/dev/nvme1:nvme ": "PASSED", "/dev/sda:scsi ": "PASSED", "/dev/nvme0:nvme ": "PASSED", "/dev/bus/0:megaraid,1" : "PASSED", "/dev/bus/0:megaraid,0 ": "PASSED"}
166
182
```
167
183
168
184
## Netdata
0 commit comments