Conky Basic

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 58.0%
Description:

Conky Basic displays only the most basic information about your system.
In the lua file you can change the color scheme used by Conky Basic, show all CPU cores or not and set a battery alert level.
You can also choose what to display, only CPU, storage, memory , details about storage etc..

Thanks to autocrosser1 and soundrolf for their ideas and code contributions

When using a laptop don't forget to set the show_battery option to yes.

If you modified Conky Basic make a backup of your files first before installing this version !!!

Installation
- unpack source file
- copy the file .conkybasic to your home directory
- copy the file .conkybasic_c110 to your home directory
- copy the basic folder into ~/.lua
- install the Unique font in ~/.lua/basic

Start conky via 'conky -c .conkybasic -q'
If you are using Conky version 1.10.0 start conky via 'conky -c .conkybasic_c110 -q'

Keep in mind that Conky 1.10.0 uses a new configuration file format and is still work in progress. That's why I used some work-arounds to get things working, so your mileage may vary.
Last changelog:

Version 1.6 2 years ago

- Changed network and battery detection

autocrosser1

4 years ago

Could you include a print flag in each section to see what one is throwing the nil value?

Report

autocrosser1

4 years ago

I changed all the user variables one at a time from yes to no...same output.

Report

autocrosser1

4 years ago

dean@linux:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3699.855
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3700.000
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3700.000
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3700.000
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3699.855
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3699.855
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3700.000
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
stepping : 4
microcode : 0x428
cpu MHz : 3699.855
cache size : 10240 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 7399.76
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

dean@linux:~$ cat /proc/cpuinfo | grep 'core id'
core id : 0
core id : 1
core id : 2
core id : 3
core id : 0
core id : 1
core id : 2
core id : 3

Hmmm.... Well, I would like the basic lua info for the window creation--I've got some ideas of my own & would like to try a lua-only conky--you can see that mine are a blend about 50/50 conky/lua....I would of course credit for the code.

Report

C

Moob

4 years ago

Hi autocrosser,

Thanks for the information. I have just uploaded a new version which hopefully will display core i7 procs correctly :)

The informational tabs are now in their own functions, so they can be reused. Maybe this is what you need ?

Report

autocrosser1

4 years ago

Running better, but This is what I get:

The window starts & prints garbage...terminal output looks like:

dean@linux:~$ '/home/dean/.conky/conky-startup.sh'
conky: Syntax error (/home/dean/.conky/conkyrc_basic:1: '=' expected near 'top_right') while reading config file.
conky: Assuming it's in old syntax and attempting conversion.
conky: llua_load: cannot open /home/dean/.lua/basic/basic.lua: No such file or directory
conky: desktop window (a00037) is subwindow of root window (293)
conky: window type - desktop
conky: drawing to created window (0xe00001)
conky: drawing to double buffer
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

This repeats until I kill conky.

Report

autocrosser1

4 years ago

for some reason my gedit was 10 lines off--the problem is in CPU detect.... I'm running a i7 XEON 3.7--4 real & 4 virtual cores...if I comment out:

-- number of cpu cores
--hardware.cpucores = conky_parse("${pre_exec cat /proc/cpuinfo | grep 'core id' | wc -l}")

--local i
--for i=1,tonumber(hardware.cpucores) do
-- cpucores[i]=i
-- cpumax[i]=1
--end
--if debug == true then
--print(hardware.cpucores.." cpu cores found")
--end

That is where the "for" number error is coming from.

The conky starts to work--looks a bit wrong (artifacts in it), but with a little work I can track that down--could you look at the cpu detect to see where it is going wrong?

Just a question....is there a way you could strip out the hardware detect functions & just allow a user to input the sections for his/her system? I really like where you are going with this, but every time I comment out a detect section, the next one comes up as a error.

Report

C

Moob

4 years ago

Glad to hear you found the problem. I only have a core i5, with only 4 cores, to test with.
Could you send me the output of the following commands ?
cat /proc/cpuinfo
cat /proc/cpuinfo | grep 'core id'

I like to have end-users only do a minimum of configuration themselves, that's why I use detect hardware functions.
Do you mean a way to enable hardware detect functions. As in 'detect_cpu=yes/no' , 'detect_hdd=yes/no' ?

Report

autocrosser1

4 years ago

Hmmm--I look in /proc/devices & see:

Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
21 sg
29 fb
99 ppdev
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
195 nvidia-frontend
226 drm
243 nvidia-uvm
244 nvlink_core
245 mei
246 tpm
247 hidraw
248 ptp
249 pps
250 bsg
251 watchdog
252 rtc
253 dimmctl
254 ndctl

Could the multiple listing for Nvidia be the problem? I don't use the packaged driver from Debian--use the downloaded driver straight from Nvidia.

Report

autocrosser1

4 years ago

Greetings...

I like what you've done & would really like to run it... Problem seems to be that I run into a error on line 435 with the Nvidia detection--I'm running dual GPUs SLI if that is a clue.. I'm also showing several pre-exec errors--I do quite a bit of conky editing, but have not really done much lua editing (basic stuff)...So my .conky is a little more busy than most---I did minor edits to include Basic into my existing file system.

Errors look like:

dean@linux:~$ '/home/dean/.conky/conky-startup.sh'
conky: Syntax error (/home/dean/.conky/conkyrc_basic:1: '=' expected near 'top_right') while reading config file.
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (a00037) is subwindow of root window (293)
conky: window type - desktop
conky: drawing to created window (0xe00001)
conky: drawing to double buffer
conky: unknown variable '$pre_exec'
conky: unknown variable '$pre_exec'
conky: llua_do_call: function conky_check_nvidia execution failed: /home/dean/.conky/conky_basic.lua:435: 'for' limit must be a number
conky: unknown variable '$pre_exec'
conky: unknown variable '$pre_exec'

<snip>repeats 40 times<snip>

conky: llua_do_call: function conky_check_nvidia execution failed: /home/dean/.conky/conky_basic.lua:435: 'for' limit must be a number
conky: unknown variable '$pre_exec'
conky: unknown variable '$pre_exec'
conky: llua_do_call: function conky_check_nvidia execution failed: /home/dean/.conky/conky_basic.lua:435: 'for' limit must be a number
conky: unknown variable '$pre_exec'

Running conky 1.10.0-1 & lua 5.2.4-1 with Debian Sid-----Ideas?

Report

C

Moob

4 years ago

hi autocrosser,

I only have one nvidia card in my system, more had as my system died on me. I could be that something goes wrong with detecting multiple nvidia cards.

You could try to changing info.nvidiacard="no" in the conky_check_nvidia function so it nevers detect it and see if you than can start conky

I am using conky 1.9.0 and lua 5.2

Report

C

Moob

4 years ago

or comment out
-- conky_parse("${if_existing /proc/devices nvidia}${lua_parse check_nvidia

so it never gets checked.

Report

Version 1.6 2 years ago

- Changed network and battery detection

Changelog 1.5 2 years ago

v 1.5 Added network interface display. Rearranged high CPU temperature check
v 1.4 IP address fix, distribution name fix, some minor fixes.
v 1.3 Changed disk detection so CD/DVD devices are also shown correctly

Version 1.2 3 years ago

Changed CPU high temperature limit detection

Changelog v1.1 3 years ago

Added check for eth1 and wlan1
Changed own_prexec function to prevent running out of file handles
Limit displayed diskname to 15 characters

Changelog v 1.0
Added system CPU speed and temperature details
Added disk details
Added network details

4 years ago

Version 0.9
Changed text scroller
Changed system information
Added Audacious extended information

Version 0.8.1
Added Audacious detection in Radiotray

Version 0.8
Added LAN text to fixed network
Changed Radiotray text
Added clock to radiotray when not active
Added system information to the radiotray. This is visible when not listening to music
Added user preference for showing system information or not.
Added user preference for the maximum number of processes to show
Added rhythmbox detection in Radiotray
Changed text_buffer_size to 512 in .conkyrc to accommodate Rhythmbox metadata
Added extra battery location
Minor cosmetic changes

Version 0.7
Added process tab

Version 0.6
Moved Conky 1.10.0 CPU workaround from configuration file to lua file
Change / detection as it also displayed /home as / instead of home
Minor cosmetic changes
Added Radio Tray tab as per request by soundrolf

Version 0.5.1
Change CPU display code. Should work fine in Conky 1.10 now, with a work-around in the conkybasic_c110 file

Version 0.4
Minor change in CPU detect function
Corrected display for only 1 CPU present
Changed CPU value pass-through to other functions
Tested with conky 1.10.0
Add conky version detection and 1.10.0 workarounds

Version 0.3
Major code overhaul. Every tab now has it's own function
Added disklabel length check
Changed battery display
Changed CPU detection from 'core id' to 'processor'. Core i7 processors should be correctly shown now.

Version 0.1 new

12345678910
1
product-maker soundrolf Nov 10 2015 9 excellent
product-maker Base: 4 x 5.0 Ratings
no95typem
May 09 2019
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
Version 1.6
updated Sep 11 2017
added Oct 24 2015
downloads 24h
1
mediaviews 24h 0
pageviews 24h 5