Description: Conky Lines displays information about your system. In the lua file you can change the color scheme used by Conky Lines and set background color You can also choose what to display, only CPU, storage, memory
Installation - unpack source file - copy the file .conkylines to your home directory - copy the file .conkylines_c110 to your home directory - copy the lines folder into ~/.lua
Start conky via 'conky -c .conkylines -q' If you are using Conky version 1.10.0 start conky via 'conky -c .conkylines_c110 -q'Last changelog:
Version 0.6
Removed basic_get_cpu_sensors functionality as this gives problems on certain hardware configurations
Oke, for the connections box I shorten the text when longer than x-character so it will fit into the box. Making the box wider is also an option. As for the CPU. It could have something to do with the fact that you have 12 cores. I only display 8 as a maximum. What you could do is goto line 418 and uncomment '--numofcpus=8' and chang it to 4 or 8 and see if then your CPU is displayed correctly. (the numofcpus is an debug value I put in to test for more than 4 cores, I only have 4 myself)
Hmmm-Strange, I uncommented line 418 & changed cpu detection from "no" to "yes"---And get this error:
conky: llua_do_call: function conky_check_network_interfaces execution failed: /home/dean/.conky/lines/lines.lua:1073: attempt to perform arithmetic on local 's' (a nil value)
Not sure why a cpu test function would cause this line error.
Well, I am able to reproduce the problem now. I have reinstalled Ubuntu 18 on my laptop and there I get the same error. The moment I set show_cpu to no the error is gone. Still have to figure out where it is going wrong though.
Well--I reported too soon...The first line (cpu 1 to 4) reports load, but the lines after do not (5 to 8 & 9 to 12) Those lines all report load @ 93%. I'll mess with it over the next couple of days & try to see what is going on......
Good to hear that. I only have 4 cpu cores and tested with 8 by displaying the first 4 again. For displaying 12 cores you will need to alter conky_basic_cpu and adjust the layout accordingly.
Hi Moob...
Just tried to use your new version...Have not used the old version in quite a while & it looks like Debian Testing will not work with ifconfig anymore....Since my config is purely a desktop--I don't need to do a lot with interfaces--could you head me in the right direction to just hardwire the network interface?
My guess is that ifconfig is not installed when performing a standard installation of Debian Testing. This also is the case with Ubuntu 18.04. There you can install ifconfig with the ' sudo apt install net-tools' command. Alternative is to rewrite the code to use 'ip addr' which is always available.
if you change line 1107 to, local address =conky_ownpreexec("ip addr | grep -E"..iface.." | grep inet | grep -oE '[0-9]\{1,3\}\\.[0-9]\{1,3\}\\.[0-9]\{1,3\}\\.[0-9]\{1,3\}\/[0-9]{1,2}' | tr '\\n' ' ' | awk -F \"/\" '\{print $1\}'") it should be working
Well---maybe my bonded interface is the problem? Using 2 NIC cards as bond0. did the above mod & here is the output:
conky: llua_do_call: function conky_check_network_interfaces execution failed: /home/dean/.conky/lines/lines.lua:1062: attempt to perform arithmetic on local 's' (a nil value)
grep: invalid argument ‘0’ for ‘--directories’
Valid arguments are:
- ‘read’
- ‘recurse’
- ‘skip’
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
ip addr output (scrubbed the addresses):
dean@debian:~$ ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp7s0: mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
link/ether 00:e0:4c:68:0f:bf brd ff:ff:ff:ff:ff:ff
3: eno1: mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
link/ether 42:be:e4:df:ca:38 brd ff:ff:ff:ff:ff:ff
4: bond0: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 42:be:e4:df:ca:38 brd ff:ff:ff:ff:ff:ff
I guess that I should have noted that I got the output after removing the "-q" after the startline--wanted to see terminal output. It just prints that line for as long as the terminal is open.
I have uploaded a new v 0.4 version. I have tested this on the latest Debian Testing and Ubuntu 14. On thing though, I could create the bond interfaces and view them via 'ip addr' and conkylines displays the correct IP, the static bond0 IP, but for some reason I cannot connect to the Internet. This has to do with my lack of knowledge about debian and bonding interfaces. (don't use bonding myself)
So, I did not observe any strange things. ConkyLines start correctly on both systems.
Hmmmm--I'm still seeing the main execution error....I've got work to do, so I'll revisit this in a couple of hours.....As for bonding--I use SystemD to create the bond. After figuring out how to do it--it works very well..
Ratings & Comments
36 Comments
6 Забыл спасибо сказать.
For some reason it's shorting lines, so: All the term output looks good: dean@debian:~$ sensors | grep -iw core Core 0: +53.0°C (high = +84.0°C, crit = +94.0°C) Core 1: +51.0°C (high = +84.0°C, crit = +94.0°C) Core 2: +47.0°C (high = +84.0°C, crit = +94.0°C) Core 3: +58.0°C (high = +84.0°C, crit = +94.0°C) Core 4: +51.0°C (high = +84.0°C, crit = +94.0°C) Core 5: +45.0°C (high = +84.0°C, crit = +94.0°C) dean@debian:~$ sensors | grep -iwE 'core.*high' Core 0: +44.0°C (high = +84.0°C, crit = +94.0°C) Core 1: +43.0°C (high = +84.0°C, crit = +94.0°C) Core 2: +50.0°C (high = +84.0°C, crit = +94.0°C) Core 3: +44.0°C (high = +84.0°C, crit = +94.0°C) Core 4: +61.0°C (high = +84.0°C, crit = +94.0°C) Core 5: +40.0°C (high = +84.0°C, crit = +94.0°C) dean@debian:~$ cat /proc/cpuinfo | grep 'model name' model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz dean@debian:~$ cat /proc/cpuinfo | grep 'processor' processor : 0 processor : 1 processor : 2 processor : 3 processor : 4 processor : 5 processor : 6 processor : 7 processor : 8 processor : 9 processor : 10 processor : 11 Also changed the "connections" box by 20px to accommodate long addresses: conky_wired_tab_connections(tabwidth+40,starty+tabheight/2+190,300,200,"Arial",10,themes.tred,themes.tgreen,themes.tblue)
Oke, for the connections box I shorten the text when longer than x-character so it will fit into the box. Making the box wider is also an option. As for the CPU. It could have something to do with the fact that you have 12 cores. I only display 8 as a maximum. What you could do is goto line 418 and uncomment '--numofcpus=8' and chang it to 4 or 8 and see if then your CPU is displayed correctly. (the numofcpus is an debug value I put in to test for more than 4 cores, I only have 4 myself)
Hmmm-Strange, I uncommented line 418 & changed cpu detection from "no" to "yes"---And get this error: conky: llua_do_call: function conky_check_network_interfaces execution failed: /home/dean/.conky/lines/lines.lua:1073: attempt to perform arithmetic on local 's' (a nil value) Not sure why a cpu test function would cause this line error.
Hmmm--line 1073 is about Cpu names.....Why would it refer to network interface info?
Hmm not sure why. s is a variable in the cpu section. You could try adding a print statement to print the value of s and see what comes back.
Well, I am able to reproduce the problem now. I have reinstalled Ubuntu 18 on my laptop and there I get the same error. The moment I set show_cpu to no the error is gone. Still have to figure out where it is going wrong though.
Uploaded a new version. The problem was the reading of the cpu_sensor function, this is removed for now.
Just downloaded it & it works---Only thing I need to do is enlarge the main box-showing 12 cpu graphs tends to mess up the look :)
Well--I reported too soon...The first line (cpu 1 to 4) reports load, but the lines after do not (5 to 8 & 9 to 12) Those lines all report load @ 93%. I'll mess with it over the next couple of days & try to see what is going on......
Good to hear that. I only have 4 cpu cores and tested with 8 by displaying the first 4 again. For displaying 12 cores you will need to alter conky_basic_cpu and adjust the layout accordingly.
Hi Moob... Just tried to use your new version...Have not used the old version in quite a while & it looks like Debian Testing will not work with ifconfig anymore....Since my config is purely a desktop--I don't need to do a lot with interfaces--could you head me in the right direction to just hardwire the network interface?
My guess is that ifconfig is not installed when performing a standard installation of Debian Testing. This also is the case with Ubuntu 18.04. There you can install ifconfig with the ' sudo apt install net-tools' command. Alternative is to rewrite the code to use 'ip addr' which is always available.
Yes--that is correct--but even after installing it, can't be used without root.
if you change line 1107 to, local address =conky_ownpreexec("ip addr | grep -E"..iface.." | grep inet | grep -oE '[0-9]\{1,3\}\\.[0-9]\{1,3\}\\.[0-9]\{1,3\}\\.[0-9]\{1,3\}\/[0-9]{1,2}' | tr '\\n' ' ' | awk -F \"/\" '\{print $1\}'") it should be working
Well---maybe my bonded interface is the problem? Using 2 NIC cards as bond0. did the above mod & here is the output: conky: llua_do_call: function conky_check_network_interfaces execution failed: /home/dean/.conky/lines/lines.lua:1062: attempt to perform arithmetic on local 's' (a nil value) grep: invalid argument ‘0’ for ‘--directories’ Valid arguments are: - ‘read’ - ‘recurse’ - ‘skip’ Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information.
ip addr output (scrubbed the addresses): dean@debian:~$ ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp7s0: mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000 link/ether 00:e0:4c:68:0f:bf brd ff:ff:ff:ff:ff:ff 3: eno1: mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000 link/ether 42:be:e4:df:ca:38 brd ff:ff:ff:ff:ff:ff 4: bond0: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 42:be:e4:df:ca:38 brd ff:ff:ff:ff:ff:ff
I don't test on bonded interfaces, so that might be the problem. I will see if I can test it.
Is there a way to just bypass the config testing & define the interface straight?
I have just uploaded a new version which can handle bonded interfaces.
Hmmm--Not getting the same error, but I get this: conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Hmm I have noticed the same thing right now, strange. I will pull the v0.4 update back and see what the problem is.
I guess that I should have noted that I got the output after removing the "-q" after the startline--wanted to see terminal output. It just prints that line for as long as the terminal is open.
I have uploaded a new v 0.4 version. I have tested this on the latest Debian Testing and Ubuntu 14. On thing though, I could create the bond interfaces and view them via 'ip addr' and conkylines displays the correct IP, the static bond0 IP, but for some reason I cannot connect to the Internet. This has to do with my lack of knowledge about debian and bonding interfaces. (don't use bonding myself) So, I did not observe any strange things. ConkyLines start correctly on both systems.
Hmmmm--I'm still seeing the main execution error....I've got work to do, so I'll revisit this in a couple of hours.....As for bonding--I use SystemD to create the bond. After figuring out how to do it--it works very well..