MadLittleMods / MadLittleMods/linux-notes
Show CPU core usage (monitor)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Manjaro with XFCE desktop environment
## CPU Usage
Potential options:
- https://github.com/KDE/ksysguard
- https://github.com/flightlessmango/MangoHud
With the KDE Plasma desktop environment, the desktop widgets look pretty good: (picture from https://gitlab.freedesktop.org/drm/amd/-/issues/2557)
### Conky
Show CPU core usage (monitor)
1. `pamac install conky`
1. Copy the default config to start your own custom config: `mkdir -p ~/.config/conky && conky --print-config > ~/.config/conky/conky.conf`
- Other reference configs: https://github.com/brndnmtthws/conky/wiki/Configs
~/.config/conky/conky.conf for AMD Ryzen 7 7800X3D
```lua
-- Conky, a system monitor https://github.com/brndnmtthws/conky
--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
-- print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
conky.config = {
alignment = 'top_left',
background = false,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
extra_newline = false,
font = 'DejaVu Sans Mono:size=12',
gap_x = 60,
gap_y = 60,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'normal',
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
use_xft = true,
}
conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color2}${voffset 5}AMD® Ryzen 7 7800X3D 4.2 GHz: ${color1}@ ${color green}${freq} MHz
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 8 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
${color}${goto 13}CPU 9 ${goto 81}${color green}${cpu cpu9}% ${goto 131}${color3}${cpubar cpu9 18}
${color}${goto 13}CPU 10 ${goto 81}${color green}${cpu cpu10}% ${goto 131}${color3}${cpubar cpu10 18}
${color}${goto 13}CPU 11 ${goto 81}${color green}${cpu cpu11}% ${goto 131}${color3}${cpubar cpu11 18}
${color}${goto 13}CPU 12 ${goto 81}${color green}${cpu cpu12}% ${goto 131}${color3}${cpubar cpu12 18}
${color}${goto 13}CPU 13 ${goto 81}${color green}${cpu cpu13}% ${goto 131}${color3}${cpubar cpu13 18}
${color}${goto 13}CPU 14 ${goto 81}${color green}${cpu cpu14}% ${goto 131}${color3}${cpubar cpu14 18}
${color}${goto 13}CPU 15 ${goto 81}${color green}${cpu cpu15}% ${goto 131}${color3}${cpubar cpu15 18}
${color}${goto 13}CPU 16 ${goto 81}${color green}${cpu cpu16}% ${goto 131}${color3}${cpubar cpu16 18}
${color1}All CPU ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 2 temp 1}°C ${goto 250}${color1}Up: ${color green}$uptime
${color grey}$hr
${color green}$running_processes ${color1}running of ${color green}$processes ${color1}loaded processes.
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed} ${color grey} - Down:$color ${downspeed}
$hr
${color grey}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]
```

### Showing GPU usage
TBD. Need to figure out the command to extract this info from and put in the conky template
See https://wiki.archlinux.org/title/AMDGPU#Monitoring. You could use `amdgpu_top` or `nvtop` which despite the name, does work with AMD cards.
#### Other references:
- https://askubuntu.com/questions/164064/is-there-an-application-indicator-for-cpu-usage-by-core/846327#846327
- https://askubuntu.com/a/1014284/196148
- https://forum.level1techs.com/t/how-i-got-conky-to-show-my-amdgpu-temps-and-amd-cpu-temps/138753
- https://forum.level1techs.com/t/how-to-configure-customize-glances-conky-and-determine-which-sensor-is-what/153813
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by locating the Linux monitoring note that should contain this material; use the provided Conky installation, configuration, and per-core usage example, and consider the work done when the note clearly documents CPU-core monitoring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100