Quick Start

The ndctl , daxctl, and cxl commands are designed to be user friendly. Once installed, a list of commands can be shown using any of the following:

1) With no arguments or options, ndctl ,daxctl , and cxl show a simple usage message:

$ ndctl 

 usage: ndctl [--version] [--help] COMMAND [ARGS]


 See 'ndctl help COMMAND' for more information on a specific command.
 ndctl --list-cmds to see all available commands
$ daxctl 

 usage: daxctl [--version] [--help] COMMAND [ARGS]


 See 'daxctl help COMMAND' for more information on a specific command.
 daxctl --list-cmds to see all available commands
$ cxl 

 usage: cxl [--version] [--help] COMMAND [ARGS]


 See 'cxl help COMMAND' for more information on a specific command.
 cxl --list-cmds to see all available commands

2) Using ndctl help ,daxctl help , and cxl help displays basic help and syntax information for the sub-command. Below is an example of using the ndctl help command to launch the create-namespace man page:

3) Using ndctl --list-cmds daxctl --list-cmds, and cxl --list-cmds lists all commands as a single list.

An alternative method for listing commands uses the TAB key completion feature. By typingndctl <TAB> <TAB> ,daxctl <TAB> <TAB> , or cxl <TAB> <TAB> we can list the available commands, eg:

TAB Command and Argument Completion

ndctl and daxctlsupports command completion using the TAB key. For example, typing ndctl enable-<TAB> lists all commands beginning with 'enable', eg:

TAB completion also works with command arguments. For example, typing ndctl enable-dimm <TAB> will show all available command arguments. For example, the 'enable-dimm' command can enable one, more than one, or all NVDIMMs. It will list all available NVDIMMs (nmem) devices when using the TAB completion, eg:

Getting Help

NDCTL ships with a man page for each command. Each man page describes the required arguments and features in detail. Man pages can be found and accessed using the man or ndctl utilities. The following man -k ndctl searches for any man page containing the "ndctl" keyword:

Note: If man -k ndctl returns "ndctl: nothing appropriate." or similar, see the Troubleshooting section to manually build the indexes.

Additionally, executing ndctl help <command> can be used to display the man page for the command, eg:

A list of man pages is available online. See NDCTL Man Pages, DAXCTL Man Pages, and CXL Man Pages for a complete list.

Displaying Bus, NVDIMM, Region, and Namespace Information

The ndctl list command is a very powerful and feature rich command. A list of options is shown below:

Using the filters is a powerful way to limit the output.

Examples

To list all active/enabled namespaces:

To list all active/enabled regions:

To list all active/enabled NVDIMMs:

To list all active/enabled NVDIMMs, Regions, and Namespaces:

To list all active/enabled and disabled/inactive (idle) NVDIMMs, Regions, and Namespaces:

To list all active/enabled and disabled/inactive (idle) NVDIMMs, Regions, and Namespaces with human readable values:

Increasing output verbosity

The -v, --verbose option increases the output verbosity of the command. Using -vv or --vvv further increases the output and verbosity.

Last updated

Was this helpful?