-
Notifications
You must be signed in to change notification settings - Fork 78
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
Small fixes & added NVMe total capacity metric #154
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@host /]# nvme list
Node SN Model Namespace Usage Format FW Rev
--------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 BTAC212301FS3P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300
/dev/nvme1n1 BTAX238301TZ3P8CGN INTEL SSDPF2KX038T1 1 3.84 TB / 3.84 TB 4 KiB + 8 B 9CV10410
/dev/nvme10n1 22293A3A9C71 Micron_7450_MTFDKCC3T8TFR 1 3.70 TB / 3.84 TB 4 KiB + 0 B E2MU110
/dev/nvme11n1 22293A3A9C5C Micron_7450_MTFDKCC3T8TFR 1 3.70 TB / 3.84 TB 4 KiB + 0 B E2MU110
/dev/nvme2n1 BTAX238300MC3P8CGN INTEL SSDPF2KX038T1 1 3.84 TB / 3.84 TB 4 KiB + 8 B 9CV10410
/dev/nvme3n1 BTAX238400FK3P8CGN INTEL SSDPF2KX038T1 1 3.84 TB / 3.84 TB 4 KiB + 8 B 9CV10410
/dev/nvme4n1 BTAC2123020Z3P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300
/dev/nvme5n1 BTAX238303YY3P8CGN INTEL SSDPF2KX038T1 1 3.84 TB / 3.84 TB 4 KiB + 8 B 9CV10410
/dev/nvme6n1 BTAC2123016Q3P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300
/dev/nvme7n1 BTAC212200WZ3P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300
/dev/nvme8n1 BTAC212300M23P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300
/dev/nvme9n1 BTAC212302203P8AGN INTEL SSDPF2KX038TZ 1 3.84 TB / 3.84 TB 4 KiB + 8 B JCV10300 |
NiceGuyIT
requested changes
Aug 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple spelling changes and discussion about metric name.
1a30235
to
687c93d
Compare
NiceGuyIT
reviewed
Aug 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last one
* remove redundant meta labels from SCSI metrics * added `smartctl_device_nvme_capacity_bytes` metric * for some devices, such as 2.5" NVMe Intel & Micron the `family` field may be empty The `.user_capacity` exists only when NVMe have single namespace. Otherwise, for NVMe deivces with multiple namespaces, when device name used witout namespace number (exporter case) `.user_capacity` will be absent ``` smartctl --info --health --attributes \ --tolerance=verypermissive --nocheck=standby --format=brief --log=error \ /dev/nvme11 --json | jq '.user_capacity' null smartctl --info --health --attributes \ --tolerance=verypermissive --nocheck=standby --format=brief --log=error \ /dev/nvme11 --json | jq '.nvme_total_capacity' 3840755982336 ``` Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mineBlockSize()
frommineCapacity()
smartctl_device_nvme_capacity_bytes
metricfamily
field may be emptyThe
.user_capacity
exists only when NVMe have single namespace. Otherwise, for NVMe deivces with multiple namespaces, when device name used witout namespace number (exporter case).user_capacity
will be absent