summaryrefslogtreecommitdiff
path: root/op-mode-definitions
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:41:35 +0200
commit2e44365dad5f8dd6a495070d36c590319a421c28 (patch)
treef17c6b0f14393c72a1fc1f8a9f43ef0b16774afa /op-mode-definitions
parent51899c362f2eba1dd067414f2dfa8e78f30ca408 (diff)
downloadvyos-1x-2e44365dad5f8dd6a495070d36c590319a421c28.tar.gz
vyos-1x-2e44365dad5f8dd6a495070d36c590319a421c28.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 ...
Diffstat (limited to 'op-mode-definitions')
-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">