Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSD Health CLI utility #587

Merged
merged 5 commits into from
Sep 17, 2019
Merged

Conversation

andriymoroz-mlnx
Copy link
Collaborator

@andriymoroz-mlnx andriymoroz-mlnx commented Jul 24, 2019

Signed-off-by: Andriy Moroz c_andriym@mellanox.com

- What I did
Added CLI for SSH Health API

- How I did it
utility + "show platform ssdhealth"

- How to verify it

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)
Output examples for different SSD models:

root@arc-switch1038:/home/admin# show platform ssdhealth
Device Model : StorFly VSFBM4XC030G-MLX
Health       : 99.635%
Temperature  : 47C

root@arc-switch1038:/home/admin# show platform ssdhealth --verbose
Command: ssdutil -d /dev/sda -v
Device Model : StorFly VSFBM4XC030G-MLX
Firmware     : 0728-000
Serial       : P1T14004420709110047
Health       : 99.635%
Temperature  : 47C
root@arc-switch1038:/home/admin#

root@mts-sonic-dut:/home/admin# show platform ssdhealth
Device Model : InnoDisk Corp. - mSATA 3ME
Health       : 30.067%
Temperature  : 0C

root@mts-sonic-dut:/home/admin# show platform ssdhealth --verbose
Command: ssdutil -d /dev/sda -v
Device Model : InnoDisk Corp. - mSATA 3ME
Firmware     : S140714
Serial       : 20160404AA140000004B
Health       : 30.067%
Temperature  : 0C

-->

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
@andriymoroz-mlnx andriymoroz-mlnx marked this pull request as ready for review August 19, 2019 10:14
@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Aug 19, 2019

retest please

ssdutil/main.py Outdated Show resolved Hide resolved
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
@andriymoroz-mlnx
Copy link
Collaborator Author

Last update skips health and temperature units if value is N/A
e.g.

Before:
root@arc-switch1038:/home/admin# show platform ssdhealth
Device Model : StorFly VSFBM4XC030G-MLX
Health       : 99.575%
Temperature  : 47C

root@arc-switch1038:/home/admin# show platform ssdhealth /dev/sdb
Device Model : N/A
Health       : N/A%
Temperature  : N/AC

After:
root@arc-switch1038:/home/admin# show platform ssdhealth
Device Model : StorFly VSFBM4XC030G-MLX
Health       : 99.575%
Temperature  : 43C

root@arc-switch1038:/home/admin# show platform ssdhealth /dev/sdb
Device Model : N/A
Health       : N/A
Temperature  : N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants