Bug 2185593

Summary: pcp-pmda-lmsensors does not work as expected
Product: [Fedora] Fedora Reporter: Krist van Besien <kvanbesi>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 37CC: chorn, jkurik, nathans, scox
Target Milestone: ---Flags: nathans: needinfo? (kvanbesi)
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-12 22:52:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Krist van Besien 2023-04-10 12:58:47 UTC
Description of problem:

Installing pcp-pmda-lmsensors does not lead to sensors metrics becoming available in pcp.

Version-Release number of selected component (if applicable):

pcp-pmda-lmsensors-6.0.3-1.fc37

Fedora 37 on aarch64
(System has latest updates)

How reproducible:

Steps to Reproduce:
1. dnf install pcp-pmda-lmsensors
2. pminfo lmsensors

Actual results:

Error: lmsensors: Unknown metric name

Expected results:

List of lmsensors metrics is displayed.

Additional info:

the output of the sensors command does show that there are sensors installed, and that there are values to be read.

Comment 1 Krist van Besien 2023-04-10 13:40:18 UTC
I have tried running the Install script in /var/lib/pcp/pmdas/lmsensors

The result was: 

[root@fozzie lmsensors]# ./Install
Traceback (most recent call last):
  File "/var/lib/pcp/pmdas/lmsensors/pmdalmsensors.python", line 138, in <module>
    LmsensorsPMDA('lmsensors', 74).run()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/pcp/pmdas/lmsensors/pmdalmsensors.python", line 99, in __init__
    self.add_metric(basename + "." + keysplit[0] + "." + keysplit[2],   # metric name
  File "/usr/lib64/python3.11/site-packages/pcp/pmda.py", line 330, in add_metric
    raise KeyError('attempt to add_metric with an existing name=%s' % (name))
KeyError: 'attempt to add_metric with an existing name=lmsensors.pac1934_i2c_0_11.i2c'
Arrgh! failed to create /var/lib/pcp/pmdas/lmsensors/domain.h.python from /var/lib/pcp/pmdas/lmsensors/pmdalmsensors.python

Comment 2 Nathan Scott 2023-04-10 22:57:09 UTC
Hi Krist,

Thanks for reporting the issue - can you copy+paste the output from '/usr/bin/lmsensors -j' into the BZ please?

cheers.

Comment 3 Christian Horn 2023-04-11 02:08:22 UTC
Curious, which hardware is this?

Fedora37 on a Raspi4, which has just the cpu sensor reporting:

[root@pi4 39°C ~]$ cd /var/lib/pcp/pmdas/lmsensors
[root@pi4 37°C lmsensors]$ ./Install 
Updating the Performance Metrics Name Space (PMNS) ...
Terminate PMDA if already installed ...
Updating the PMCD control file, and notifying PMCD ...
Check lmsensors metrics have appeared ... 1 metrics and 1 values
[root@pi4 38°C lmsensors]$ pminfo lmsensors
lmsensors.cpu_thermal_virtual_0.temp1
[root@pi4 38°C lmsensors]$ pmrep lmsensors -p
          l.c.temp1
                   
11:00:34     39.920
11:00:35     37.972
11:00:36     39.433
^C
[root@pi4 38°C lmsensors]$ 

/usr/bin/lmsensors does not exist, '/usr/bin/sensors -j' might be 
interesting.

The traceback makes me wonder if there was a previous, failed attempt
to register the metrics.

Comment 4 Nathan Scott 2023-07-12 22:52:50 UTC
There's insufficient information to make progress here

Please reopen this BZ if the requested sensors output can be supplied - thanks!