Created
February 11, 2023 06:16
-
-
Save marianocarpentier/f84fd5b8ab28f64cd3dfcd9e59e56a10 to your computer and use it in GitHub Desktop.
Conky configuration to display video card memory usage in Nvidia cards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| #===================================================================================== | |
| # arcolinux | |
| # Date : package-date | |
| # Author : Erik Dubois at http://www.erikdubois.be | |
| # Version : package-version | |
| # License : Distributed under the terms of GNU GPL version 2 or later | |
| # Documentation : http://erikdubois.be/ | |
| #====================================================================================== | |
| # CONKY | |
| # For commands in conky.config section: | |
| # http://conky.sourceforge.net/config_settings.html | |
| # | |
| # For commands in conky.text section: | |
| # http://conky.sourceforge.net/variables.html | |
| # | |
| # A PDF with all variables is provided | |
| #===================================================================================== | |
| # FONTS | |
| # To avoid copyright infringements you will have to download | |
| # and install the fonts yourself sometimes. | |
| #===================================================================================== | |
| # GENERAL INFO ABOUT FONTS | |
| # Go and look for a nice font on sites like http://www.dafont.com/ | |
| # Download and unzip - double click the font to install it (font-manager must be installed) | |
| # No font-manager then put fonts in ~/.fonts | |
| # Change the font name in the conky | |
| # The name can be known with a command in the terminal: fc-list | grep "part of name" | |
| # Change width and height of the conky according to font | |
| # Reboot your system or fc-cache -fv in terminal | |
| # Enjoy | |
| #===================================================================================== | |
| # FONTS FOR THIS CONKY | |
| # http://www.dafont.com/style-bats.font | |
| #====================================================================================== | |
| # Titus Modifications (downloaded and editted Chris Titus' .configrc) | |
| #====================================================================================== | |
| # Changed time from Roboto to GE Inspira which is a base Conky Gotham Addon | |
| # Changed Drives from 2 to 3 | |
| # Modified one_window_type from desktop to normal for KDE compatibility | |
| # Modified Ethernet settings | |
| # Modified Pink Lines to Bright Blue | |
| # Removed Extra symbols and incorrect formatting | |
| #====================================================================================== | |
| ]] | |
| conky.config = { | |
| --Various settings | |
| background = true, -- forked to background | |
| cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring. | |
| diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring. | |
| double_buffer = true, -- Use the Xdbe extension? (eliminates flicker) | |
| if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address | |
| net_avg_samples = 2, -- The number of samples to average for net data | |
| no_buffers = true, -- Subtract (file system) buffers from used memory? | |
| temperature_unit = 'celsius', -- fahrenheit or celsius | |
| text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256 | |
| update_interval = 1, -- update interval | |
| imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song | |
| --Placement | |
| xinerama_head = 1, | |
| alignment = 'top_left', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right, | |
| -- middle_left,middle_middle,middle_right,none | |
| --Arch Duoscreen | |
| --gap_x = -1910, | |
| gap_x = 55, -- pixels between right or left border | |
| gap_y = 0, -- pixels between bottom or left border | |
| minimum_height = 970, -- minimum height of window | |
| minimum_width = 475, -- minimum width of window | |
| maximum_width = 600, -- maximum width of window | |
| --Graphical | |
| border_inner_margin = 0, -- margin between border and text | |
| border_outer_margin = 55, -- margin between border and edge of window | |
| border_width = 0, -- border width in pixels | |
| default_bar_width = 0, -- default is 0 - full width | |
| default_bar_height = 20, -- default is 6 | |
| default_gauge_height = 65, -- default is 25 | |
| default_gauge_width =40, -- default is 40 | |
| default_graph_height = 60, -- default is 25 | |
| default_graph_width = 0, -- default is 0 - full width | |
| default_shade_color = '#000000', -- default shading colour | |
| default_outline_color = '#222222', -- default outline colour | |
| draw_borders = false, -- draw borders around text | |
| draw_graph_borders = true, -- draw borders around graphs | |
| draw_shades = false, -- draw shades | |
| draw_outline = true, -- draw outline | |
| stippled_borders = 0, -- dashing the border | |
| --Textual | |
| extra_newline = false, -- extra newline at the end - for asesome's wiboxes | |
| format_human_readable = true, -- KiB, MiB rather then number of bytes | |
| font = 'Roboto Mono:size=14', -- font for complete conky unless in code defined | |
| max_text_width = 0, -- 0 will make sure line does not get broken if width too smal | |
| max_user_text = 16384, -- max text in conky default 16384 | |
| override_utf8_locale = true, -- force UTF8 requires xft | |
| short_units = true, -- shorten units from KiB to k | |
| top_name_width = 35, -- width for $top name value default 15 | |
| top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false. | |
| uppercase = false, -- uppercase or not | |
| use_spacer = 'none', -- adds spaces around certain objects to align - default none | |
| use_xft = true, -- xft font - anti-aliased font | |
| xftalpha = 1, -- alpha of the xft font - between 0-1 | |
| --Windows | |
| own_window = true, -- create your own window to draw | |
| own_window_argb_value = 150, -- real transparency - composite manager required 0-255 | |
| own_window_argb_visual = true, -- use ARGB - composite manager required | |
| own_window_colour = '#000000', -- set colour if own_window_transparent no | |
| own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it | |
| own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0% | |
| own_window_title = 'system_conky', -- set the name manually - default conky "hostname" | |
| own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel | |
| --Colours | |
| default_color = '#D9DDE2', -- default color and border color | |
| color1 = '#AAAA13', | |
| color2 = '#6ca163', | |
| color3 = '#9cb4c9', | |
| color4 = '#D9BC83', | |
| color5 = '#00BFFF', --teal | |
| color6 = '#42be2d', --white | |
| --Signal Colours | |
| color7 = '#C0FF00', --green | |
| color8 = '#FFA726', --orange | |
| color9 = '#F1544B', --firebrick | |
| --Lua | |
| }; | |
| conky.text = [[ | |
| ${color6}${voffset 4}${font GE Inspira:size=36}${alignc}${time %l}:${time %M} ${time %p}${font}${color} | |
| ${color6}${voffset 4}${font GE Inspira:size=12}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font}${color} | |
| ${color5}${font Roboto:size=10}${voffset 2}S Y S T E M ${hr 2}${font}${color} | |
| ${color2}Hostname:${color} ${alignr}${nodename} | |
| ${color2}OS: $alignr ${color3}${execi 6000 lsb_release -d| awk '{$1=""; print $0}'} | |
| ${color2}Kernel: $alignr ${color3} $kernel | |
| ${color2}Uptime:${color} ${alignr}${uptime} | |
| ${color5}${font Roboto:size=10}V I D E O ${hr 2}${font}${color} | |
| ${color2}GPU:$alignr${color}${exec nvidia-smi --query-gpu=gpu_name --format=csv,noheader,nounits} $color | |
| ${color2}GPU Temperature:$alignr${color} ${execi 60 nvidia-settings -query [gpu:0]/GPUCoreTemp -t} °C | |
| ${color2}GPU Utilization:$alignr${color} ${exec nvidia-smi | grep % | cut -c 61-63} % | |
| ${color2}VRAM Utilization:$alignr${color} ${color2}Used ${color}${exec nvidia-smi | grep % | cut -c 37-40} M ${color2}Total ${color} ${color}${exec nvidia-smi | grep % | cut -c 47-51 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//'} M | |
| #${color2}VRAM Utilization:$alignr${color} ${exec echo "(100/"$(nvidia-smi | grep % | cut -c 47-51)")"*$(nvidia-smi | grep % | cut -c 36-40 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//') | bc -l} % | |
| ${color1}${execbar echo `expr "(100/"$(nvidia-smi | grep % | cut -c 47-51)")"*$(nvidia-smi | grep % | cut -c 36-40 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//') | bc -l` 20,600} | |
| ${color2}GPU Power Draw:$alignr${color} ${exec nvidia-smi | grep % | cut -c 21-23} W | |
| ${color5}${font Roboto:size=10}P R O C E S S O R S ${hr 2}${font}${color} | |
| ${color2}CPU Freq:${color} $alignr${freq}MHz | |
| ${color2}CPU Temp:${color} $alignr ${acpitemp}°C | |
| ${color2}CPU Usage: ${color} $alignr ${cpu}% | |
| ${color1}${cpubar cpu0 20,600} | |
| ${color2}CPU Core 1:${color} ${alignr}${offset -10}${cpu cpu1}% ${alignr}${cpubar cpu1} | |
| ${color2}CPU Core 2:${color} ${alignr}${offset -10}${cpu cpu2}% ${alignr}${cpubar cpu2} | |
| ${color2}CPU Core 3:${color} ${alignr}${offset -10}${cpu cpu3}% ${alignr}${cpubar cpu3} | |
| ${color2}CPU Core 4:${color} ${alignr}${offset -10}${cpu cpu4}% ${alignr}${cpubar cpu4} | |
| ${color7}Top Processes ${goto 350}CPU% ${goto 450}Mem% | |
| ${color}${top name 1} ${goto 350}${top cpu 1} ${goto 450}${top mem 1} | |
| ${color}${top name 2} ${goto 350}${top cpu 2} ${goto 450}${top mem 2} | |
| ${color5}${font Roboto:size=10}M E M O R Y ${hr 2}${font}${color} | |
| ${color2}Usage ${color3}$memperc% ${goto 300}${color2}Total ${color3}$memmax | |
| ${color2}Used ${color3}$mem ${goto 300}${color2}Free ${color3}$memfree | |
| ${color1}${membar 20,600} | |
| ${color7}Top Processes ${goto 350}CPU% ${goto 450}Mem% | |
| ${color}${top_mem name 1}${alignr}${goto 350}${top_mem cpu 1} ${goto 450}${top_mem mem 1} | |
| ${color}${top_mem name 2}${alignr}${goto 350}${top_mem cpu 2} ${goto 450}${top_mem mem 2} | |
| ${color5}${font Roboto:size=10}D R I V E S ${hr 2}${font}${color} | |
| ${color7}/ NVMe ${color} ${alignr}${color2}Used ${color}${fs_used /} ${color2}Total ${color}${fs_size /} | |
| ${color1}${fs_bar 20,600} | |
| ${color2}I/O Read:${color1} ${alignr}${offset -10}${diskio_read /dev/nvme0n1p2}${alignr}${diskiograph_read nvme0n1p2 20,300} | |
| ${color2}I/O Write:${color1} ${alignr}${offset -10}${diskio_write /dev/nvme0n1p2}${alignr}${diskiograph_write nvme0n1p2 20,300} | |
| ${color5}${color5}${font Roboto:size=10}N E T W O R K ${hr 2}${font}${color} | |
| ${color7}IP Address: ${color} ${alignr}${offset -10$}${addrs enp3s0} | |
| ${color2}Eth Up:${color1} ${alignr}${offset -10$}${upspeed enp3s0}${alignr}${upspeedgraph enp3s0 20,300} | |
| ${color2}Eth Down:${color1} ${alignr}${offset -10$}${downspeed enp3s0}${alignr}${downspeedgraph enp3s0 20,300} | |
| ]]; | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like this in Ubuntu 22.10: