LIKWID
likwid-accessD

Information

likwid-accessD is a command line application that opens a UNIX file socket and waits for access operations from LIKWID tools that require access to the MSR and PCI device files. The MSR and PCI device files are commonly only accessible for users with root privileges, therefore likwid-accessD requires the suid-bit set or a suitable libcap setting. Depending on the current system architecture, likwid-accessD permits only access to registers defined for the architecture.

Build

The building of likwid-accessD can be controlled through the config.mk file. Depending on the variable BUILDDAEMON the daemon code is built or not. The path to likwid-accessD is compiled into the LIKWID library, so if you want to use the access daemon from an uncommon path, you have to set the ACCESSDAEMON variable.

Setup

In order to allow likwid-accessD to run with elevated priviledges, there are three ways

There are Linux distributions where settings the suid permission on likwid-accessD is not enough. Try also to set the capabilities for likwid-accessD.

Protocol

Every likwid instance will start its own daemon. This client-server pair will communicate with a socket file in /tmp named likwid-$PID. The daemon only accepts one connection. As soon as the connect is successful the socket file will be deleted.

From there the communication consists of write read pairs issued from the client. The daemon will ensure allowed register ranges relevant for the likwid applications. Other register access will be silently dropped and logged to syslog.

On shutdown the client will terminate the daemon with a exit message.

The daemon has the following error handling:

*/