Using ltrace to see what ipmctl and ndctl are doing

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 .

How Much RAM Could a Vector Database Use If a Vector Database Could Use RAM

How Much RAM Could a Vector Database Use If a Vector Database Could Use RAM

Featured image generated by ChatGPT 4o model: “a low poly woodchuck by a serene lake, surrounded by mountains and a forest with tree leaves made from DDR memory modules.

Read More
Understanding Memory Usage with `smem`

Understanding Memory Usage with `smem`

Memory management is crucial for Linux administrators and developers, especially when optimizing performance for resource-intensive applications.

Read More
How To Set Linux CPU Scaling Governor to Max Performance

How To Set Linux CPU Scaling Governor to Max Performance

The majority of modern processors are capable of operating in a number of different clock frequency and voltage configurations, often referred to as Operating Performance Points or P-states (in ACPI terminology).

Read More