diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-05-23 10:35:20 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-05-23 10:41:35 +0200 |
commit | 2e44365dad5f8dd6a495070d36c590319a421c28 (patch) | |
tree | f17c6b0f14393c72a1fc1f8a9f43ef0b16774afa | |
parent | 51899c362f2eba1dd067414f2dfa8e78f30ca408 (diff) | |
download | vyos-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
...
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | op-mode-definitions/show-hardware.xml.in | 34 |
2 files changed, 30 insertions, 6 deletions
diff --git a/debian/control b/debian/control index 5d58f1a96..8ce2862c7 100644 --- a/debian/control +++ b/debian/control @@ -78,6 +78,7 @@ Depends: nginx-light, ntp, ntpdate, + nvme-cli, ocserv, openssh-server, openssl, @@ -113,6 +114,7 @@ Depends: qrencode, radvd, salt-minion, + smartmontools, snmp, snmpd, squid, 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"> |