intel / ipmctl

BSD 3-Clause "New" or "Revised" License
184 stars 62 forks source link

Command not run #164

Closed razerduy closed 3 years ago

razerduy commented 3 years ago

Hi guy,

I have installed ipmctl and ndctl, but when i run sudo ipmctl show -dimm It show Command not run

However, i type ipmctl It show

Intel(R) Optane(TM) Persistent Memory Command Line Interface

Usage: ipmctl <verb>[<options>][<targets>][<properties>]

Commands:

Display the CLI help.
help 

Display the CLI version.
version 

Show the topology of all the DDRs and PMem modules.
show -topology -dimm[DimmIDs] -socket[SocketIDs] 

Show mapped memory limit and total mapped memory of each socket.
show -socket[SocketIDs] 

Show information about one or more PMem modules.
show -dimm[DimmIDs] -socket[SocketIDs] 

Show memory allocation information for this platform.
show -memoryresources 

Show the platform supported PMem module capabilities.
show -system -capabilities 

Provision capacity on one or more PMem modules into regions.
create -dimm[DimmIDs] -goal -socket[SocketIDs] 

Show a pending memory allocation goal on one or more PMem modules to be applied on reboot.
show -dimm[DimmIDs] -goal -socket[SocketIDs] 

Store the current configured memory allocation settings to a file.
dump -destination (filename) -system -config 

Create a memory allocation goal request from a file.
load -source (filename) -dimm[DimmIDs] -goal -socket[SocketIDs] 

Delete the region configuration goal from one or more PMem modules.
delete -dimm[DimmIDs] -goal -socket[SocketIDs] 

Set properties of one or more PMem modules, such as modify device.
set -dimm[DimmIDs] 

Show information about one or more regions.
show -region -socket[SocketIDs] 

Show health statistics.
show -sensor[List of Sensors] -dimm[DimmIDs] 

Modify the alarm threshold(s) for one or more PMem modules.
set -sensor(List of Sensors) -dimm[DimmIDs] 

Show performance statistics of one or more PMem modules.
show -dimm[DimmIDs] -performance[Performance Metrics] 

Show information about firmware on one or more PMem modules.
show -dimm[DimmIDs] -firmware 

Update the firmware on one or more PMem modules.
load -source (filename) -dimm[DimmIDs] 

Show user preferences.
show -preferences 

Set user preferences.
set -preferences 

Capture a snapshot of the system state for support purposes
dump -destination (filename) -support 

Run a diagnostic test on one or more PMem modules.
start -diagnostic[Quick|Config|Security|FW] -dimm[DimmIDs] 

Show error log for one or more PMem modules.
show -error(Thermal|Media) -dimm[DimmIDs] 

Dump firmware debug log.
dump -destination (filename) -debug -dimm[DimmIDs] 

Show the ACPI tables related to the PMem modules in the system.
show -system[NFIT|PCAT|PMTT] 

Show platform configuration data (PCD) stored on one or more PMem modules.
show -dimm[DimmIDs] -pcd[Config|LSA] 

Clear the namespace LSA partition on one or more PMem modules.
delete -dimm[DimmIDs] -pcd[Config] 

Show command access policy (CAP) restrictions for one ore more PMem module(s).
show -dimm[DimmIDs] -cap 

Show command effect log (CEL) for one or more PMem modules.
show -cel(DimmIDs) -dimm[DimmIDs] 

Start a playback or record (PBR) session.
start -session -mode -tag 

Dump the current recording (PBR) session buffer to a file.
dump -destination (filename) -session 

Load a recorded (PBR) session into memory for playback.
load -source (filename) -session 

Show information about the current playback or record (PBR) session.
show -session 

Stop the active playback or record (PBR) session.
stop -session 

Please see ipmctl -help i.e 'ipmctl show -help -dimm' for more information on specific command`

How do i setup the intel optane?

OS: Ubuntu 20.04 Context: i used to window 10 with intel optane before, i just reinstall ubuntu for my work. So i want to use intel optane with ubuntu OS. Can do that?

nolanhergert commented 3 years ago

It looks like you have the proper prerequisites if it was working on Windows before. Can you run "ipmctl show -v -dimm" and post the output?

razerduy commented 3 years ago

Command: sudo ipmctl show -dimm Output: Command not run Can you help me please?

StevenPontsler commented 3 years ago

ipmctl should work in Ubuntu.

Please check what version of ipmctl you have installed, ipmctl version

Please run the command with the -v version which will give more output including debug information and post as Nolan commented earlier sudo ipmctl show -v -dimm

razerduy commented 3 years ago

This is output: ipmctl version Screenshot from 2021-03-02 05-12-05

sudo ipmctl show -v -dimm Screenshot from 2021-03-02 05-09-48

StevenPontsler commented 3 years ago

Were any settings changed in BIOS?

It looks like like NFIT and PCAT ACPI tables have been disabled in BIOS (or there is only regular DDR in the system).

I'll see if I can look up where the setting is in the reference BIOS.

sscargal commented 3 years ago

@razerduy - When you say you used "Intel Optane" with Windows, are you referring to Intel Optane Persistent Memory, or one of the other Optane products? The Intel Optane SSD (P4800X), H10, and the 16GB and 32GB Optane devices are block based and do not use the ipmctl utilty to manage them.

Q) What server or workstation make & model do you have? Q) What BIOS are you using? (dmidecode -t bios) Q) How many, and what size PMem devices are you using? (128GB, 256GB, or 512GB)?

The reason for the error is "Failed to get the [NFIT|PCAT|PMTT table." This may occur if you don't have the necessary drivers available, or the BIOS doesn't support PMem. Ubuntu 20,04 has all the required drivers and will load them if it detects NVDIMMs or Intel Optane Persistent Memory.

Q) Are you using the default Ubuntu Kernel, or did you build your own?

At boot time, you should see some e820 table entries for persistent memory:

# dmesg | grep -i e820 | egrep persistent
[    0.000000] BIOS-e820: [mem 0x0000003060000000-0x000001aa5fffffff] persistent (type 7)
[    0.000000] BIOS-e820: [mem 0x000001da60000000-0x000003545fffffff] persistent (type 7)

If you don't see those entries, then your system either doesn't have PMem installed, or your OS doesn't have the necessary drivers to support PMem. You should see these drivers loaded, the critical ones being acpi, nfit, and libnvdimm:

# lsmod | egrep -i "nd_|nvdimm|dax|pmem|^acpi|nfit"
acpi_ipmi              20480  0
dax_pmem_compat        16384  0
device_dax             20480  1 dax_pmem_compat
dax_pmem_core          16384  1 dax_pmem_compat
nd_pmem                24576  2
nd_btt                 32768  1 nd_pmem
nfit                   77824  3 skx_edac
libnvdimm             200704  5 dax_pmem_core,nd_btt,nd_pmem,dax_pmem_compat,nfit
razerduy commented 3 years ago
  1. What server or workstation make & model do you have? My mainboard is gigabyte Z370-HD3 Model intel optane is SSD Intel Optane M.2 2280 PCIe 16GB MEMPEK1W016GAXT
  2. What BIOS are you using? Screenshot from 2021-03-02 05-40-13
  3. How many, and what size PMem devices are you using? I don't know PMem what is mean, i just know my PC have 32 Gb of Ram and 16 Gb of intel optane
  4. Are you using the default Ubuntu Kernel, or did you build your own? I'm using the default Ubuntu Kernel, i download and install through https://ubuntu.com/download Screenshot from 2021-03-02 05-44-47
sscargal commented 3 years ago

@razerduy Thanks. You have a client PC. The ipmctl utility is intended to be used with the datacenter Intel Optane Persistent Memory product only which requires Xeon CPUs. That's why you're encountering problems.

razerduy commented 3 years ago

OK, thanks @sscargal so much, i will close issue

hiten4612 commented 3 years ago

I have the same issue Command: sudo ipmctl show -dimm Output: Command not run

1 = sudo ipmctl show -v -dimm NVM_DBG_LOGGER NVDIMM-DBG:PbrOs.c::PbrDeserializeCtx:193: PBR MODE from shared memory: 0

NVM_DBG_LOGGER NVDIMM-DBG:PbrOs.c::PbrDeserializeCtx:201: pbr_ctx.tmp not found, setting to default value

NVM_DBG_LOGGER NVDIMM-DBG:Pbr.c::PbrInit:799: PbrInit PBR MODE: 0

NVM_DBG_LOGGER NVDIMM-DBG:Pbr.c::PbrInit:800: PbrInit DONE

NVM_DBG_LOGGER NvmDimmDriverDriverEntryPoint=0x3967f000

NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverDriverEntryPoint:908: Exiting DriverEntryPoint, error = 0x0.

NVM_DBG_LOGGER NvmDimmCliEntryPoint=0x00007f34395ec640

NVM_DBG_LOGGER NVDIMM-WARN:os_efi_api.c::initAcpiTables:223: Failed to get the PMTT table.

NVM_DBG_LOGGER NVDIMM-ERR:AcpiParsing.c::ParsePmttTable:362: Argument pTable is NULL. Exiting

NVM_DBG_LOGGER NVDIMM-ERR:NvmDimmConfig.c::ParseAcpiTables:4396: Failure with ParsePmttTable((VOID *)pPMTT, ppPmttHead). RC: 2

NVM_DBG_LOGGER NVDIMM-WARN:os_efi_api.c::initAcpiTables:256: Failed to parse NFIT or PCAT or PMTT table.

NVM_DBG_LOGGER NVDIMM-WARN:NvmDimmDriver.c::NvmDimmDriverDriverBindingStart:1370: Failed to initialize the ACPI tables, error = 0x2.

NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverDriverBindingStart:1459: Error during DriverBindingStart(). Calling DriverBindingStop() to teardown

NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverDriverBindingStop:1884: Exiting DriverBindingStop, error = 0x0.

NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverDriverBindingStart:1463: Exiting DriverBindingStart, error = 0x2.

NVM_DBG_LOGGER NVDIMM-ERR:NvmDimmCli.c::UefiMain:582: Issue with driver initialization

Command not run NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverDriverBindingStop:1884: Exiting DriverBindingStop, error = 0x0.

NVM_DBG_LOGGER NVDIMM-DBG:PbrOs.c::SerializePbrMode:266: Writing to shared memory: 0

NVM_DBG_LOGGER NVDIMM-DBG:NvmDimmDriver.c::NvmDimmDriverUnload:435: Exiting DriverUnload, error = 0x0.

-> dmesg | grep -i e820 | egrep persistent [ 0.000000] BIOS-e820: [mem 0x0000001080000000-0x000000147fffffff] persistent (type 7) [ 0.000000] BIOS-e820: [mem 0x0000002c80000000-0x000000307fffffff] persistent (type 7)

->lsmod | egrep -i "nd_|nvdimm|dax|pmem|^acpi|nfit" acpi_ipmi 16384 0 dax_pmem_compat 16384 0 nd_pmem 20480 0 device_dax 16384 1 dax_pmem_compat dax_pmem_core 16384 1 dax_pmem_compat nd_btt 24576 2 nd_pmem acpi_power_meter 20480 0 acpi_pad 180224 0 nfit 65536 3 skx_edac libnvdimm 192512 5 dax_pmem_core,nd_btt,nd_pmem,dax_pmem_compat,nfit

So what is the problem with my system?

sscargal commented 3 years ago

@hiten4612

Q1) What version of ipmctl are you using? Q2) What server OEM are you using? (HPe?) Q3) Are you running on bare metal or within a guest Virtual Machine?

There were some changes made to a recent release to support platforms that do not have PMTT (Platform Memory Topology Table). You may have to build ipmctl from source.

StevenPontsler commented 3 years ago

It looks like the PMTT table is not available from the BIOS. The latest release (02.00.00.3885) has changes to do what it can without that table. I believe this version is available on Fedora and EPEL repositories. I do not know about others.

The 01.00.00.xxxx versions should work without the table though it only recognizes the series 100 persistent memory modules.

I agree with sscargal's questions.

hiten4612 commented 3 years ago

1= ipmctl version Intel(R) Optane(TM) Persistent Memory Command Line Interface Version 02.00.00.3885

2= PMTT table is not available in my system NVM_DBG_LOGGER NVDIMM-WARN:os_efi_api.c::initAcpiTables:223: Failed to get the PMTT table.

StevenPontsler commented 3 years ago

I guess it will need to be investigated why 3885 did not fix this.

sscargal commented 3 years ago

@hiten4612 Can you provide more details of your hardware and software environment please:

ipmctl is expected to work on bare metal only. If this is a virtualized environment (KVM or ESXi), you don't have access to UEFI, so this type of issue is expected.

StevenPontsler commented 3 years ago

@hiten4612 Please also provide the results of "ipmct show -system"

hiten4612 commented 3 years ago

1 = Server Vendor & Model Dell EMC PowerEdge R740 DellEMC’s NVDIMM-N Persistent Memory(https://www.dell.com/support/manuals/en-in/poweredge-r740/nvdimm-n_ug_pub/linux?guid=guid-1cba438c-3a35-4b64-8f75-08515f11de0c&lang=en-us)

2 = OS Distro & Version CentOS Linux release 8.1.1911 (Core)

3= Kernel Version 4.18.0-147.el8.x86_64

4 = Bare Metal

5 = ipmct show -system ---NVDIMM Firmware Interface Table--- Signature: NFIT Length: 234 bytes Revision: 0x1 Checksum: 0xbb OEMID: SUPERM OEMTableID: SMCI--MB OEMRevision: 0x2 CreatorID: INTL CreatorRevision: 0x20091013 BwRegionTablesNum: 0 ControlRegionTablesNum: 1 FlushHintTablesNum: 0 InterleaveTablesNum: 0 NVDIMMRegionTablesNum: 1 SmbiosTablesNum: 1 SpaRangeTablesNum: 1 PlatformCapabilitiesTablesNum: 0

---TableType=0x4 Length: 80 bytes TypeEquals: ControlRegion ControlRegionDescriptorTableIndex: 0x1 VendorId: 0x2c80 DeviceId: 0x4e32 Rid: 0x31 SubsystemVendorId: 0x3480 SubsystemDeviceId: 0x4131 SubsystemRid: 0x1 ValidFields: 0x1 ManufacturingLocation: 0x0 ManufacturingDate: 0x0 SerialNumber: 0x1 RegionFormatInterfaceCode: 0x101 NumberOfBlockControlWindows: 0x0

---TableType=0x1 Length: 48 bytes TypeEquals: NvDimmRegion NfitDeviceHandle: 0x1110 NfitDeviceHandle.DimmNumber: 0x0 NfitDeviceHandle.MemChannel: 0x1 NfitDeviceHandle.MemControllerId: 0x1 NfitDeviceHandle.SocketId: 0x1 NfitDeviceHandle.NodeControllerId: 0x0 NvDimmPhysicalId: 0x37 NvDimmRegionalId: 0x0 SpaRangeDescriptionTableIndex: 0x1 NvdimmControlRegionDescriptorTableIndex: 0x1 NvDimmRegionSize: 0x400000000 RegionOffset: 0x0 NvDimmPhysicalAddressRegionBase: 0x0 InterleaveStructureIndex: 0x0 InterleaveWays: 0x1 NvDimmStateFlags: 0x0020 -Notify OSPM of Smart & Health events 0x0020

---TableType=0x3 Length: 10 bytes TypeEquals: Smbios

---TableType=0x0 Length: 56 bytes TypeEquals: SpaRange AddressRangeType: 66f0d379-b4f3-4074-ac43-0d3318b78cdb SpaRangeDescriptionTableIndex: 0x1 Flags: 0x2 ProximityDomain: 0x1 SystemPhysicalAddressRangeBase: 0x3880000000 SystemPhysicalAddressRangeLength: 0x400000000 MemoryMappingAttribute: 0x8008

---Platform Configurations Attributes Table--- Signature: PCAT Length: 136 bytes Revision: 0x2 Checksum: 0xaf OEMID: SUPERM OEMTableID: SMCI--MB OEMRevision: 0x2 CreatorID: INTL CreatorRevision: 0x20091013 ---TableType=0x0 Length: 16 bytes TypeEquals: PlatformCapabilityInfoTable PMemModuleMgmtSWConfigInputSupport: 0x1 (Yes) MemoryModeCapabilities: 0x27 (1LM, 2LM, AppDirect, MixedMode, SubNUMA Cluster) CurrentMemoryMode: 0x14 -Current Volatile Memory Mode: 1LM -Allowed Persistent Memory Mode: AppDirect -Allowed Volatile Memory Mode: 2LM -SubNUMA Cluster Mode Disabled PersistentMemoryRASCapability: 0x0

---TableType=0x1 Length: 16 bytes TypeEquals: MemoryInterleaveCapabilityTable MemoryMode: 0x3 (AppDirect) NumberOfInterleaveFormatsSupported: 0x1 InterleaveFormatSupported(0): 0x801f4040 -Recommended -Channel interleave size: 4KB -iMC interleave size: 4KB -Channel ways: 1-way, 2-way, 3-way, 4-way, 6-way InterleaveAlignmentSize: 0x1e

---TableType=0x6 Length: 32 bytes TypeEquals: SocketSkuInfoTable SocketID: 0x0 MappedMemorySizeLimit: 1099511627776 TotalMemorySizeMappedToSpa: 137438953472 CachingMemorySize: 0

---TableType=0x6 Length: 32 bytes TypeEquals: SocketSkuInfoTable SocketID: 0x1 MappedMemorySizeLimit: 1099511627776 TotalMemorySizeMappedToSpa: 120259084288 CachingMemorySize: 0

PMTT table not found.

StevenPontsler commented 3 years ago

Hi @hiten4612 -- The document you linked to appears to be for a different type of device (nvdimm-n) which I am not familiar with and that document mentions other tools (not ipmctl).

The VendorId looks like it is Micron product.

ipmctl is designed to work with the Intel Optane PMem modules.

I would expect to see an error about no supported devices or something similar. I have asked someone to look into that.

sscargal commented 3 years ago

@hiten4612 Can you run the following to confirm what memory devices you have installed, please.

I see the NFIT and PCAT are returning Supermicro for the OEMID, not Dell. On my Dell R640 with Intel Optane Persistent Memory, I see this for the OEMID

# ipmctl show -system
---NVDIMM Firmware Interface Table---
   Signature: NFIT
   Length: 3008 bytes
   Revision: 0x1
   Checksum: 0x9a
   OEMID: DELL <<<<<<<<<
   OEMTableID: PE_SC3
   OEMRevision: 0x2
   CreatorID: DELL <<<<<<<<<

Your system looks to be a SuperMicro system

---NVDIMM Firmware Interface Table---
Signature: NFIT
Length: 234 bytes
Revision: 0x1
Checksum: 0xbb
OEMID: SUPERM <<<<<<<<<
OEMTableID: SMCI--MB
OEMRevision: 0x2
CreatorID: INTL <<<<<<<<<

Both Dell and Supermicro BIOS's have PMTT tables when Intel Optane Persistent Memory is present.

If you have NVDIMM-N modules, those are not supported by ipmctl and won't have PMTT tables available. NVDIMM-N devices are just DRAM with flash and the 'persistence' is handled by the NVDIMM-N itself copying data from DRAM to Flash when the SAVE signal is sent, and copying Flash to DRAM when the host powers back on. They are very different to Intel Optane PMem that using Optane (3D XPoint) media that is persistent by nature. NVDIMM-N's are much lower capacity (8GB, 16GB, and 32GB) compared with the 128GB, 256GB, and 512GB modules of Intel Optane Persistent Memory.

hiten4612 commented 3 years ago

I see two pmem nodes when I use the below command ndctl list [ { "dev":"namespace1.0", "mode":"raw", "size":17179869184, "sector_size":512, "blockdev":"pmem1" }, { "dev":"namespace0.0", "mode":"fsdax", "map":"dev", "size":16909336576, "uuid":"4231c8a7-6c9c-42c0-85d6-022a336f2d5c", "sector_size":512, "align":2097152, "blockdev":"pmem0" } ]

So how do I use /dev/pmem nodes? can I use PMDK library for my system Any Example link for how do I write and read in my pmem using c/c++?

sscargal commented 3 years ago

@hiten4612 We should continue this discussion on the Slack #pmem channel or PMem Google Forum as it's not related to ipmctl.

So how do I use /dev/pmem nodes? can I use PMDK library for my system

Follow the NVDIMM-N User Guide you provided previously to create file systems, then you can create files and memory-map them into your application.

can I use PMDK library for my system

Yes, you can. You can start by downloading and reading my "Programming Persistent Memory: A Comprehensive Guide for Developers" book. There are many C++ examples in the libpmemobj++ library, or take a look at pmemkv.

hiten4612 commented 3 years ago

Ok thanks for your support