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 shows 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

2) Using ndctl 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:

# ndctl help create-namespace

3) Using ndctl --list-cmds lists all commands as a single list.

# ndctl --list-cmds
version
enable-namespace
disable-namespace
create-namespace
destroy-namespace
check-namespace
clear-errors
enable-region
disable-region
enable-dimm
disable-dimm
zero-labels
read-labels
write-labels
init-labels
check-labels
inject-error
update-firmware
inject-smart
wait-scrub
start-scrub
setup-passphrase
update-passphrase
remove-passphrase
freeze-security
sanitize-dimm
load-keys
wait-overwrite
list
monitor
help

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

TAB Command and Argument Completion

ndctl supports 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 ndctl man pages are available online. See 'NDCTL 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:

Last updated

Was this helpful?