Skip to content

[Bug]: Landing Page, System. on FreeBSD, the CPU frequency shows NaN GHz #1131

Description

@rickhull

Bug description

Summary

CPU frequency displays as "NaN GHz" on the netdata landing page (System tab) on FreeBSD, despite the FreeBSD plugin successfully collecting CPU frequency data for charting.

Environment

  • OS: FreeBSD 15.0-RELEASE (amd64)
  • Netdata Version: v2.6.3
  • CPU: Intel Pentium N3700 @ 1.60GHz
  • Installation: FreeBSD pkg/ports (custom)
  • Plugin: freebsd.plugin

Expected Behavior

The landing page System tab should display the current CPU frequency in GHz, e.g., "0.88 GHz" or "1.60 GHz".

Actual Behavior

The landing page displays "NaN GHz" for CPU frequency.

Expected behavior

Show the CPU frequency in numeric terms

Steps to reproduce

  1. Run FreeBSD
  2. Install NetData
  3. Navigate to http://HOST:19999/
  4. Click System at the bottom
  5. Observe CPU frequency

Screenshots

Image

Error Logs

No response

Desktop

OS: Windows
Browser Firefox
Browser Version [e.g. 22] 146.0.1

Additional context

No response

Activity

  1. rickhull commented on Jan 1, 2026

    @rickhull
    Author

    Evidence

    1. CPU Frequency Data is Available via sysctl

    root@gw:~ # sysctl dev.cpu.0.freq
    dev.cpu.0.freq: 880
    
    root@gw:~ # sysctl dev.cpu | grep freq
    dev.cpu.3.freq: 480
    dev.cpu.2.freq: 480
    dev.cpu.1.freq: 480
    dev.cpu.0.freq: 880

    2. Netdata Collector is Running

    The freebsd.plugin is actively collecting CPU frequency data:

    {
        "plugin": "freebsd.plugin",
        "module": "dev.cpu.0.freq"
    }

    3. Time-Series Chart Works Correctly

    The chart cpu.scaling_cur_freq exists and contains valid data:

    "cpu.scaling_cur_freq": {
        "id": "cpu.scaling_cur_freq",
        "name": "cpu.scaling_cur_freq",
        "type": "cpu",
        "family": "cpufreq",
        "context": "cpu.scaling_cur_freq",
        "title": "Current CPU Scaling Frequency (cpu.scaling_cur_freq)",
        "priority": 1002,
        "plugin": "freebsd.plugin",
        "module": "dev.cpu.0.freq",
        "units": "MHz",
        "dimensions": {
            "frequency": {
                "name": "frequency"
            }
        }
    }

    This chart displays correctly and shows valid frequency values when accessed via /api/v1/data?chart=cpu.scaling_cur_freq.

    4. Metadata API Returns "unknown"

    The /api/v1/info endpoint (used by the landing page) shows:

    {
        "cpu_freq": "unknown",
        "host_labels": {
            "_system_cpu_freq": "unknown"
        }
    }

    The landing page attempts to render the string "unknown" as a numeric value, resulting in "NaN GHz".

    Root Cause Analysis

    The FreeBSD plugin has two separate code paths:

    1. Time-series data collection (working): Reads dev.cpu.0.freq sysctl and creates charts ✅
    2. Metadata population (broken): Should populate cpu_freq field in host info but returns "unknown" ❌

    The metadata field is never populated with the actual CPU frequency value, despite being successfully collected for charting purposes.

    Steps to Reproduce

    1. Install netdata v2.6.3 on FreeBSD 15.0-RELEASE
    2. Ensure dev.cpu.0.freq sysctl exists and returns valid data
    3. Navigate to netdata landing page (port 19999 or via reverse proxy)
    4. Click "System" tab at bottom of landing page
    5. Observe "CPU Frequency" field displays "NaN GHz"
    6. Verify chart works: access /api/v1/data?chart=cpu.scaling_cur_freq shows valid data

    Expected Fix

    The freebsd.plugin should populate the cpu_freq metadata field in /api/v1/info with the current CPU frequency value (e.g., "880" or "0.88" depending on expected format) when it successfully collects this data for charting.

    Workaround

    None. The issue is cosmetic - all charts function correctly. Users can ignore the "NaN GHz" display on the landing page.

    Additional Notes

    • This may affect other FreeBSD systems where dev.cpu.N.freq sysctl exists
    • The related dev.cpu.temperature sysctl genuinely doesn't exist on this hardware (expected)
    • System has 4 CPU cores, all reporting valid frequency data via sysctl
  2. ktsaou commented on Jan 28, 2026

    @ktsaou
    Member

    Sorry for the delay.
    Fixed in netdata/netdata#21658

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions