Conky Lines

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
Score 63.3%
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 10 months ago

Removed basic_get_cpu_sensors functionality as this gives problems on certain hardware configurations

autocrosser1

10 months ago

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)

Report

C

Moob

10 months ago

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)

Report

autocrosser1

10 months ago

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.

Report

autocrosser1

10 months ago

Hmmm--line 1073 is about Cpu names.....Why would it refer to network interface info?

Report

C

Moob

10 months ago

Uploaded a new version. The problem was the reading of the cpu_sensor function, this is removed for now.

Report

autocrosser1

10 months ago

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 :)

Report

autocrosser1

10 months ago

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......

Report

C

Moob

10 months ago

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.

Report

C

Moob

10 months ago

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.

Report

C

Moob

10 months ago

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.

Report

autocrosser1

10 months ago

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?

Report

C

Moob

10 months ago

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

Report

autocrosser1

10 months ago

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.

Report

autocrosser1

10 months ago

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

Report

C

Moob

10 months ago

I don't test on bonded interfaces, so that might be the problem. I will see if I can test it.

Report

autocrosser1

10 months ago

Is there a way to just bypass the config testing & define the interface straight?

Report

C

Moob

10 months ago

I have just uploaded a new version which can handle bonded interfaces.

Report

autocrosser1

10 months ago

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

Report

C

Moob

10 months ago

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.

Report

autocrosser1

10 months ago

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..

Report

autocrosser1

10 months ago

OK-dug into it a bit & get this from terminal output:

conky: llua_do_call: function conky_check_network_interfaces execution failed: /home/dean/.conky/lines/lines.lua:1067: attempt to perform arithmetic on local 's' (a nil value)

So, it looks like the same problem still.....

Report

C

Moob

10 months ago

Just to be sure, row 1067 is the conky_basic_get_cpu_sensors function ? If you comment this out in detect_hardware, do you still get the error ?
As for bonding, seem to work now but I can't ping to the outside world. Still investigating why.

Report

autocrosser1

10 months ago

Yes--I'm shaking my head...it is the CPU area. I'm now running an X99 board with a i7-5820K. As soon as I removed the CPU graphs & speed the conky works....

Report

autocrosser1

10 months ago

So it all works, but the graphs for memory, swap & harddrives are about 300px lower than the box they "should" be in...I would guess the remove of the CPU graphs changed the spacing?

Report

C

Moob

10 months ago

Yes, when you do not display the CPU info the spacing changes. I will see if I can fix that.
You could check if you run the sensors command, with a commandline as shown in the code, to see what you get back.

Report

Version 0.6 10 months ago

Removed basic_get_cpu_sensors functionality as this gives problems on certain hardware configurations

Version 0.5 10 months ago

Fixed layout when show_cpu is "no"

Version 0.4 10 months ago

Removed the use of ifconfig due to depreciation on newer Linux distributions
Changed disk detection so a CD/DVD is seen correctly
Corrected typo on NIC detection
Added bond NIC detection

Version 0.3 10 months ago

Changed network detection so enp* network interfaces are found.

12345678910
2
product-maker autocrosser1 Nov 20 2016 9 excellent
product-maker dshdsh Nov 03 2016 9 excellent
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
Version 0.6
updated Sep 11 2018
added Nov 02 2016
downloads today
5
page views today 11