My Conky config

I had create a pretty config for conky with any features.
On first, i can’t get a conky.conf from my other MX-Linux, conky produces any errors.
I had export the internal conky.conf with conky -C >conky.conf and edit them step by step:
------------------------------------------------------------------------------------------------------------------[[
–[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2019 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
]]

conky.config = {
alignment = ‘top_right’,
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=8’,
gap_x = 15,
gap_y = 40,
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 = ‘desktop’,
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 = [[
${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}SYSTEM INFORMATON${color}${hr 1}${font}
${color}OS: ${color cyan} ${alignr} $sysname DietPi v8.8.1 ${color}
${color}Kernel: ${alignr}${color cyan}$sysname $kernel $machine ${color}
${color}Hostname: ${alignr}${color cyan}$nodename ${color}
${color}Display ${alignr}${color cyan}${execi 600 xdpyinfo | awk ‘/dimensions/ {print $2}’ }${color}
${color}Date&Time ${alignr}${color cyan} ${time %A}, ${if_match “pmfix${time %p}” == “pmfix”}${time %d %B %Y %k:%M}${else}${time %d %B %Y %l:%M %P}${endif}$font${color}
${color}Uptime ${alignr}${color cyan} $uptime ${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}CPU${color}${hr 1}${color}${font}
${color}CPU History: ${color darkgreen}${cpugraph 20,0 0000ff 00ff00}
${color}CPU Details: ${color cyan} $machine, $freq(MHz), ${color}CPU Temp:${color cyan} $acpitemp (Grad C)
${color}CPU Usage:${color cyan} $cpu% ${color orange}${cpubar 4,0}
${color}${font}Core 0 ${color orange}${execi 4 sensors 2>/dev/null | grep ‘Core 0’ | cut -c18-24} ${alignc 60}${color orange}${cpubar cpu0}${color}
${color}${font}Core 1 ${color orange}${execi 4 sensors 2>/dev/null | grep ‘Core 1’ | cut -c18-24} ${alignc 60}${color orange}${cpubar cpu1}${color}
${color}${font}Core 2 ${color orange}${execi 4 sensors 2>/dev/null | grep ‘Core 2’ | cut -c18-24} ${alignc 60}${color orange}${cpubar cpu2}${color}
${color}${font}Core 3 ${color orange}${execi 4 sensors 2>/dev/null | grep ‘Core 3’ | cut -c18-24} ${alignc 60}${color orange}${cpubar cpu3}${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}MEMORY${color}${hr 1}${color}${font}
${color}RAM Usage:${color cyan} $mem/$memmax - $memperc% ${color orange} ${membar 4} ${color}
${color}Swap Usage${color cyan} $swap/$swapmax - $swapperc% ${color orange} ${swapbar 4} ${color}
${color}Free:${alignr} ${color cyan} $memeasyfree ${color}
${color}Buffers / Cached: ${alignr} ${color cyan} $font$buffers / $cached ${color}
${color}Processes:${color cyan} $processes ${alignr} ${color}Running:${color cyan} $running_processes ${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}PROZESS & LOAD${color}${hr 1}${color}${font}
${color} Name PID CPU% MEM% $color
${color} ${top name 1} ${color cyan} ${top pid 1} ${top cpu 1} ${top mem 1} ${color}
${color} ${top name 2} ${color cyan} ${top pid 2} ${top cpu 2} ${top mem 2} ${color}
${color} ${top name 3} ${color cyan} ${top pid 3} ${top cpu 3} ${top mem 3} ${color}
${color} ${top name 4} ${color cyan} ${top pid 4} ${top cpu 4} ${top mem 4} ${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}DISKS${color}${hr 1}${color}${font}
${color}SDCARD_mmcblk0p2:
/ ${color cyan}${fs_used /}/${fs_size /} ${color orange}${fs_bar 6 /} ${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}NETWORK${color}${hr 1}${color}${font}
${color}LAN-Connections: ${alignr}${color}In:${color cyan} ${tcp_portmon 1 32767 count} ${color}Out:${color cyan} ${tcp_portmon 32768 61000 count} ${color}ALL:${color cyan} ${tcp_portmon 1 65535 count}
${color}Down:${color cyan} ${downspeed eth0} k/s${color} ${offset 80}Up:${color cyan} ${upspeed eth0} k/s ${color}
${color}${downspeedgraph eth0 16,120 009bf9 ffffff} ${offset 40} ${upspeedgraph eth0 16,120 009bf9 ffffff}
${color}LAN IP: ${color cyan}${addr eth0} ${offset 20} ${color} WAN IP: ${color cyan} ${execi 7200 wget http://v4.ipv6-test.com/api/myip.php -q -O -} ${color}

${voffset -8}${font Good Times:Italic:Bold:size=7}${color orange}CONNCTIONS${color}${hr 1}${color}${font}
${color}Outbound Connection ${alignr} Remote Service/Port $color
${color cyan}${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}${color}
${color cyan}${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}${color}
${color cyan}${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}${color}
${color}Inbound Connection ${alignr} Local Service/Port $color
${color cyan}${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}${color}
${color cyan}${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}${color}
${color cyan}${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}${color}

]]

------------------------------------------------------------------------------------------------------------------[[

conky-toggle-script (run from created starter)
#!/bin/sh

#! click to start, click to stop

if pidof conky | grep [0-9] > /dev/null
then
exec killall conky
else
exec conky
fi
exit

2 Likes

Welcome to our community and thanks for sharing your experiance.

Just one hint, when posting commands and/or shell bash scripts, it makes it easier to read and copy when you wrap them into code tags or fences, like so:

Here some text with a short `inline command`.
```bash
here a longer command --with 'options' and bash --syntax "$highlighting"
```

=> Result will be:

Here some text with a short inline command.

here a longer command --with 'options' and bash --syntax "$highlighting"

Oh man!!! That info on the side is VERY awesome!

how heavy on resources is it with all that live monitoring

Just try it out! DietPi runs on my old Raspberry Pi 2.
Live monitoring with conky is not very resource intensive.

Approximately 140 idle processes are running on the system.

Conky also displays incoming and outgoing connects.
I first had trouble getting a conf from another Linux system
to transfer, there were always errors. Finally, I had the internal config
read and edited step by step until everything was displayed what I wanted.

Installed is next to DietPi-Defaultinstall xfce-desktop, Apache2 & PHP7.4, Python2,
conky, webmin, x11vnc and cockpit.

I use the system as a web server for a small static website, as webgut
for an 8-channel relay control (switched socket outlet), and as a jump host.
The addition of JDownloader is planned.
The system is only used “Headless” via WEB,Cockpit and X11vnc.