Skip to content

NoneType error when percpu_usage stats are null #33

@sjahl

Description

@sjahl

Hi, I've found that the percpu_usage stats can sometimes be Null, similar to #29.

Commenting out the CpuStats class (and removing it from CLASSES) fixes the issue (though, obviously, I no longer get CPU stats from containers). When I query the stats API directly, I'm seeing null in the percpu_usage:

    "cpu_stats": {
        "cpu_usage": {
            "total_usage": 0,
            "percpu_usage": null,
            "usage_in_kernelmode": 0,
            "usage_in_usermode": 0
        },

Which I think is resulting in the NoneType errors that I'm seeing. I'm not much of a Python programmer... but I'm willing to try and help fix this if someone can point me at the line in the CPUStats class that needs fixing :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions