Skip to content

Cpu usage is incorrectly computed #51

@stefanboca

Description

@stefanboca

Cpu usage as calculated here is incorrect. /proc/stat counts cpu time cumulatively from boot, so what is computed and exposed as %cpu-usage is actually something like the average cpu utilization since boot, rather than the current usage percentage.

Also, /proc/stat reports overall cpu usage times on the cpu line. It's probably (mathematically) more accurate to use that line to compute an overall cpu usage percent, rather than averaging the usage of the individual cores.

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