Quick Start
The ndctl command is 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 and daxctl 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
2) Using ndctl help and daxctl help displays basic help and syntax:
# ndctl help
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
Below is an example of using the ndctl help command to launch the create-namespace man page:
3) Using ndctl --list-cmds and daxctl --list-cmdslists all commands as a single list.
An alternative method for listing commands uses the TAB key completion feature of ndctl and daxctl. By typingndctl <TAB> <TAB> or daxctl <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:
Additionally, executing ndctl help <command> can be used to display the man page for the command, eg:
A list of ndctl and daxctl man pages are available online. See NDCTL Man Pages and DAXCTL 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?