[SOLVED, I think...NOPE] Conky showing incorrect RAM usage

Bizarre happenings with my Conky. It is showing almost three times as much RAM being used than actually is in use.

Anyone got any ideas?

This is the relevant section

RANDOM ACCESS MEMORY: ${mem}/${memmax}
${font PF Tempesta Five Condensed:pixelsize=11}${memperc}%${font SF Pro Text Regular:pixelsize=8}${goto 45} ${color c1c1c1}${membar 5,410}${color c1c1c1}

${font PF Tempesta Five Condensed:pixelsize=11}APPLICATION:${alignc -10}TOP PID:${alignr 10}MEMORY %:
${font PF Tempesta Five Condensed:pixelsize=11}${top_mem name 1}${alignc}${top pid 1}${alignr 10}${top_mem mem 1}%
${font PF Tempesta Five Condensed:pixelsize=11}${top_mem name 2}${alignc}${top pid 2}${alignr 10}${top_mem mem 2}%
${font PF Tempesta Five Condensed:pixelsize=11}${top_mem name 3}${alignc}${top pid 3}${alignr 10}${top_mem mem 3}%

And the settings

conky.config = {
-- from where does conky start
alignment = "top_right",

-- distance from screen edge
gap_x = -3840,
gap_y = 0,

-- size settings for conky window
maximum_width = 500,
minimum_width = 500,
max_text_width = 0,

-- set conky behavior on screen (adjustable in the color section)
	-- allows setting own WM_Class. conky is the default
own_window_class = "conky",
	-- don"t share the desktop, makes conky its own animal
own_window = true,
	-- on some systems does give full transparency, but cannot be adjusted as this setup allows
own_window_transparent = true,
	-- necessary to get adjustable transparency
own_window_argb_visual = true,
own_window_argb_value = 100,
       -- normal, desktop, dock, panel, override
own_window_type = "override",
	--set values for conky behavior
own_window_hints = "undecorated,below,sticky,skip_taskbar,skip_pager",

-- set border/shading behavior
default_outline_color = "000000",
default_shade_color = "000000",
draw_borders = false,
border_width = 1,
stippled_borders = 0,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
border_inner_margin = 10,
uppercase = true,
-- set special conditions for conky
out_to_x = true,
background = false,
out_to_console = false,
out_to_stderr = false,
text_buffer_size = 512,
total_run_times = 0,
double_buffer = true,
update_interval = 2,
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
short_units = false,
imlib_cache_size = 256,
show_graph_scale = false,
show_graph_range = false,

-- Text options

	-- anti-aliased font use and value = .1 to 1.0
use_xft = true,
xftalpha = 0.8,
	-- Xft font to use
font = "DejaVuSans:size=10.0",
	-- UTF8 support required for XFT
override_utf8_locale = true,

default_color = '57007C',
color0 = '86A8FF',
color1 = 'A15EC8',
color2 = 'D5D5D5',
color3 = 'FFFFFF',
color4 = '223867',
color5 = 'D6A0A0',
color6 = '86A8FF',
color7 = 'F6C3FF',
color8 = 'BBBBBB',
color9 = '3C3C3C',
own_window_colour = "000000",

--  color0 = Time, Local, Public, Top Processes Labels, Date
--  color1 = AM/PM, Headers
--  color2 = Weather Forecasts, Percentages Before Graphs, Read, Write, Top Processes 1
--  color3 = Calendar, 1st Labels, Weather Days
--  color4 = Graph Bars
--  color5 = High Temperatures
--  color6 = Low Temperatures, Top Processes 2-9
--  color7 = Second Labels/Values, IP
--  color8 = Weather Icons
--  color9 = Separator Bars, Graph Borders

lua_load = "/home/dobbie/.config/conky/draw_bg.lua",
lua_draw_hook_pre = "draw_bg"

What did you use to determine the actual RAM usage? Different applications calculate the mem usage differently so there is always variation.

3x differential does seem way off though.

What I used to show memory using I posted in my first post. I have always used this with no issues in the past though.

Here is the system monitor:

and the conky section:


Something is messed up.

What are you using to find the comparison? It looks like you have 16 GB of RAM, is this accurate?



RANDOM ACCESS MEMORY: ${mem}/${memmax}
${font PF Tempesta Five Condensed:pixelsize=11}${memperc}%${font SF Pro Text Regular:pixelsize=8}${goto 45} ${color c1c1c1}${membar 5,410}${color c1c1c1}

There’s also a lot of activity on your HDD/SSD drive as well. Do you have something running in the background?

Not really. Nothing at all.

That’s your conky for finding RAM total against usage. But, what I’m asking, and not very well it seems, are you using to find the actual RAM usage to compare to your conky output?

I get ya. This ‘free -m’ shows the correct RAM usage in the terminal as well as Mate System Monitor confirms that output.

The Conky is reporting the incorrect usage by almost exactly 3x.

It’s like Conky is reporting it back to front.

Maybe try this to see what happens:

${color0}RAM: $color$memperc%$alignr$mem${color0}/${color}$memmax

Where the title RAM is you can substitute for what you want…

Same result.

Do a restart of your conky; usually in a terminal you can use:

pkill -x -SIGUSR1 conky

You have a lot of info going on there, I’m wondering if conky just froze up, or maybe just the memory. Are the other graphs/values changing?

Edit - should have restarted when you made the other changes … so no difference?

All the other values seem to be accurate and are changing. Its just the Memory output that is totally whacko.

Make a test of conky for memory only; use your current config, but without the graph:

RANDOM ACCESS MEMORY: ${mem}/${memmax}
${font PF Tempesta Five Condensed:pixelsize=11}${memperc}%

Run that with no other conky or applications going. If it comes back way high (check against htop), I’d say conky itself is broken.

What I did was reboot and now it is reporting correctly. I had made a huge number of changes to the conky, maybe that was causing an issue?

Also I was restarting conky everytime I saved my config.

I’m coming to the same conclusion. Just comment out everything else. Conky had this issue before after major Linux kernel upgrade. I wonder if this again the same situation…

I think it is actually due to me editing the conky config via Code and saving the config numerous times. The reboot fixed it.

That’s peculiar, because I have made changes to my configs and didn’t run into that. But am glad it’s working okay now. Maybe just a hiccup? I have had my conky freeze on me before out of the blue, then I killed conky and restarted and it would work just fine. Maybe same for that one line of code got stuck…