Using ltrace to see what ipmctl and ndctl are doing

Posted on December 26, 2019  •  1 minutes

Occasionally, it is necessary to debug commands that are slow. Or you may simply be interested in learning how the tools work. While there are many strategies, here are some simple methods that show code flow and timing information.

To show a high-level view of where the time is being spent within libipmctl, use:

# ltrace -c -o ltrace_library_count.out -l '*ipmctl*' ipmctl show -memoryresources

To show a high-level view of where the time is being spent within libndctl, use:

# ltrace -c -o ltrace_library_count.out -l '*ndctl*' ipmctl show -memoryresources

To show a high-level view of where the time is being spent within libipmctl and libipmctl, use:

# ltrace -c -o ltrace_library_count.out -l '*ipmctl*' -l '*ndctl*' ipmctl show -memoryresources

To trace all libipmctl and libndctl functions, use:

ltrace -l '*ndctl*' -l '*ipmctl*' ipmctl version

To include the time spent within each function, use:

ltrace -T -l '*ndctl*' -l '*ipmctl*' ipmctl version

Flame graphs can be very useful. See http://www.brendangregg.com/flamegraphs.html .

Related Posts

How To Enable Debug Logging in ipmctl

The ipmctl utility is used for configuring and managing Intel Optane Persistent Memory modules (DCPMM/PMem). It supports the functionality to: Discover Persistent Memory on the server Provision the persistent memory configuration View and update the firmware on the persistent memory modules Configure data-at-rest security Track health and performance of the persistent memory modules Debug and troubleshoot persistent memory modules I wrote the IPMCTL User Guide showing how to use the tool, but what if ipmctl returns an error or something you’re not expecting?

Read More

How to Boot Linux from Intel® Optane™ Persistent Memory

Introduction In this article, I will demonstrate how to configure a system with Intel Optane Persistent Memory (PMem) and use part of the PMem as a boot device. This little known feature can reduce boot times for those that need it. The basic steps include: Configure the Persistent Memory in AppDirect Interleaved Create two small SECTOR namespaces, one per Region Install the OS and select one or both of the namespaces (single disk install, or mirrored LVM)

Read More

How to Boot Linux from Intel® Optane™ Persistent Memory

Introduction In this article, I will demonstrate how to configure a system with Intel Optane Persistent Memory (PMem) and use part of the PMem as a boot device. This little known feature can reduce boot times for those that need it. The basic steps include: Configure the Persistent Memory in AppDirect Interleaved Create two small SECTOR namespaces, one per Region Install the OS and select one or both of the namespaces (single disk install, or mirrored LVM) Configure the Persistent Memory The following figure shows how we will provision the persistent memory.

Read More