ndctl: command not found

“ndctl” is a utility tool for managing Non-Volatile DIMMs (NVDIMMs), which are a type of memory module that can store data even after the power has been turned off. NVDIMMs are used in servers and high-performance computing systems to provide faster storage than traditional disk drives and to enhance data persistence.

The “ndctl” utility provides a set of commands for discovering and configuring NVDIMMs in a system, as well as for creating and managing storage regions on NVDIMMs. It can also be used to monitor the health of NVDIMMs and to provide information about their performance and usage.

With “ndctl,” users can perform tasks such as creating persistent memory regions, setting up device dax, checking NVDIMM health and firmware, and listing NVDIMMs and their regions. “ndctl” is particularly useful for system administrators and developers who need to manage NVDIMMs in their systems.

If you encounter the below error while running the command ndctl:

ndctl: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install ndctl
Ubuntu apt-get install ndctl
Arch Linux pacman -S ndctl
Kali Linux apt-get install ndctl
CentOS yum install ndctl
Fedora dnf install ndctl

ndctl Command Examples

1. Create an ‘fsdax’ mode namespace:

# ndctl create-namespace --mode=fsdax

2. Change the mode of a namespace to ‘raw’:

# ndctl create-namespace --reconfigure=namespaceX.Y --mode=raw

3. Check a sector mode namespace for consistency, and repair if needed:

# ndctl check-namespace --repair namespaceX.Y

4. List all namespaces, regions, and buses (including disabled ones):

# ndctl list --namespaces --regions --buses --idle

5. List a specific namespace and include lots of additional information:

# ndctl list -vvv --namespace=namespaceX.Y

6. Run a monitor to watch for SMART health events for NVDIMMs on the ‘ACPI.NFIT’ bus:

# ndctl monitor --bus=ACPI.NFIT

7. Remove a namespace (when applicable) or reset it to an initial state:

# ndctl destroy-namespace --force namespaceX.Y
Related Post