Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set warning/critical temperature for a specific sensor #3102

Open
FrancoisMentec opened this issue Feb 10, 2025 · 1 comment
Open

Comments

@FrancoisMentec
Copy link

The following config file does not work:

[sensors]
temperature_core_Tctl_warning=40
temperature_core_Tctl_critical=95

API:

[
  {
    "label": "Composite",
    "unit": "C",
    "value": 49,
    "warning": 83,
    "critical": 87,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Sensor 1",
    "unit": "C",
    "value": 70,
    "warning": 65261,
    "critical": 65261,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Sensor 2",
    "unit": "C",
    "value": 43,
    "warning": 65261,
    "critical": 65261,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Tccd1",
    "unit": "C",
    "value": 55,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Tctl",
    "unit": "C",
    "value": 68,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "edge",
    "unit": "C",
    "value": 52,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "mt7921_phy0 0",
    "unit": "C",
    "value": 40,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  }
]

As you can see warning and critical are null for Tctl.

The following config file does work:

[sensors]
temperature_core_warning=40
temperature_core_critical=95

Temps are now displayed in purple in the web interface when above 40°C, but the API still doesn't provide the temperature thresholds:

[
  {
    "label": "Composite",
    "unit": "C",
    "value": 47,
    "warning": 83,
    "critical": 87,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Sensor 1",
    "unit": "C",
    "value": 68,
    "warning": 65261,
    "critical": 65261,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Sensor 2",
    "unit": "C",
    "value": 41,
    "warning": 65261,
    "critical": 65261,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Tccd1",
    "unit": "C",
    "value": 46,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "Tctl",
    "unit": "C",
    "value": 55,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "edge",
    "unit": "C",
    "value": 47,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  },
  {
    "label": "mt7921_phy0 0",
    "unit": "C",
    "value": 38,
    "warning": null,
    "critical": null,
    "type": "temperature_core",
    "key": "label"
  }
]

I want to set the warning an critical temperature returned by the API for the Tctl sensor and ideally only it. I tried many syntax (temperature_Tctl_warning, temperature_tctl_warning, temperature_core_tctl_warning, ...) in the config file, but so far no luck. The documentation has not been helpful either: https://glances.readthedocs.io/en/latest/aoa/sensors.html

My glances version:

root@homelab:~/.config/glances# glances --version
Glances version:        4.3.0.8
Glances API version:    4
PsUtil version:         6.1.1
Log file:               /root/.local/share/glances/glances.log

Running on Debian 12 in a proxmox host.

Please send help :-(

@nicolargo
Copy link
Owner

Hi @FrancoisMentec thanks for the issue report.

Also reproduced on my side:

[sensors]
disable=False
# Sensors core thresholds (in Celsius...)
# By default values are grabbed from the system
# Overwrite thresholds for a specific sensor
temperature_core_Ambient_careful=45
temperature_core_Ambient_warning=65
temperature_core_Ambient_critical=80

Logs:

2025-02-16 18:53:52,862 -- DEBUG -- Load limit: sensors_temperature_core_ambient_careful = 45.0
2025-02-16 18:53:52,862 -- DEBUG -- Load limit: sensors_temperature_core_ambient_warning = 65.0
2025-02-16 18:53:52,862 -- DEBUG -- Load limit: sensors_temperature_core_ambient_critical = 80.0
2025-02-16 18:53:53,270 -- DEBUG -- PluginModel glances.plugins.sensors update return [{'label': 'Ambient', 'unit': 'C', 'value': 35, 'warning': 0, 'critical': None, 'type': <SensorType.CPU_TEMP: 'temperature_core'>, 'key': 'label'},...

Not displayed:

Image

Note for investigation:

  • tested without success with temperature_core_ambient_careful (replace Ambient with ambient)
  • have a look on 'type': <SensorType.CPU_TEMP: 'temperature_core'>...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants