当前位置: 首页 > news >正文

NVM Command学习

ubuntu系统安装nvme-cli,可以在应用层发起命令。

sudo apt install nvme-cli
$ sudo nvme --help
nvme-1.9
usage: nvme <command> [<device>] [<args>]The '<device>' may be either an NVMe character device (ex: /dev/nvme0) or an
nvme block device (ex: /dev/nvme0n1).The following are all implemented sub-commands:list                  List all NVMe devices and namespaces on machinelist-subsys           List nvme subsystemsid-ctrl               Send NVMe Identify Controllerid-ns                 Send NVMe Identify Namespace, display structureid-ns-granularity     Send NVMe Identify Namespace Granularity List, display structurelist-ns               Send NVMe Identify List, display structurelist-ctrl             Send NVMe Identify Controller List, display structurelist-secondary        List Secondary Controllers associated with a Primary Controllerns-descs              Send NVMe Namespace Descriptor List, display structureid-nvmset             Send NVMe Identify NVM Set List, display structureid-uuid               Send NVMe Identify UUID List, display structurecreate-ns             Creates a namespace with the provided parametersdelete-ns             Deletes a namespace from the controllerattach-ns             Attaches a namespace to requested controller(s)detach-ns             Detaches a namespace from requested controller(s)get-ns-id             Retrieve the namespace ID of opened block deviceget-log               Generic NVMe get log, returns log in raw formattelemetry-log         Retrieve FW Telemetry log write to filefw-log                Retrieve FW Log, show itchanged-ns-list-log   Retrieve Changed Namespace List, show itsmart-log             Retrieve SMART Log, show itana-log               Retrieve ANA Log, show iterror-log             Retrieve Error Log, show iteffects-log           Retrieve Command Effects Log, show itendurance-log         Retrieve Endurance Group Log, show itget-feature           Get feature and show the resulting valuedevice-self-test      Perform the necessary tests to observe the performanceself-test-log         Retrieve the SELF-TEST Log, show itset-feature           Set a feature and show the resulting valueset-property          Set a property and show the resulting valueget-property          Get a property and show the resulting valueformat                Format namespace with new block formatfw-commit             Verify and commit firmware to a specific slot (fw-activate in old version < 1.2)fw-download           Download new firmwareadmin-passthru        Submit an arbitrary admin command, return resultsio-passthru           Submit an arbitrary IO command, return resultssecurity-send         Submit a Security Send command, return resultssecurity-recv         Submit a Security Receive command, return resultsget-lba-status        Submit a Get LBA Status command, return resultsresv-acquire          Submit a Reservation Acquire, return results

内核当中描述描述coommand的结构体。64字节。

struct nvme_command {union {struct nvme_common_command common;struct nvme_rw_command rw;struct nvme_identify identify;struct nvme_features features;struct nvme_create_cq create_cq;struct nvme_create_sq create_sq;struct nvme_delete_queue delete_queue;struct nvme_download_firmware dlfw;struct nvme_format_cmd format;struct nvme_dsm_cmd dsm;struct nvme_write_zeroes_cmd write_zeroes;struct nvme_abort_cmd abort;struct nvme_get_log_page_command get_log_page;struct nvmf_common_command fabrics;struct nvmf_connect_command connect;struct nvmf_property_set_command prop_set;struct nvmf_property_get_command prop_get;struct nvme_dbbuf dbbuf;struct nvme_directive_cmd directive;};
};

参考:
1:https://www.jianshu.com/p/daa8c2beb480

http://www.lryc.cn/news/114745.html

相关文章:

  • TCP Socket 基础知识点(实例是以Java进行演示)
  • openCV图像读取和显示
  • requests 方法总结
  • Go语言删除文本文件中的指定行
  • Arthas GC日志-JVM(十八)
  • ISC 2023︱诚邀您参与赛宁“安全验证评估”论坛
  • 分享一个计算器
  • Android 13 Launcher——长按图标弹窗背景变暗
  • Elasticsearch概述和DSL查询总结
  • 扩展卡尔曼滤波器代码
  • 9:00开始面试,9:08就出来了,这问题问的实在是····
  • 揭秘:5个美国程序员与日本程序员的差异
  • Springboot实现简单JWT登录鉴权
  • C++设计模式创建型之工厂模式整理
  • 前端安全XSS和CSRF讲解
  • 本地化部署自建类ChatGPT服务远程访问
  • 一、Webpack相关(包括webpack-dev-server用以热更新和html-webpack-plugin)
  • 安全防御(3)
  • AR远程专家指导在汽车改装上的应用有哪些?
  • css-3:什么是响应式设计?响应式的原理是什么?如何做?
  • Armstrong数,n位数等于其各位数的n次方之和。
  • blender的下载安装和配置中文环境
  • MyCat配置rule.xml、server.xml讲解
  • Linux项目部署
  • 案例:Docker 镜像的创建及使用(commit与dockerfile方式)
  • QGIS二次开发三:显示Shapefile
  • FFmpeg中相关结构体介绍
  • Llama 2 云端部署与API调用【AWS SageMaker】
  • 根文件系统制作
  • Linux ARM64架构 动态替换 altinstructions