i3 / i3status

Generates status bar to use with i3bar, dzen2 or xmobar
BSD 3-Clause "New" or "Revised" License
607 stars 254 forks source link

Bad %cpu_usage reported by i3 status #536

Open liar666 opened 1 month ago

liar666 commented 1 month ago

Welcome

Current Behavior

Using i3 4.23 & i3status 2.14-non-git In my config, I display cpu_usage As shown in picture, even when CPU usage is very High (184%+), reported value by i3 status is very low (13%): BugI3CPU

Expected Behavior

Percentage of cpu reported by i3status and other system tools (top, ps, etc.) should be the same.

Reproduction Instructions

i3 version

Binary i3 version:  4.23 (2023-10-29) ยฉ 2009 Michael Stapelberg and contributors
Running i3 version: 4.23 (2023-10-29) (pid 3187)
Loaded i3 config:
  /home/guillaume.muller/.config/i3/config (main) (last modified: Fri Aug  2 14:01:42 2024, 4563044 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

Config file

general {
    output_format = "i3bar"
    markup = pango
    interval = 1
    colors = false
    # color_good = "#0000FF"
    # color_degraded = "#00FF00"
    # color_bad = "#FF0000"
}

order += "cpu_usage"
order += "load"
order += "cpu_temperature 0"
order += "memory"
order += "disk /"
order += "disk /home"
order += "ethernet _first_"
order += "wireless _first_"
#order += "volume master"
order += "battery 0"
order += "tztime local"

tztime local {
        format = "<span background='#4c566a' color='#d8dee9'><b>๐Ÿ—“ %a %d %b %H:%M:%S</b></span>" # ๏€— ๐Ÿ—’ ๐Ÿ“…
}

cpu_usage {
        format = "<span background='#4c566a' color='#d8dee9'> ๓ฐป  %usage <span color='#81a1c1'></span></span>" # ๏’ผ ๐Ÿ–ฅ ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿง  %cpu0 %cpu1 %cpu2 %cpu3
        max_threshold = 75
}

load {
        format = "<span background='#4c566a' color='#d8dee9'> %1min <span color='#81a1c1'></span></span>" # ๏’ผ ๐Ÿ–ฅ ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿง  %cpu0 %cpu1 %cpu2 %cpu3
        max_threshold = 75
}

cpu_temperature 0 {
        format = "<span background='#4c566a' color='#d8dee9'> ๏‹ˆ %degrees ยฐC </span>"
        path = "/sys/class/thermal/thermal_zone8/temp"
        max_threshold = 75
}

memory {
        format = "<span background='#4c566a' color='#d8dee9'> ๏‹› %percentage_free </span> " # ๏กš ๏ƒค ๐Ÿ“’ %available (%used) / %total
}

disk "/" {
        format = "<span background='#4c566a' color='#d8dee9'> ๓ฐ‹Š / %avail (%percentage_avail) </span>"  # ๓ฐ‰‰๎‰€๏ƒ‡๓ฐงฏ  ๓ฐ‹Š๓ฑ‹  ๐Ÿ–ด %availaible = for user / %free = for system
        format_below_threshold = "<span background='#4c566a' color='#ff0000'> ๓ฐ‹Š / %avail (%percentage_avail) </span>"
        low_threshold = 10
        threshold_type = percentage_free
        prefix_type = binary # binary / decimal / custom
}

disk "/home" {
        format = "<span background='#4c566a' color='#d8dee9'> ๓ฐ‹Š /h %avail (%percentage_avail) </span>" # ๐Ÿ’พ ๐Ÿ–ด %availaible = for user / %free = for system
        format_below_threshold = "<span background='#4c566a' color='#ff0000'> ๓ฐ‹Š /h %avail (%percentage_avail) </span>"
        low_threshold = 10
        threshold_type = percentage_free
        prefix_type = binary # binary / decimal / custom
}

ethernet _first_ {
        format_up = "<span background='#4c566a'>๓ฐˆ <span color='#d8dee9'>%ip</span></span>" # ๓ฐˆ€๓ฐˆ๓ฐˆ‚  ๐Ÿ–ง ๐Ÿ•ธ ๐Ÿ”€
        format_down = "<span background='#4c566a'>๓ฐˆ‚ </span>" # <span color='#Fe515c'> ๐Ÿžช </span> โŒ ๐Ÿ–ง ๐Ÿ•ธ ๐Ÿ”€
}

# OLD wireless _first_ {
#         format_up = "<span background='#4c566a'>๏‡ซ <span color='#d8dee9'> %essid (%quality) </span></span>" # %ip
#         format_down = "<span background='#4c566a'>๏‡ซ <span color='#5e81ac'> โŒ </span></span>"
# }

wireless _first_ {
        format_up = "<span background='#4c566a'>๓ฐคจ <span color='#d8dee9'>%ip</span></span> <span background='#4c566a' color='#d8dee9'>REPLACE_ETH_SPEED</span>" # ๏‡ซ  ๏‡ซ๓ฐ–ฉ๓ฐ–ช๓ฑ›…๓ฑšผ๓ฐคจ๓ฐคญ๓ฐคฏ๓ฐคฎ Will be replaced by external ~/.config/i4status/network_load.sh script
        format_down = "<span background='#4c566a'>๓ฐคฎ </span> <span color='#d8dee9' background='#4c566a'>REPLACE_ETH_SPEED</span>" #  <span color='#5e81ac'> ๐Ÿžช </span> โŒ  ๐Ÿ•ธ ๐Ÿ”€
}

# volume master {
#         format = "<span background='#4c566a' color='#d8dee9'> ๐Ÿ”Š %volume </span>"
#         format_muted = "<span background='#4c566a' color='#5e81ac'> ๐Ÿ”‡ Muted </span>"
#         device = "default"
#         mixer = "Master"
#         mixer_idx = 0
# }

# battery 0 {
#         last_full_capacity = true
#         format = "<span background='#4c566a' color='#d8dee9'>%status %percentage </span>" # %remaining ๏ƒง
#         path = "/sys/class/power_supply/BAT%d/uevent"
#         format_down = "<span color='#bf616a'> ๓ฑ‰</span>"   # ๐Ÿ•ธ ๏˜ โ†ฏโŒ ๐Ÿ”‹  ๓ฑ‰๓ฑ‰ž
#         status_chr  = "<span color='#81a1c1'> ๓ฑŸฆ</span>"   # ๏‚ช โฌ† ๐Ÿ”บ โš โšก ๓ฑŸ ๓ฑŸž ๓ฑŸก๓ฑŸŸ  ๓ฑŸฆ๓ฑŸค ๏‰€๏‰๏‰‚๏‰ƒ ๓ฐบ๓ฐผ๓ฐพ๓ฐฟ๓ฐ‚
#         status_bat  = "<span color='#d08770'> ๓ฑŸค</span>"   # ๏‚ซ โฌ‡ ๐Ÿ”ป
#         status_unk  = "<span color='#bf616a'> ๓ฐ‚‘</span>"   # ๏™ ๓ฐ‚‘
#         status_full = "<span color='#a3be8c'> ๓ฐน</span>"    # โ˜ป ๏˜ ๓ฑŠฃ๓ฑŸข ๓ฐน
#         low_threshold = 10
#         threshold_type = percentage
#         integer_battery_capacity = true
#         hide_seconds = true
# }

battery 0 {
        format = "<span background='#4c566a'>%status %percentage</span>" # %remaining ๏ƒง
        path = "/sys/class/power_supply/BAT%d/uevent"
        format_down = "๓ฑ‰"   # ๐Ÿ•ธ ๏˜ โ†ฏโŒ ๐Ÿ”‹  ๓ฑ‰๓ฑ‰ž
        # color='#bf616a'
        status_chr  = "๓ฑŸฆ"   # ๏‚ช โฌ† ๐Ÿ”บ โš โšก ๓ฑŸ ๓ฑŸž ๓ฑŸก๓ฑŸŸ  ๓ฑŸฆ๓ฑŸค ๏‰€๏‰๏‰‚๏‰ƒ ๓ฐบ๓ฐผ๓ฐพ๓ฐฟ๓ฐ‚
        # color='#81a1c1'
        status_bat  = "๓ฑŸค"   # ๏‚ซ โฌ‡ ๐Ÿ”ป
        # color='#d08770'
        status_unk  = "๓ฐ‚‘" # ๏™ ๓ฐ‚‘
        #  color='#bf616a'
        status_full = '๓ฐน'    # โ˜ป ๏˜ ๓ฑŠฃ๓ฑŸข ๓ฐน
        #color_full = '#a3be8c'
        last_full_capacity = true
        low_threshold = 10
        threshold_type = percentage
        hide_seconds = true
        integer_battery_capacity = true
}

Linux distribution & Version

Mint 22

Are you using a compositor?

I don't know

Logfile

No response

i3bot commented 1 month ago

I donโ€™t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)