Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/bio/bio_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ struct bio_dma_buffer {
X(bdh_unsafe_shutdowns, "unsafe_shutdowns", \
"Number of unsafe shutdowns (no notification prior to power loss)", \
"shutdowns", D_TM_COUNTER) \
X(bdh_percentage_used, "percentage_used", \
"Percentage as canonical NAND-life indicator, hits 100 when the drive has consumed its rated endurance",\
"percents", D_TM_GAUGE) \
X(bdh_temp, "temp/current", \
"Current SSD temperature", \
"kelvins", D_TM_GAUGE) \
Expand Down
2 changes: 2 additions & 0 deletions src/bio/bio_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ populate_health_stats(struct bio_dev_health *bdh)
dev_state->unsafe_shutdowns = page->unsafe_shutdowns[0];
d_tm_set_counter(bdh->bdh_unsafe_shutdowns,
page->unsafe_shutdowns[0]);
dev_state->percentage_used = page->percentage_used;
d_tm_set_gauge(bdh->bdh_percentage_used, page->percentage_used);

/** temperature */
dev_state->warn_temp_time = page->warning_temp_time;
Expand Down
1 change: 1 addition & 0 deletions src/control/lib/spdk/src/nvme_control_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ populate_dev_health(struct nvme_stats *stats,
stats->read_only_warn = cw.bits.read_only ? true : false;
stats->volatile_mem_warn = cw.bits.volatile_memory_backup ?
true : false;
stats->percentage_used = hp->percentage_used;

/* Intel Smart Information Attributes */
if ((cdata == NULL) || (cdata->vid != SPDK_PCI_VID_INTEL))
Expand Down
1 change: 1 addition & 0 deletions src/include/daos_srv/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct nvme_stats {
uint64_t unsafe_shutdowns;
uint64_t media_errs;
uint64_t err_log_entries;
uint8_t percentage_used;
/* I/O error counters */
uint32_t bio_read_errs;
uint32_t bio_write_errs;
Expand Down
1 change: 1 addition & 0 deletions src/proto/ctl/smd.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// (C) Copyright 2019-2024 Intel Corporation.

Check failure on line 2 in src/proto/ctl/smd.proto

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down Expand Up @@ -79,6 +79,7 @@
uint32 link_max_width = 51; // maximum width (number of lanes)
float link_neg_speed = 52; // negotiated speed in transactions per second
uint32 link_neg_width = 53; // negotiated width (number of lanes)
uint32 percentage_used = 54;
}

enum NvmeDevState {
Expand Down
Loading