summaryrefslogtreecommitdiff
path: root/op-mode-definitions/show-hardware.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-23 10:35:20 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-23 10:42:12 +0200
commit86f951b2b821c24e07a434e8d62eb7d0f6e061ca (patch)
treec851c91b74953a880299ab63735a12679232c225 /op-mode-definitions/show-hardware.xml.in
parent5f9d07f4d1aff0d1b23ebf5cceefc32ee16dde74 (diff)
downloadvyos-1x-86f951b2b821c24e07a434e8d62eb7d0f6e061ca.tar.gz
vyos-1x-86f951b2b821c24e07a434e8d62eb7d0f6e061ca.zip
op-mode: storage: T3572: add S.M.A.R.T. status support
vyos@vyos:~$ show hardware storage nvme Node SN Model Namespace Usage Format FW Rev ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- /dev/nvme0n1 S437Nxxxxxxxxx SAMSUNG MZQLB960HAJR-00007 1 25.17 GB / 960.20 GB 512 B + 0 B EDA5202Q /dev/nvme1n1 S437Nxxxxxxxxx SAMSUNG MZQLB960HAJR-00007 1 38.36 GB / 960.20 GB 512 B + 0 B EDA5202Q vyos@vyos:~$ show hardware storage smart nvme0n1 === START OF INFORMATION SECTION === Model Number: SAMSUNG MZQLB960HAJR-00007 Serial Number: S437Nxxxxxxxxx ... (cherry picked from commit 2e44365dad5f8dd6a495070d36c590319a421c28)
Diffstat (limited to 'op-mode-definitions/show-hardware.xml.in')
-rw-r--r--op-mode-definitions/show-hardware.xml.in34
1 files changed, 28 insertions, 6 deletions
diff --git a/op-mode-definitions/show-hardware.xml.in b/op-mode-definitions/show-hardware.xml.in
index 0df2e4404..20fdd753d 100644
--- a/op-mode-definitions/show-hardware.xml.in
+++ b/op-mode-definitions/show-hardware.xml.in
@@ -53,18 +53,40 @@
</node>
</children>
</node>
- <node name="scsi">
+ <node name="storage">
<properties>
- <help>Show SCSI device information</help>
+ <help>Show system storage information</help>
</properties>
- <command>lsscsi</command>
<children>
- <node name="detail">
+ <leafNode name="nvme">
+ <properties>
+ <help>Show NVMe device information</help>
+ </properties>
+ <command>sudo nvme list</command>
+ </leafNode>
+ <node name="scsi">
<properties>
- <help>Show detailed SCSI device information</help>
+ <help>Show SCSI device information</help>
</properties>
- <command>lsscsi -vvv</command>
+ <command>lsscsi</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show detailed SCSI device information</help>
+ </properties>
+ <command>lsscsi -vvv</command>
+ </node>
+ </children>
</node>
+ <tagNode name="smart">
+ <properties>
+ <help>Show S.M.A.R.T. device information</help>
+ <completionHelp>
+ <script>ls /dev | egrep '([hsv]d[a-z]|nvme[0-9]+n[0-9])$'</script>
+ </completionHelp>
+ </properties>
+ <command>sudo smartctl -a "/dev/$5" | sed 1,3d</command>
+ </tagNode>
</children>
</node>
<node name="usb">