You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the work on this project. I am trying to add some functionality to the sensor for a project of mine, however, I am unable to sucessfully run the sensor when compiling from source even before making any changes. This is puzzling as the sensor works perfectly when install the .deb package on Ubuntu LTS 20.04 and run it that way. I am not using docker.
The sensor outputs the following:
E: 22-06-27 10:33:14 config: event 'TSC' is invalid or unsupported by this machine
E: 22-06-27 10:33:14 config: failed to parse the provided config file
I have identified the issue as being the pfm_get_os_event_encoding() function from libpfm in events.c. It consistently returns a PFM_ERR_NOTFOUND for both msr and rapl events in the config file that I know exist in my architecture (Haswell). All events appear as expected using "perf list."
I have attempted building directly from the source of the latest release to no avail. Might you have any ideas as to why this may be happening, given that the sensor runs successfully and is able to find these events when the sensor installed from the .deb package?
The text was updated successfully, but these errors were encountered:
A little more digging around has yeiled a solution. As this issue appears to have come up before for others I will detail the steps taken to fix (note this applies only to local builds, I have not attempted to run the sensor in a container):
As mentioned in #1, the sensor only seems to function with a patched version of libpfm4 that support certain events, including "TSC", "APERF" and "MPERF." The working patch is available on the smartwatts branch of https://github.com/gfieni/libpfm4.git and must be installed locally from there.
I echo PierreRust's comment in #1 that it would be be helpful to include the correct libpfm patch in the repo and the build pipeline to allow a more seamless local build process.
Hello,
You can find the procedure to build the sensor along the patched libpfm4 inside the Dockerfile.
As you can see in the branch name, this is a patch made specifically for the SmartWatts formula.
The main build pipeline of this project is the Dockerfile, and building the patched libpfm4 is already done there.
I agree that this issue is confusing, and it will be addressed in the future with a better documentation for the build process.
Thanks for the work on this project. I am trying to add some functionality to the sensor for a project of mine, however, I am unable to sucessfully run the sensor when compiling from source even before making any changes. This is puzzling as the sensor works perfectly when install the .deb package on Ubuntu LTS 20.04 and run it that way. I am not using docker.
The sensor outputs the following:
E: 22-06-27 10:33:14 config: event 'TSC' is invalid or unsupported by this machine
E: 22-06-27 10:33:14 config: failed to parse the provided config file
I have identified the issue as being the pfm_get_os_event_encoding() function from libpfm in events.c. It consistently returns a PFM_ERR_NOTFOUND for both msr and rapl events in the config file that I know exist in my architecture (Haswell). All events appear as expected using "perf list."
I have attempted building directly from the source of the latest release to no avail. Might you have any ideas as to why this may be happening, given that the sensor runs successfully and is able to find these events when the sensor installed from the .deb package?
The text was updated successfully, but these errors were encountered: