Skip to content
Merged
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
45 changes: 45 additions & 0 deletions Documentation/nvme-get-log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,51 @@ OPTIONS
-i <log-id>::
--log-id=<log-id>::
Sets the commands requested log-id to <log-id>. Defaults to 0.
+
[]
|=================
|Value|Definition
|0x00 \| 'supported-log-pages'| Supported Log Pages
|0x01 \| 'error'| Error Information
|0x02 \| 'smart'| SMART / Health Information
|0x03 \| 'fw-slot'| Firmware Slot Information
|0x04 \| 'changed-ns'| Changed Namespace List
|0x05 \| 'cmd-effects'| Commands Supported and Effects
|0x06 \| 'device-self-test'| Device Self-test
|0x07 \| 'telemetry-host'| Telemetry Host-Initiated
|0x08 \| 'telemetry-ctrl'| Telemetry Controller-Initiated
|0x09 \| 'endurance-group'| Endurance Group Information
|0x0a \| 'predictable-lat-nvmset'| Predictable Latency Per NVM Set
|0x0b \| 'predictable-lat-agg'| Predictable Latency Event Aggregate
|0x0c \| 'ana'| Asymmetric Namespace Access
|0x0d \| 'persistent-event'| Persistent Event Log
|0x0e \| 'lba-status'| LBA Status Information
|0x0f \| 'endurance-grp-evt'| Endurance Group Event Aggregate
|0x10 \| 'media-unit-status'| Media Unit Status
|0x11 \| 'supported-cap-config-list'| Supported Capacity Configuration Lis
|0x12 \| 'fid-supported-effects'| Feature Identifiers Supported and Effects
|0x13 \| 'mi-cmd-supported-effects'| NVMe-MI Commands Supported and Effects
|0x14 \| 'cmd-and-feat-lockdown'| Command and Feature Lockdown
|0x15 \| 'boot-partition'| Boot Partition
|0x16 \| 'rotational-media-info'| Rotational Media Information
|0x17 \| 'dispersed-ns-participating-ns'| Dispersed Namespace Participating NVM Subsystems
|0x18 \| 'mgmt-addr-list'| Management Address List
|0x19 \| 'phy-rx-eom'| Physical Interface Receiver Eye Opening Measurement
|0x1a \| 'reachability-groups'| Reachability Groups
|0x1b \| 'reachability-associations'| Reachability Associations
|0x1c \| 'changed-alloc-ns-list'| Changed Allocated Namespace List
|0x20 \| 'fdp-configs'| FDP Configurations
|0x21 \| 'fdp-ruh-usage'| Reclaim Unit Handle Usage
|0x22 \| 'fdp-stats'| FDP Statistics
|0x23 \| 'fdp-events'| FDP Events
|0x70 \| 'discover'| Discovery
|0x71 \| 'host-discover'| Host Discovery
|0x72 \| 'ave-discover'| AVE Discovery
|0x73 \| 'pull-model-ddc-req'| Pull Model DDC Request
|0x80 \| 'reservation'| Reservation Notification
|0x81 \| 'sanitize'| Sanitize Status
|0xbf \| 'zns-changed-zones'| Changed Zone List
|=================

-a <aen>::
--aen=<aen>::
Expand Down
48 changes: 47 additions & 1 deletion nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2359,9 +2359,55 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
.xfer_len = 4096,
};

OPT_VALS(log_name) = {
VAL_BYTE("supported-log-pages", NVME_LOG_LID_SUPPORTED_LOG_PAGES),
VAL_BYTE("error", NVME_LOG_LID_ERROR),
VAL_BYTE("smart", NVME_LOG_LID_SMART),
VAL_BYTE("fw-slot", NVME_LOG_LID_FW_SLOT),
VAL_BYTE("changed-ns", NVME_LOG_LID_CHANGED_NS),
VAL_BYTE("cmd-effects", NVME_LOG_LID_CMD_EFFECTS),
VAL_BYTE("device-self-test", NVME_LOG_LID_DEVICE_SELF_TEST),
VAL_BYTE("telemetry-host", NVME_LOG_LID_TELEMETRY_HOST),
VAL_BYTE("telemetry-ctrl", NVME_LOG_LID_TELEMETRY_CTRL),
VAL_BYTE("endurance-group", NVME_LOG_LID_ENDURANCE_GROUP),
VAL_BYTE("predictable-lat-nvmset", NVME_LOG_LID_PREDICTABLE_LAT_NVMSET),
VAL_BYTE("predictable-lat-agg", NVME_LOG_LID_PREDICTABLE_LAT_AGG),
VAL_BYTE("ana", NVME_LOG_LID_ANA),
VAL_BYTE("persistent-event", NVME_LOG_LID_PERSISTENT_EVENT),
VAL_BYTE("lba-status", NVME_LOG_LID_LBA_STATUS),
VAL_BYTE("endurance-grp-evt", NVME_LOG_LID_ENDURANCE_GRP_EVT),
VAL_BYTE("media-unit-status", NVME_LOG_LID_MEDIA_UNIT_STATUS),
VAL_BYTE("supported-cap-config-list", NVME_LOG_LID_SUPPORTED_CAP_CONFIG_LIST),
VAL_BYTE("fid-supported-effects", NVME_LOG_LID_FID_SUPPORTED_EFFECTS),
VAL_BYTE("mi-cmd-supported-effects", NVME_LOG_LID_MI_CMD_SUPPORTED_EFFECTS),
VAL_BYTE("cmd-and-feat-lockdown", NVME_LOG_LID_CMD_AND_FEAT_LOCKDOWN),
VAL_BYTE("boot-partition", NVME_LOG_LID_BOOT_PARTITION),
VAL_BYTE("rotational-media-info",
NVME_LOG_LID_ROTATIONAL_MEDIA_INFO),
VAL_BYTE("dispersed-ns-participating-ns",
NVME_LOG_LID_DISPERSED_NS_PARTICIPATING_NSS),
VAL_BYTE("mgmt-addr-list", NVME_LOG_LID_MGMT_ADDR_LIST),
VAL_BYTE("phy-rx-eom", NVME_LOG_LID_PHY_RX_EOM),
VAL_BYTE("reachability-groups", NVME_LOG_LID_REACHABILITY_GROUPS),
VAL_BYTE("reachability-associations", NVME_LOG_LID_REACHABILITY_ASSOCIATIONS),
VAL_BYTE("changed-alloc-ns-list", NVME_LOG_LID_CHANGED_ALLOC_NS_LIST),
VAL_BYTE("fdp-configs", NVME_LOG_LID_FDP_CONFIGS),
VAL_BYTE("fdp-ruh-usage", NVME_LOG_LID_FDP_RUH_USAGE),
VAL_BYTE("fdp-stats", NVME_LOG_LID_FDP_STATS),
VAL_BYTE("fdp-events", NVME_LOG_LID_FDP_EVENTS),
VAL_BYTE("discover", NVME_LOG_LID_DISCOVER),
VAL_BYTE("host-discover", NVME_LOG_LID_HOST_DISCOVER),
VAL_BYTE("ave-discover", NVME_LOG_LID_AVE_DISCOVER),
VAL_BYTE("pull-model-ddc-req", NVME_LOG_LID_PULL_MODEL_DDC_REQ),
VAL_BYTE("reservation", NVME_LOG_LID_RESERVATION),
VAL_BYTE("sanitize", NVME_LOG_LID_SANITIZE),
VAL_BYTE("zns-changed-zones", NVME_LOG_LID_ZNS_CHANGED_ZONES),
VAL_END()
};

NVME_ARGS(opts,
OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_desired),
OPT_BYTE("log-id", 'i', &cfg.log_id, log_id),
OPT_BYTE("log-id", 'i', &cfg.log_id, log_id, log_name),
OPT_UINT("log-len", 'l', &cfg.log_len, log_len),
OPT_UINT("aen", 'a', &cfg.aen, aen),
OPT_SUFFIX("lpo", 'L', &cfg.lpo, lpo),
Expand Down