Author Topic: Show all the cpu cores in conky.  (Read 5348 times)

0 Members and 1 Guest are viewing this topic.

Offline Ripo

  • Neuling
  • *
  • Posts: 26
  • I'm new. Be nice!
    • Robertotolin.com
  • Branch: stable
  • Desktop: Manjaro XFCE
  • GPU Card: AMD RV630
  • GPU driver: free driver
  • Kernel: linux4.4-x64
  • Skill: Intermediate
Show all the cpu cores in conky.
« on: 28. January 2016, 13:30:22 »
Hi to all. I am looking for a way to show all the cores of my cpu on conky. Now, it shows only the average load. I tried a few changes i found in the net, but i had no luck. My changes don't showed good. The actual code looks so:
Code: (xml) [Select]
${voffset 10}${goto 40}${color}CPU$alignr$cpu%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu 1}%
I have 8 cores and it is good to show all because many apps only use 1 when it get crazy and it's not so obviuos when you see only the average load.
I want to only modify the lines for the cpu.
I used many Ubuntu and OpenSuse distros and i find Manjaro JWM really spectacular. For the normal photographer the Ubuntu way is easier. I liked Bodhi Linux very much and use it in a old MacBook (32 bit EFI boot) that don't work with Manjaro, but installed this JWM Edition on muy MacPro and it flies. You need a little more experience with linux, but the final result is really spectacular. Great work!!
I attach a screenshot so you can see the actual look.
MacPro 3.1 early 2008
2x Intel Xeon E5462 (8 cores)
Kingston 120 Gb SSD
8 Gb ram

Offline Strit

  • Maintainer
  • ***
  • Posts: 746
  • Manjaro Torrent Maintainer
    • Strits.dk
  • Branch: Stable
  • Desktop: XFCE
  • GPU Card: GTX 760 OC
  • GPU driver: Non-free nvidia 361
  • Kernel: 4.4.8-1-MANJARO
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #1 on: 28. January 2016, 14:06:39 »
You should be able to get it for each core with something like:

Code: [Select]
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu0}%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu1}%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu2}%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu3}%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu4}%

etc etc.

See documentation here: http://conky.sourceforge.net/variables.html
Desktop PC: Manjaro XFCE 15.12 (stable, kernel 4.4)
Private Laptop: Manjaro Strit 16.03 (unstable, kernel 4.6)
Work Laptop: Manjaro Strit 16.03 (stable, kernel 4.4)
Netbook: Arch Linux XFCE/LXqt (i686, kernel 4.0)

Offline Holmes

  • Mirror Support Team
  • ***
  • Posts: 2039
  • Brazilian and Hispanic Support Team
    • Manjaro Brasil
  • Branch: Stable
  • Desktop: Manjaro XFCE
  • GPU Card: Mobile Intel (R) 945
  • GPU driver: Non-free
  • Kernel: kernellinux
  • Skill: Novice
Re: Show all the cpu cores in conky.
« Reply #2 on: 28. January 2016, 14:16:59 »
@ripo,

you have to put different colors for the cpus?

vlw fwi, Holmes :)


==> Manjaro Brasil I Manjaro Hispano
==> IRC Manjaro Brasil: #manjaro-br I IRC Manjaro Hispano: #manjaro-es

Offline Ripo

  • Neuling
  • *
  • Posts: 26
  • I'm new. Be nice!
    • Robertotolin.com
  • Branch: stable
  • Desktop: Manjaro XFCE
  • GPU Card: AMD RV630
  • GPU driver: free driver
  • Kernel: linux4.4-x64
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #3 on: 28. January 2016, 14:31:00 »
Hi, Holmes.
No, i like the white font. No need for other colors.
MacPro 3.1 early 2008
2x Intel Xeon E5462 (8 cores)
Kingston 120 Gb SSD
8 Gb ram

Offline Holmes

  • Mirror Support Team
  • ***
  • Posts: 2039
  • Brazilian and Hispanic Support Team
    • Manjaro Brasil
  • Branch: Stable
  • Desktop: Manjaro XFCE
  • GPU Card: Mobile Intel (R) 945
  • GPU driver: Non-free
  • Kernel: kernellinux
  • Skill: Novice
Re: Show all the cpu cores in conky.
« Reply #4 on: 28. January 2016, 14:33:52 »
Code: [Select]
${voffset 5}${goto 40}$font$color2${top name 1}$alignr${color ffffff}${top cpu 1}%${color}
${voffset 5}${goto 40}$font$color2${top name 2}$alignr${color ffffff}${top cpu 2}%${color}
${voffset 5}${goto 40}$font$color2${top name 3}$alignr${color ffffff}${top cpu 3}%${color}
${voffset 5}${goto 40}$font$color2${top name 4}$alignr${color ffffff}${top cpu 4}%${color}
${voffset 5}${goto 40}$font$color2${top name 5}$alignr${color ffffff}${top cpu 5}%${color}

vlw fwi, Holmes :)


==> Manjaro Brasil I Manjaro Hispano
==> IRC Manjaro Brasil: #manjaro-br I IRC Manjaro Hispano: #manjaro-es

Offline Ripo

  • Neuling
  • *
  • Posts: 26
  • I'm new. Be nice!
    • Robertotolin.com
  • Branch: stable
  • Desktop: Manjaro XFCE
  • GPU Card: AMD RV630
  • GPU driver: free driver
  • Kernel: linux4.4-x64
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #5 on: 28. January 2016, 15:34:55 »
Thank you all. The result is similar to my own tries, a bit weird. It shows the load and the processes, but not the number of the cpu. It's a bit strange. I think the best is to see the cpu's whit a number, the load in % and, at the bottom, the name of the processes in the same way it looks now. I attach the result.
MacPro 3.1 early 2008
2x Intel Xeon E5462 (8 cores)
Kingston 120 Gb SSD
8 Gb ram

Offline mandog

  • Held Mitglied
  • *****
  • Posts: 1921
  • Architect Forum And G+ Forum Owner With Daniel S
  • Branch: All
  • Desktop: Gnome, Mate, E19, Openbox,FLuxbox,Budgie, XFCE openRC,
  • GPU Card: nvidia
  • GPU driver: Non Free
  • Kernel: latest
  • Skill: Advanced
Re: Show all the cpu cores in conky.
« Reply #6 on: 28. January 2016, 15:54:51 »
This is a basic conky set up I use with 6 cores it shows all 6 cores and they are numbered with a cpu bar
Code: [Select]
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#
# -- Pengo (conky@pengo.us)
#

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft no

# Update interval in seconds
update_interval 2.0

# Minimum size of text area
 minimum_size 180
 maximum_width 200
# Draw shades?
draw_shades no

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
font arial


uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 0

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, black90 == #e5e5e5
default_color white
# Text settings #
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
own_window_colour 000000
own_window_transparent yes

# Text alignment, other possible values are commented
alignment top_right
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 20

# stuff after 'TEXT' will be formatted on screen

own_window_argb_value 0
own_window_argb_visual yes
minimum_size 0 0
TEXT
${voffset 0}${offset 0}${color EAEAEA}${font Bitstream Charter:pixelsize=40}${time %H:%M}
${voffset 0}${offset 0}${font GE Inspira:pixelsize=22}${time %a},${color FFA300}${time %d} ${color EAEAEA}${font GE Inspira:pixelsize=22}${time  %b} ${time %Y}
$color
${color #88ECE0}SYSTEM ${hr 1}$color
${font Arial:bold:size=9}$nodename
$sysname $kernel $machine
${color #88ECE0}CPU ${hr 1}$color
${freq}MHz
Load: ${loadavg}   
Uptime: ${uptime}
 ${alignc}CPU temp${color0} ${hwmon temp  2} C
 ${color}Core 1 Usage:$color ${alignc} ${cpu cpu1}% ${color}${cpubar cpu1}
 ${color}Core 2 Usage:$color ${alignc} ${cpu cpu2}% ${color}${cpubar cpu2}
 ${color}Core 3 Usage:$color ${alignc} ${cpu cpu3}% ${color}${cpubar cpu3}
 ${color}Core 4 Usage:$color ${alignc} ${cpu cpu4}% ${color}${cpubar cpu4}
 ${color}Core 5 Usage:$color ${alignc} ${cpu cpu5}% ${color}${cpubar cpu5}
 ${color}Core 6 Usage:$color ${alignc} ${cpu cpu6}% ${color}${cpubar cpu6}
 ${cpugraph 000000 DFEC88}
 NAME             PID       CPU%      MEM%
 ${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
 ${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
 ${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
 ${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}

${color #88ECE0}MEMORY / DISK ${hr 1}$color
 RAM:   $mem   ${membar 6}$color
 Swap:  $swapperc%   ${swapbar 6}$color

 Root:  ${fs_used_perc /}%   ${fs_bar 6 /}$color
 Home:  ${fs_used_perc /home}%   ${fs_bar 6 /home}$color

 ${color}DiskI/O:${color}${diskio}
 ${diskiograph 000000 88D5EC}

${color #88ECE0}NETWORK (${addr enp2s0}) ${hr 1}$color
 Down: $color${downspeed enp2s0} k/s ${alignr}Up: ${upspeed enp2s0} k/s
 ${downspeedgraph enp2s0 25,100 000000 ff0000} ${alignr}${upspeedgraph enp2s0
25,100 000000 00ff00}$color
 Total: ${totaldown enp2s0} ${alignr}Total: ${totalup enp2s0}
 Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768
 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}
 ${alignc}MOBO temp${color0} ${hwmon temp 1:}C
 #${#FF0000}GPU Temp: ${alignr}${#FF0000}${nvidia temp} C
 #${#FF0000}Fan Speed: ${alignr}${#FF0000}${execi 5 nvidia-settings -q [fan:0]/GPUCurrentFanSpeed -t} %
 #${#FF0000}GPU Clock: ${alignr}${#FF0000}${nvidia gpufreq} MHz
 #${#FF0000}Mem Clock: ${alignr}${#FF0000}${nvidia memfreq} MHz
 #${#FF0000}Mem Used: ${alignr}${#FF0000}${execi 5 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t} / ${exec nvidia-settings -q [gpu:0]/TotalDedicatedGPUMemory -t} MiB

« Last Edit: 28. January 2016, 16:53:59 by FadeMind »
A ENGLISHMAN IN PERU
I'm dyslexic Please do not complain about punctuation or spelling,
FANBOY,Taken from the urban dictionary
 A pathetic insult often used by fanboys themselves to try and put down people who don't like whatever it is they like.

Offline Ripo

  • Neuling
  • *
  • Posts: 26
  • I'm new. Be nice!
    • Robertotolin.com
  • Branch: stable
  • Desktop: Manjaro XFCE
  • GPU Card: AMD RV630
  • GPU driver: free driver
  • Kernel: linux4.4-x64
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #7 on: 28. January 2016, 16:15:59 »
Thank you, mandog. That code worked. The exact code i introduced in conky is this:
Code: (xml) [Select]
${color}Core 1 Usage:$color ${alignc} ${cpu cpu1}% ${color}${cpubar cpu1}
 ${color}Core 2 Usage:$color ${alignc} ${cpu cpu2}% ${color}${cpubar cpu2}
 ${color}Core 3 Usage:$color ${alignc} ${cpu cpu3}% ${color}${cpubar cpu3}
 ${color}Core 4 Usage:$color ${alignc} ${cpu cpu4}% ${color}${cpubar cpu4}
 ${color}Core 5 Usage:$color ${alignc} ${cpu cpu5}% ${color}${cpubar cpu5}
 ${color}Core 6 Usage:$color ${alignc} ${cpu cpu6}% ${color}${cpubar cpu6}
 ${color}Core 7 Usage:$color ${alignc} ${cpu cpu7}% ${color}${cpubar cpu7}
 ${color}Core 8 Usage:$color ${alignc} ${cpu cpu8}% ${color}${cpubar cpu8}
And the resulting screenshot:
MacPro 3.1 early 2008
2x Intel Xeon E5462 (8 cores)
Kingston 120 Gb SSD
8 Gb ram

Offline mandog

  • Held Mitglied
  • *****
  • Posts: 1921
  • Architect Forum And G+ Forum Owner With Daniel S
  • Branch: All
  • Desktop: Gnome, Mate, E19, Openbox,FLuxbox,Budgie, XFCE openRC,
  • GPU Card: nvidia
  • GPU driver: Non Free
  • Kernel: latest
  • Skill: Advanced
Re: Show all the cpu cores in conky.
« Reply #8 on: 28. January 2016, 16:18:56 »
Thank you, mandog. That code worked. The exact code i introduced in conky is this:
Code: (xml) [Select]
${color}Core 1 Usage:$color ${alignc} ${cpu cpu1}% ${color}${cpubar cpu1}
 ${color}Core 2 Usage:$color ${alignc} ${cpu cpu2}% ${color}${cpubar cpu2}
 ${color}Core 3 Usage:$color ${alignc} ${cpu cpu3}% ${color}${cpubar cpu3}
 ${color}Core 4 Usage:$color ${alignc} ${cpu cpu4}% ${color}${cpubar cpu4}
 ${color}Core 5 Usage:$color ${alignc} ${cpu cpu5}% ${color}${cpubar cpu5}
 ${color}Core 6 Usage:$color ${alignc} ${cpu cpu6}% ${color}${cpubar cpu6}
 ${color}Core 7 Usage:$color ${alignc} ${cpu cpu7}% ${color}${cpubar cpu7}
 ${color}Core 8 Usage:$color ${alignc} ${cpu cpu8}% ${color}${cpubar cpu8}
And the resulting screenshot:
Glad to help
A ENGLISHMAN IN PERU
I'm dyslexic Please do not complain about punctuation or spelling,
FANBOY,Taken from the urban dictionary
 A pathetic insult often used by fanboys themselves to try and put down people who don't like whatever it is they like.

Offline simgin

  • Held Mitglied
  • *****
  • Posts: 774
  • Branch: All.
  • Desktop: XFCE+Alpine Linux, Mate+Fedora, Ubuntu Server + Mate and NoX+LinuxBBQ
  • GPU Card: GeForce 8600M & GT 555M 2GB
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #9 on: 28. January 2016, 23:20:02 »
@ Ripo, slightly off topic, can you please share your wallpaper? Looks amazing!

cheerio

simgin

Offline Ripo

  • Neuling
  • *
  • Posts: 26
  • I'm new. Be nice!
    • Robertotolin.com
  • Branch: stable
  • Desktop: Manjaro XFCE
  • GPU Card: AMD RV630
  • GPU driver: free driver
  • Kernel: linux4.4-x64
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #10 on: 29. January 2016, 09:04:50 »
Hi, simgin. I found it in a collection of Manjaro backgrounds but i don't remember the url. I uploaded it to dropbox:
https://www.dropbox.com/s/dsuftkb07f17wu3/manjaro_colors.jpg?dl=0
MacPro 3.1 early 2008
2x Intel Xeon E5462 (8 cores)
Kingston 120 Gb SSD
8 Gb ram

Offline simgin

  • Held Mitglied
  • *****
  • Posts: 774
  • Branch: All.
  • Desktop: XFCE+Alpine Linux, Mate+Fedora, Ubuntu Server + Mate and NoX+LinuxBBQ
  • GPU Card: GeForce 8600M & GT 555M 2GB
  • Skill: Intermediate
Re: Show all the cpu cores in conky.
« Reply #11 on: 29. January 2016, 13:42:07 »
^ Cool, much appreciated!  :D

cheerio

simgin