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

ssdhealth_design.md update content #575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions doc/ssdhealth_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ It will import device plugin `ssdutil.py` and print the output returned by diffe

**Syntax:**

root@mts-sonic-dut:/home/admin# ssdhealth -h
root@mts-sonic-dut:/home/admin# ssdutil -h
usage: ssdhealth -d DEVICE [-h] [-v] [-e]

Show disk device health status
Expand All @@ -81,22 +81,22 @@ It will import device plugin `ssdutil.py` and print the output returned by diffe
-e, --vEndor show vendor specific disk information

Examples:
ssdhealth -d /dev/sda
ssdhealth -d /dev/sda -v
ssdhealth -d /dev/sda -e
ssdutil -d /dev/sda
ssdutil -d /dev/sda -v
ssdutil -d /dev/sda -e


#### Plugins design
##### Class SsdBase
Location: `sonic-buildimage/src/sonic-platform-common/sonic_platform_base/sonic_ssd/ssd_base.py`
Generic implementation of the API. Will use specific utilities for known disks or the `systemctl` utility for others. Since not all disk models are in smartctl's database, some information can be unavailable or incomplete.
Generic implementation of the API. Will use specific utilities for known disks or the `smartctl` utility for others. Since not all disk models are in smartctl's database, some information can be unavailable or incomplete.

class SsdBase:
...

##### Class SsdUtil
Inherited from SsdBase. Can be implemented by vendors to provide detailed info about the disk installed.
Location: `sonic-buildimage/device/{{vendor}}/platform/plugins/ssdutil.py`
Location: `sonic-buildimage/device/{{vendor}}/platform/plugins/ssd_util.py`

class SsdUtil(SsdBase):
...
Expand Down Expand Up @@ -152,4 +152,3 @@ Daemon in Pmon (ssdmond) which will periodically query disk health (get_health()
## Open questions
1. Daemon and monitoring?
2. SNMP needed?