Skip to content

likwid sysfeatures

Thomas Gruber edited this page May 23, 2025 · 1 revision

likwid-sysfeatures: retrieve and manipulate hardware and operating system features

likwid-sysfeatures is a command line application to retrieve and manipulate the state of hardware and operating system features. It is a common interface for various features like CPU frequencies, CPU prefetchers and OS-based NUMA balancing. These features commonly have a topological scope which means that they cover a specific topological entity. Some exist only once per node. In order to retrieve or manipulate feature values, all devices have to be specified in the device list.

Content

Prerequisites

likwid-sysfeatures is not built by default but needs to be activated in config.mk with BUILD_SYSFEATURES=true. Always recompile with make distclean; make.

Options

-h,--help
    prints a help message to standard output, then exits.

-v,--version
    prints version information to standard output, then exits.

-V, --verbose <level>
    verbose output during execution for debugging. 0 for only errors, 1 for informational output, 2 for detailed output and 3 for developer output

-a,--all
    list all provided features for the current system and OS

-l,--list
    list all features with their current value for given devices

-p,--print
    list available devices for all available device types

-d, --devices <device_list>
    use devices for listing, getting and setting features

-g, --get <feature_list>
    Get the values of the specified features of the given devices ( <category>.<name> or just <name> if unique in a comma-separated list ).

-s, --set <feature_list>
    Set the values of the specified features on the given devices ( <category>.<name>=<value> or just <name>=<value> if unique in a comma-separated list ).
-O
    Output in RFC-conform CSV

Devices

With the -d, --devices <device_list> option, the devices for listing, getting and setting features can be specified. The syntax is closely related to the syntax used for specifying HW thread lists for likwid-pin or likwid-perfctr but extends it to allow more explicit specification of the topological entities. All device specifiers with their description:

  • T : hardware thread
  • C : CPU core
  • M : NUMA domain
  • D : CPU die
  • S : CPU socket
  • N : Whole node
  • GN : Nvidia GPU (if compiled with Nvidia CUDA support)
  • GA : AMD GPU (if compiled with AMD ROCm support)

The general syntax is <specifier>:<comma-separated list or ranges> like M:0,1,4-5. Multiple device specifiers can be combined with @ like M:0,1@S:0.

Examples

Some examples for listing the value of features for various devices can be found in the DEVICES section.

  1. List all available hardware system and operating system features with information about category, name, scope, their access mode and a description.

    likwid-sysfeatures --all
    
  2. Get the value of the feature 'prefetch.l2_hwpf' for the hardware thread with ID 0

    likwid-sysfeatures --devices T:0 --get prefetch.l2_hwpf
    
  3. Set the value of the feature prefetch.l2_hwpf and prefetch.l2_adj_pf for the hardware thread with ID 4 to 7 to 0.

    likwid-sysfeatures --devices T:4-7 --set prefetch.l2_hwpf=0,prefetch.l2_adj_pf=0
    

    List the current value of all features for the hardware threads with IDs 0, 1, 4 and 5. 'T' is the specifier for hardware threads but can be omitted for convenience. If a feature is not in hardware threads scope, it will be printed with '-' as value.

Clone this wiki locally