[RESOLVED] Conky Stops Running

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
pvoveris
Level 1
Level 1
Posts: 27
Joined: Sun Aug 04, 2019 8:03 pm

[RESOLVED] Conky Stops Running

Post by pvoveris »

I've had this issue for a while now and can';t seem to figure out why my conky display stops running.

I have turned on debug and leave the window open to see whatever displays, and other than normal items, the last entry is
"conky: received SIGINT or SIGTERM to terminate. bye!"

I haven't terminated it or closed the window etc, but it always ends this way after some time running.

Anyone have any ideas as to why this is happening?

Thanks,
Peter
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
zcot
Level 9
Level 9
Posts: 2781
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Stops Running

Post by zcot »

"conky: received SIGINT or SIGTERM to terminate. bye!"

that means the SIGINT or SIGTERM signal was sent to the process. :D

How about posting the config? I've never seen that happen, ever. Pretty weird. some voodoo?
pvoveris
Level 1
Level 1
Posts: 27
Joined: Sun Aug 04, 2019 8:03 pm

Re: Conky Stops Running

Post by pvoveris »

Sure, Here is the config file.


conky.config = {

--Various settings

background = true, -- forked to background
cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring.
diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring.
double_buffer = true, -- Use the Xdbe extension? (eliminates flicker)
if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address
net_avg_samples = 2, -- The number of samples to average for net data
no_buffers = true, -- Subtract (file system) buffers from used memory?
temperature_unit = 'celsius', -- fahrenheit or celsius
text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256
update_interval = 1, -- update interval
imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song


--Placement

alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
-- middle_left,middle_middle,middle_right,none
--Arch Duoscreen
--gap_x = -1910,
gap_x = -325, -- pixels between right or left border
gap_y = 0, -- pixels between bottom or left border
minimum_height = 600, -- minimum height of window
minimum_width = 300, -- minimum height of window
maximum_width = 300, -- maximum height of window

--Graphical

border_inner_margin = 10, -- margin between border and text
border_outer_margin = 5, -- margin between border and edge of window
border_width = 0, -- border width in pixels
default_bar_width = 80, -- default is 0 - full width
default_bar_height = 10, -- default is 6
default_gauge_height = 25, -- default is 25
default_gauge_width =40, -- default is 40
default_graph_height = 40, -- default is 25
default_graph_width = 0, -- default is 0 - full width
default_shade_color = '#000000', -- default shading colour
default_outline_color = '#000000', -- default outline colour
draw_borders = false, -- draw borders around text
draw_graph_borders = true, -- draw borders around graphs
draw_shades = false, -- draw shades
draw_outline = false, -- draw outline
stippled_borders = 0, -- dashing the border

--Textual

extra_newline = false, -- extra newline at the end - for asesome's wiboxes
format_human_readable = true, -- KiB, MiB rather then number of bytes
font = 'Roboto Mono:size=10', -- font for complete conky unless in code defined
max_text_width = 0, -- 0 will make sure line does not get broken if width too smal
max_user_text = 16384, -- max text in conky default 16384
override_utf8_locale = true, -- force UTF8 requires xft
short_units = true, -- shorten units from KiB to k
top_name_width = 21, -- width for $top name value default 15
top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false.
uppercase = false, -- uppercase or not
use_spacer = 'none', -- adds spaces around certain objects to align - default none
use_xft = true, -- xft font - anti-aliased font
xftalpha = 1, -- alpha of the xft font - between 0-1

--Windows

own_window = true, -- create your own window to draw
own_window_argb_value = 200, -- real transparency - composite manager required 0-255
own_window_argb_visual = true, -- use ARGB - composite manager required
own_window_colour = '#000000', -- set colour if own_window_transparent no
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it
own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0%
own_window_title = 'system_conky', -- set the name manually - default conky "hostname"
own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel


--Colours

default_color = '#D9DDE2', -- default color and border color
color1 = '#FF0000',
color2 = '#597AA1',
color3 = '#77b81e',
color4 = '#D9BC83',
color5 = '#00BFFF',
color6 = '#FFFFFF',

--Signal Colours
color7 = '#1F7411', --green
color8 = '#FFA726', --orange
color9 = '#F1544B', --firebrick

--Lua


};

conky.text = [[
${color6}${voffset 4}${font GE Inspira:size=36}${alignc}${time %l}:${time %M} ${time %p}${font}${color}
${color6}${voffset 4}${font GE Inspira:size=12}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font}${color}

${color5}${font Roboto:size=10}${voffset 2}S Y S T E M ${hr 2}${font}${color}
${color}${offset 15}Hostname:${color} ${alignr}${nodename}
${color}${offset 15}Distro:${color}${alignr}${execi 6000 lsb_release -a | grep 'Description'|awk {'print $2" "$3" "$4" "$5'}}
#${color}Distro:${color}${alignr}${execi 6000 lsb_release -a | grep 'Description'|awk {'print $1'}}
${color}${offset 15}Kernel:${color}${alignr}${exec uname -r}
#${color}${offset 15}Nvidia: ${alignr}${execp nvidia-smi --query-supported-clocks=gpu_name --format=csv,noheader}
${color}${offset 15}Nvidia Driver: ${alignr}${execi 60000 nvidia-smi | grep "Driver Version"| awk {'print $3'}}
${color}${offset 15}Uptime:${color} ${alignr}${uptime}
${color5}${font Roboto:size=10}P R O C E S S O R S ${hr 2}${font}${color}
${color}${offset 15}CPU Freq:${color} $alignr${freq}MHz
${color}${offset 15}CPU Temp:${color} $alignr${execi 10 sensors | grep 'Package id 0' | awk {'print $4'}}
${color}${voffset 4}${offset 15}History:${color} ${alignr}${cpugraph 8,100}
${color}${voffset 4}${offset 30}CPU Thread 1:${color} ${alignr}${offset -10}${cpu cpu1}%${alignr}${cpubar cpu1}
${color}${offset 30}CPU Thread 2:${color8} ${alignr}${offset -10}${cpu cpu2}%${alignr}${cpubar cpu2}
${color}${offset 30}CPU Thread 3:${color} ${alignr}${offset -10}${cpu cpu3}%${alignr}${cpubar cpu3}
${color}${offset 30}CPU Thread 4:${color8} ${alignr}${offset -10}${cpu cpu4}%${alignr}${cpubar cpu4}
${color}${offset 30}CPU Thread 5:${color} ${alignr}${offset -10}${cpu cpu5}%${alignr}${cpubar cpu5}
${color}${offset 30}CPU Thread 6:${color8} ${alignr}${offset -10}${cpu cpu6}%${alignr}${cpubar cpu6}
${color}${offset 30}CPU Thread 7:${color} ${alignr}${offset -10}${cpu cpu7}%${alignr}${cpubar cpu7}
${color}${offset 30}CPU Thread 8:${color8} ${alignr}${offset -10}${cpu cpu8}%${alignr}${cpubar cpu8}
${color5}${offset 15}${voffset 4}Top CPU Processes${goto 278}cpu%
${color}${voffset 4}${offset 30}1 - ${top name 1}${alignr}${goto 170} ${goto 274}${top cpu 1}
${color}${offset 30}2 - ${top name 2}${alignr} ${goto 274}${top cpu 2}
${color}${offset 30}3 - ${top name 3}${alignr} ${goto 274}${top cpu 3}
${color}${offset 30}4 - ${top name 4}${alignr} ${goto 274}${top cpu 4}
${color}${offset 30}5 - ${top name 5}${alignr} ${goto 274}${top cpu 5}
${color5}${font Roboto:size=10}M E M O R Y ${hr 2}${font}${color}
${color}${voffset 4}${offset 15}RAM: ${color}${alignr}${offset -10}${mem} / ${memmax}${alignr}${membar}
${color}${offset 15}Swap:${color}${alignr}${offset -10}${swap} / ${swapmax}${alignr}${swapbar}
${color5}${voffset 4}${offset 15}Top Processes${goto 265}mem%
${color}${voffset 4}${offset 30}1 - ${top_mem name 1}${alignr}${goto 274}${top_mem mem 1}
${offset 30}2 - ${top_mem name 2}${alignr}${goto 170} ${goto 274}${top_mem mem 2}
${offset 30}3 - ${top_mem name 3}${alignr}${goto 170} ${goto 274}${top_mem mem 3}
${offset 30}4 - ${top_mem name 4}${alignr}${goto 170} ${goto 274}${top_mem mem 4}
${offset 30}5 - ${top_mem name 5}${alignr}${goto 170} ${goto 274}${top_mem mem 5}
${color5}${font Roboto:size=10}D R I V E S ${hr 2}${font}${color}
${offset 15}${color}Root:${color} ${alignr}${offset -10}${fs_used /} / ${fs_size /}${alignr}${fs_bar}
${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sda1}${alignr}${diskiograph_read sda1 8,100}
${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sda1}${alignr}${diskiograph_write sda1 8,100}

${offset 15}${color}SanDisk_SSD:${color} ${alignr}${offset -10}${fs_used /mnt/SanDisk_SSD} / ${fs_size /mnt/SanDisk_SSD}${alignr}${fs_bar /mnt/SanDisk_SSD}
${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sdb1}${alignr}${diskiograph_read sdb1 8,100}
${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sdb1}${alignr}${diskiograph_write sdb1 8,100}

${offset 15}${color}SYSTEM:${color} ${alignr}${offset -10}${fs_used /mnt/7F6F5194249EA820} / ${fs_size /mnt/7F6F5194249EA820}${alignr}${fs_bar /mnt/7F6F5194249EA820}
${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/nvme0n1p2}${alignr}${diskiograph_read nvme0n1p2 8,100}
${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/nvme0n1p2}${alignr}${diskiograph_write nvme0n1p2 8,100}

${offset 15}${color}Data :${color} ${alignr}${offset -10}${fs_used /mnt/B55D757DDEC9FF23} / ${fs_size /mnt/B55D757DDEC9FF23}${alignr}${fs_bar /mnt/B55D757DDEC9FF23}
${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sdc2}${alignr}${diskiograph_read sdc2 8,100}
${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sdc2}${alignr}${diskiograph_write sdc2 8,100}

${offset 15}${color}Storage :${color} ${alignr}${offset -10}${fs_used /mnt/D21E5C8F1E5C6F0B} / ${fs_size /mnt/D21E5C8F1E5C6F0B}${alignr}${fs_bar /mnt/D21E5C8F1E5C6F0B}
${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sdd2}${alignr}${diskiograph_read sdd2 8,100}
${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sdd2}${alignr}${diskiograph_write sdd2 8,100}

${offset 15}${color}NAS :${color} ${alignr}${offset -10}${fs_used /media/Library} / ${fs_size /media/Library}${alignr}${fs_bar /media/Library}
#${offset 30}${color}I/O Read:${color} ${alignr}${offset -10}${diskio_read 192.168.0.235:/Library}${alignr}${diskiograph_read 192.168.0.235:/Library 8,100}
#${offset 30}${color}I/O Write:${color} ${alignr}${offset -10}${diskio_write 192.168.0.235:/Library}${alignr}${diskiograph_write 192.168.0.235:/Library 8,100}

${color5}${color5}${font Roboto:size=10}N E T W O R K ${hr 2}${font}${color}
${color}${offset 30}IP Address: ${color}${alignr}${offset -10$}${addrs enp0s31f6}
${color8}${offset 30}Public IP: ${color8}${alignr}${execi 60 curl ipinfo.io/ip}
${color}${offset 30}Eth Up:${color} ${alignr}${offset -10$}${upspeed enp0s31f6}${alignr}${upspeedgraph enp0s31f6 8,100}
${color}${offset 30}Eth Down:${color} ${alignr}${offset -10$}${downspeed enp0s31f6}${alignr}${downspeedgraph enp0s31f6 8,100}
${color5}${font Roboto:size=10}N V I D I A ${hr 2}${font}
#${font Roboto:size=10,weight:bold}${color5}${execp nvidia-smi --query-supported-clocks=gpu_name --format=csv,noheader}${font}
#${color3}${font Roboto:size=10}${execp nvidia-smi --query-supported-clocks=gpu_name --format=csv,noheader}${font}
${color3}${font StyleBats:size=20}N${font}${color}${offset 8}${voffset -12}GPU Temp ${alignr}${execi 60 nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader} °C
${color}${offset 30}Fan Speed ${alignr}${execi 60 nvidia-settings -q [fan:0]/GPUCurrentFanSpeedRPM -t} RPM
${color}${offset 30}GPU Clock ${alignr}${execi 60 nvidia-settings -q GPUCurrentClockFreqs | grep -m 1 Attribute | awk '{print $4}' | sed -e 's/\.//' | cut -d, -f1} MHz
#${color}${offset 30}Mem Clock ${alignr}${execi 86400 nvidia-settings -q all| grep -m 1 GPUCurrentClockFreqsString | awk '{print $4}'}
# | sed 's/.$//'} MHz
${color}${offset 30}Mem Used ${alignr}${execi 60 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t} / ${exec nvidia-settings -q [gpu:0]/TotalDedicatedGPUMemory -t} MiB0
]];
User avatar
zcot
Level 9
Level 9
Posts: 2781
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Stops Running

Post by zcot »

Good.

You can enclose that config in the </> tags above and it will reduce the wall of text, but it does give us a simple "Select All" button too and we copy it. Anyway.

Is the failure about every 16.6 hours?

I don't see anything exactly right off that seems like a culprit.

There is a lot going on though, and to try to figure it out you can make some adjustments, -comment out a line to try to find it.

Are all of your lines succeeding? For example:

Code: Select all

${color}${offset 15}Distro:${color}${alignr}${execi 6000 lsb_release -a | grep 'Description'|awk {'print $2" "$3" "$4" "$5'}}
if you run this in terminal:

Code: Select all

lsb_release -a | grep 'Description'|awk {'print $2" "$3" "$4" "$5'}
what is the answer?
I would use this line:

Code: Select all

${color}${offset 15}Distro:${color}${alignr}${execi 6000 lsb_release -a 2>/dev/null | grep 'Description'|awk {'print $2" "$3" "$4" "$5'}}
but even better:

Code: Select all

${color}${offset 15}Distro:${color}${alignr}Linux Mint 19.3 Tricia
That's not especially here or there, but I was looking at the execi commands of which there are 10 in this config. So 10 separate processes will fire off of this config. 5 of those will fire at exactly the same time once a minute in quick succession, -at the end, the nvidia related commands. You could change them to 59 secs, 60 secs, 61, etc. so they are spaced out. I could imagine the possibility of some hangup if those 5 calls are happening simultaneously as separate processes, but not really sure.

As long as all the calls are succeeding correctly, like all the extra partition/directory calls, and everything else, I don't see any obvious problem.

But the barrage of nvidia-settings calls have me questioning that.

Along with those last 5 execi calls at once, the last line of the conf also has an exec call for every second.

And the config in total is run as separate backgrounded process too 'background = true,'. So in the end result there's a lot of possibility of many processes going on although if they are all successful and working that's fine but if one of them is failing in some bad way then who knows the result.

What happens if you change every execi line to 1 second so they are all fired on every loop? If it bombs then clearly the problem has something to do with the nvidia calls.


This one is handled cleaner with:

Code: Select all

${color8}${offset 30}Public IP: ${color8}${alignr}${execi 60 curl ipinfo.io/ip}

Code: Select all

${color8}${offset 30}Public IP: ${color8}${alignr}${execi 60 curl ipinfo.io/ip 2>/dev/null}

I don't know though really, there is a lot of processing going on. And you're not really getting a true sense of debug with all the sub process activity.

Is it a some glitch overload with the nvidia-settings collection every minute? and kills a sub process that calls back to conky to say we need to shut down?

Is it the main sub process eventually overloading from failures or other sub process calls then gracefully failing (or not) and forcing the main conky process to terminate?


I don't have an nvidia driver running here so I can't test the issue right off.
pvoveris
Level 1
Level 1
Posts: 27
Joined: Sun Aug 04, 2019 8:03 pm

Re: Conky Stops Running

Post by pvoveris »

Hi zcot,

Well I was doing some other testing and decided to call conky direclty instead of using the shell script and it has been running fine now for about 3 days, the original script was as follows in my startup, I also called it when it had crashed.

killall -q conky
sleep 10s && conky -Dc "$HOME/.conky/Titus.conkyrc" &

Instead, just for the sake of trying something, I just opened a command and entered conky -DDc "$HOME/.conky/Titus.conkyrc" &

As I said it has now been running for 3 days, I'm not sure why running the script would cause that though.
User avatar
zcot
Level 9
Level 9
Posts: 2781
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky Stops Running

Post by zcot »

pvoveris wrote: Mon Apr 06, 2020 8:28 pm Hi zcot,

Well I was doing some other testing and decided to call conky direclty instead of using the shell script and it has been running fine now for about 3 days, the original script was as follows in my startup, I also called it when it had crashed.

killall -q conky
sleep 10s && conky -Dc "$HOME/.conky/Titus.conkyrc" &

Instead, just for the sake of trying something, I just opened a command and entered conky -DDc "$HOME/.conky/Titus.conkyrc" &

As I said it has now been running for 3 days, I'm not sure why running the script would cause that though.
Ahh, perfect!

I see. Yes:
killall -q conky doesn't do it. There's another process involved, there is detached from shell and conky backgrounded. :wink:

Get on terminal and start it without the & detachment. Then pkill or killall it. It visually stops the conky thread, but the terminal does not return. So that detached shell starting process is lost somewhere there with your script, and then there must be some way, maybe that is somehow cleaned up in time by the system. I'm not sure how the system handles these lost threads. But that's where the problem was. It looks like it is probably handled automatically and correctly at some point sending the SIGINT or SIGTERM to the process but at that point it's mixed up and shuts down the current system. Glad you found that! Great!


I'm not sure of the internal conf result when using background = true, -- forked to background

That seems like 2 different ways of distancing the process. I'm not prime with what happens here. But it actually might be 3 ways. the terminal detached(but started as daemonized it does need to return to the shell to finally terminate it cleanly), conky starting as daemonized, and the conf calling for backgrounding.

But I might guess that running only one or the other should be sufficiently about the same result.

Figure that out too and let us know! :D
pvoveris
Level 1
Level 1
Posts: 27
Joined: Sun Aug 04, 2019 8:03 pm

Re: [RESOLVED] Conky Stops Running

Post by pvoveris »

Starting this just normally without a script and everything runs fine, somehow the script must have caused some sort of issue resulting in the OS terminating at some point.
Locked

Return to “Compiz, Conky, Docks & Widgets”