Skip to content

{cpu1} displays 0% all the time. label:bug #23

@SteveGuo

Description

@SteveGuo

{cpu1} displays always 0% when set to display two cpu cores like this: {cpu0}{cpu1}

def _fetch_cpu(self, percpu=False):
    if percpu:
    return ps.cpu_percent(interval=0, percpu=True)

Here psutil.cpu_percent is called twice almost simultaneously which means time between the first call and the second call is too short to measure the {cpu1} utilization.

I suggest that provide an option like {cpuall} to display all the cpu cores and call the psutil.cpu_percent only once per update.

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