Skip to content

feat(inputs.temp): Add setting to force thermal-zones gathering on linux#18906

Merged
skartikey merged 1 commit into
influxdata:masterfrom
01110111000001:feat/temp-thermal-zones
May 19, 2026
Merged

feat(inputs.temp): Add setting to force thermal-zones gathering on linux#18906
skartikey merged 1 commit into
influxdata:masterfrom
01110111000001:feat/temp-thermal-zones

Conversation

@01110111000001

@01110111000001 01110111000001 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When the hardware device is sleeping, the temp input plugin completely hangs waiting for the os.ReadFile call to return.
    The EAGAIN returned by the kernel is handled internally by os.ReadFile and the function waits for the file to become available.
    -> Use the non-blocking syscall function to read the files and silently ignoring unavailable thermal-zones.
    moved to its own PR, see fix(input.temp): Ignore EAGAIN on unavailable thermal-zones #18913

  • Adding a parameter to force the gathering of the thermal-zones temperatures. Some systems combine both hwmon and thermal-zones. Current implemenentation ignores thermal-zones when some hwmon exist.

Some comments/potential issues

  1. No tests were previously implemented for the thermal-zones gathering. Are they needed ?
  2. Should I convert the new boolean parameter to a string (like prefered in the docs), at the expense of more code changes?
  3. technically these are two distinct features, should I open 2 PRs? the fix moved to its own PR, see fix(input.temp): Ignore EAGAIN on unavailable thermal-zones #18913

Looking forward to your feedback and your thoughts on the potential issues.
Thanks for your great work on this tool!

Checklist

Related issues

partially resolves #18899
related to #18913

@telegraf-tiger telegraf-tiger Bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 12, 2026

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @01110111000001! Can we please split the PR into two, a first PR fixing the blocking read (i.e. marking it as a fix) and a second PR adding the option to force reading from thermal zones?

@srebhan srebhan self-assigned this May 13, 2026
@01110111000001 01110111000001 force-pushed the feat/temp-thermal-zones branch from 058da6d to 41fa053 Compare May 13, 2026 23:27
@01110111000001

Copy link
Copy Markdown
Contributor Author

Yes! See #18913 for the PR implementing the fix.
I modified this PR to only include the new option, tell me if its okay.

@telegraf-tiger

Copy link
Copy Markdown
Contributor

@01110111000001 01110111000001 changed the title feat(inputs.temp): force thermal-zones gathering and ignore eagain errors feat(inputs.temp): new parameter to force thermal-zones gathering on linux May 14, 2026
@srebhan srebhan changed the title feat(inputs.temp): new parameter to force thermal-zones gathering on linux feat(inputs.temp): Add setting to force thermal-zones gathering on linux May 19, 2026

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks @01110111000001 for your contribution!

@srebhan srebhan added area/system ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. labels May 19, 2026
@srebhan srebhan assigned skartikey and unassigned srebhan May 19, 2026

@skartikey skartikey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@01110111000001 Thanks for the contribution!

@skartikey skartikey merged commit 039e759 into influxdata:master May 19, 2026
35 checks passed
@github-actions github-actions Bot added this to the v1.39.0 milestone May 19, 2026
@01110111000001 01110111000001 deleted the feat/temp-thermal-zones branch May 19, 2026 16:38
srebhan added a commit that referenced this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/system feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inputs.temp] support gathering both hwmon and thermal zones at the same time + don't block on "Resource temporarily unavailable" files

3 participants