389
© The Author(s) 2020
S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1
APPENDIX A
How to Install NDCTL
and DAXCTL on Linux
The ndctl utility is used to manage the libnvdimm (non-volatile memory device)
subsystem in the Linux kernel and to administer namespaces. The daxctl utility provides
enumeration and provisioning commands for any device-dax namespaces you create.
daxctl is only required if you work directly with device-dax namespaces. We presented
a use-case for the ‘system-ram’ dax type in Chapter 10, that can use persistent memory
capacity to dynamically extend the usable volatile memory capacity in Linux. Chapter 10
also showed how libmemkind can use device dax namespaces for volatile memory in
addition to using DRAM. The default, and recommended, namespace for most developers
is filesystem-dax (fsdax). Both Linux-only utilities - ndctl and daxctl - are open source and
are intended to be persistent memory vendor neutral. Microsoft Windows has integrated
graphical utilities and PowerShell Commandlets to administer persistent memory.
libndctl and libdaxctl are required for several Persistent Memory Development Kit
(PMDK) features if compiling from source. If ndctl is not available, the PMDK may not
build all components and features, but it will still successfully compile and install. In
this appendix, we describe how to install ndctl and daxctl using the Linux package
repository only. To compile ndctl from source code, refer to the README on the ndctl
GitHub repository (https://github.com/pmem/ndctl) or https://docs.pmem.io.
Prerequisites
Installing ndctl and daxctl using packages automatically installs any missing
dependency packages on the system. A full list of dependencies is usually listed when
installing the package. You can query the package repository to list dependencies or use
an online package took such as https://pkgs.org to find the package for your operating
© The Author(s) 2020
S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1
APPENDIX A
How to Install NDCTL
and DAXCTL on Linux
The ndctl utility is used to manage the libnvdimm (non-volatile memory device)
subsystem in the Linux kernel and to administer namespaces. The daxctl utility provides
enumeration and provisioning commands for any device-dax namespaces you create.
daxctl is only required if you work directly with device-dax namespaces. We presented
a use-case for the ‘system-ram’ dax type in Chapter 10, that can use persistent memory
capacity to dynamically extend the usable volatile memory capacity in Linux. Chapter 10
also showed how libmemkind can use device dax namespaces for volatile memory in
addition to using DRAM. The default, and recommended, namespace for most developers
is filesystem-dax (fsdax). Both Linux-only utilities - ndctl and daxctl - are open source and
are intended to be persistent memory vendor neutral. Microsoft Windows has integrated
graphical utilities and PowerShell Commandlets to administer persistent memory.
libndctl and libdaxctl are required for several Persistent Memory Development Kit
(PMDK) features if compiling from source. If ndctl is not available, the PMDK may not
build all components and features, but it will still successfully compile and install. In
this appendix, we describe how to install ndctl and daxctl using the Linux package
repository only. To compile ndctl from source code, refer to the README on the ndctl
GitHub repository (https://github.com/pmem/ndctl) or https://docs.pmem.io.
Prerequisites
Installing ndctl and daxctl using packages automatically installs any missing
dependency packages on the system. A full list of dependencies is usually listed when
installing the package. You can query the package repository to list dependencies or use
an online package took such as https://pkgs.org to find the package for your operating
