I want conky to display the upload/download speed of my internet connection

I want conky to display the upload/download speed of my internet connection.
I have installed the conky-manager. It has many widgets but none of those display the internet upload/download speed.

Note : I am not trying to monitor how much data I have uploaded/downloaded. I want to know the current speed of my internet connection just like speedtest-cli works.

Is this even possible ?

1 Like

You mean something like this?
image

$ speedtest-cli 
Retrieving speedtest.net configuration...
Testing from <snip> 
Retrieving speedtest.net server list...
Selecting best server based on ping...
<snip>
Testing download speed................................................................................
Download: 3.55 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.03 Mbit/s

As you can see speedtest-cli reports my download speed as 3.55 Mbit/s
This is what I want conky to report.

That’s what I’m asking you want to show total only or the speed at the current time? I think the image shows what you want if you want that then that can be done you need to edit the script. Like shown below.

${color1}${font ConkySymbols:size=16}d${font} ${voffset -10} Wired» $hr${color}
${color1}${goto 35}Total Down/Up : ${color}${totaldown <your network intrface name>}/${totalup <your network intrface name>} 
${color1}${goto 35}Speed Down/Up : ${color}${downspeed <your network intrface name>}/${upspeed <your network intrface name>}

Post delete …Please wait

Did you change <your network intrface name> to match your network interface name?

Use ifconfig to see your network interface name.

${color1}${font ConkySymbols:size=16}d${font} ${voffset -10} Wired» $hr${color}
${color1}${goto 35}Total Down/Up : ${color}${totaldown wlan0}/${totalup wlan0}
${color1}${goto 35}Speed Down/Up : ${color}${downspeed wlan0}/${upspeed wlan0}

I have set my interface name as wlan0 but conky still refuses to start

$ conky
conky: Syntax error (/home/home/.conkyrc:1: unexpected symbol near '$') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:147: attempt to index a nil value (local 'settings')

 ifconfig 
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 60:45:cb:87:53:a5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 127  base 0xb000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 29675  bytes 24012436 (22.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 29675  bytes 24012436 (22.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.xxx.xx  netmask 255.255.255.0  broadcast 192.168.xxx.xxx
        inet6 fe80::2144:14cd:2d28:4cd8  prefixlen 64  scopeid 0x20<link>
        inet6 2409:4060:409:ad16:d237:45ff:fed2:b1aa  prefixlen 64  scopeid 0x0<global>
        inet6 2409:4060:409:ad16:7750:a630:c3e1:32a4  prefixlen 64  scopeid 0x0<global>
        ether d0:37:45:d2:b1:aa  txqueuelen 1000  (Ethernet)
        RX packets 544412  bytes 1478686196 (1.3 GiB)
        RX errors 0  dropped 8301  overruns 0  frame 0
        TX packets 327446  bytes 82830918 (78.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Try this,

Total Down/Up : ${totaldown wlan0}/${totalup wlan0}
Speed Down/Up : ${downspeed wlan0}/${upspeed wlan0}

You don’t have some of the variables I use.

$ cat ~/.conkyrc
Total Down/Up : ${totaldown wlan0}/${totalup wlan0}
Speed Down/Up : ${downspeed wlan0}/${upspeed wlan0}
$ conky
conky: Syntax error (/home/home/.conkyrc:1: syntax error near 'Down') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:147: attempt to index a nil value (local 'settings')

${goto 35}Total Down/Up : ${color}${totaldown wlan0}/${totalup wlan0} 
${goto 35}Speed Down/Up : ${color}${downspeed wlan0}/${upspeed wlan0}
$ cat ~/.conkyrc
${goto 35}Total Down/Up : ${color}${totaldown wlan0}/${totalup wlan0} 
${goto 35}Speed Down/Up : ${color}${downspeed wlan0}/${upspeed wlan0}

$ conky
conky: Syntax error (/home/home/.conkyrc:1: unexpected symbol near '$') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:147: attempt to index a nil value (local 'settings')

can you show me your conky config file.

I searched the web to find the location of the conky config file but it doesn’t exist on my install.

$ cat /etc/conky/conky.conf
cat: /etc/conky/conky.conf: No such file or directory
$ cat ~/.config/conky/conky.conf
cat: /home/home/.config/conky/conky.conf: No such file or directory

Oh I didn’t look at the file you were making changes to. Conky doesn’t use a file named .conkyrc those rc files are mainly for terminal and bash.

For conky the configuration file is in ~/.config/conky/conky.config normally if you installed conky and ran it there should be a file names conky.config

How did you install conky?

I installed the package called conky-manager by using the command
sudo pacman -S conky-manager conky got installed as a dependency.

It’s GUI theme manager it’s not conky. You need conky you can use one of the below commands.

  • sudo pacman -S conky (To install from Arch officail repos)

From AUR

  • yay -S conky-cli (conky without X11 dependencies)
  • yay -S conky-lua (with Lua support)
  • yay -S conky-lua-nv (with both Lua and Nvidia support)

Any one of the above works. But if you have nvidia card best to go with the last one.

Official WiKi in Arch WiKi.

Installed conky. Created that folder and file. Here it is

$ cat ~/.config/conky/conky.config
Total Down/Up : ${totaldown wlan0}/${totalup wlan0}
Speed Down/Up : ${downspeed wlan0}/${upspeed wlan0}

Here’s how conky is looking
conky

$ inxi -G
Graphics:  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
           Display: x11 server: X.org 1.21.1.1 driver: loaded: intel
           unloaded: fbdev,modesetting,vesa resolution: <missing: xdpyinfo>
           Message: Unable to show advanced data. Required tool glxinfo missing.

It’s using the default conky.conf. Did you kill conky and reload it? if not try it should load the changed file if not conky -c ~/.config/conky/conky.config use that in terminal. But kill current running conky first.

I am running conky by using the command “conky” in the terminal & terminating it by using CTRL+C.

$ conky -c ~/.config/conky/conky.config
conky: Syntax error (/home/home/.config/conky/conky.config:1: syntax error near 'Down') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:147: attempt to index a nil value (local 'settings')

$ cat ~/.config/conky/conky.config
Total Down/Up : ${totaldown wlan0}/${totalup wlan0}
Speed Down/Up : ${downspeed wlan0}/${upspeed wlan0}

You can’t run only those two lines you need the ui and a few other configurations done in that file. The easiest thing for you to do is search the internet for conky themes download a file you like and edit that and add what you want to file.

You can start here and read the Arch Wiki about conky.

Also, you might want to install some icon fonts like font-awesome and powerline-fonts. Some themes need them.

1 Like