Kada u Terminalu idem komandom
Kod: Označi sve
free -m

Na 58% RAM memorije računalo je počelo usporavati.
System Settings:
https://dpaste.com/4VNLMA6K8

Nakon što restartam računalo ili Conky, računalo radi u redu i RAM memorija je između 15 i 20%.
Moderator/ica: Moderatori/ce
Kod: Označi sve
free -m
A što reči.
Na 16 GB RAM-a ti ne treba Swap. Ja imam 8 GB RAM-a i 0 GB Swapa i nikakvih problema.
Conky koristim već nekih 8 do 9 mjeseci, a ovi problemi s RAM-om su se pojavili nedavno. Sve radi u redu do 58% zauzetosti RAM memorije. Postoji li neki način za istražiti uzrok? Ako da, kako?
I've seen some idiots back in my time, but you man... you're special!Vl@do je napisao/la:Arch imaš upravo zato da uštediš na vremenu. Nemaš nikakvih problema s instalacijama, kompajliranjem i ostalim. Imaš jednostavno funkcionalan i stabilan, uvijek najsvježiji OS, a osim toga je sexy i cool do neba.
Isključio sam neki set Conky widgeta i već oko 4 sata radi solidnije. Eksperimentirat ću neko vrijeme i vidjeti koji Conky widget stvara probleme.Cooleech je napisao/la: ↑06 svi 2025, 14:38 Punjenje RAM-a, bez nekog valjanog razloga, obično je uzrokovano "curenjem" memorije, dakle, možda taj Conky ili neki od ostalih điđa-miđa ne radi kako bi trebao i to dovodi do nepotrebnog zapunjavanja RAM-a. Nešto pametnije od toga ne mogu ti reći osim da provjeriš u System Monitoru koja ti aplikacija "jede" previše RAM-a.
Kod: Označi sve
conky.config = {
--
-- _____________________________________
-- HISTORY:
--
-- 10/25/16 - mattz - V1.0 original (for release)
-- 12/01/16 - mattz - V1.1 added stockticker, misc improvements
-- 01/18/17 - mattz - V2.1 added 'analog' gauges
-- 07/22/17 - mattz - V2.2 added alarms for gauges
-- 07/07/24 - zcot - V2.3 the butcher
--
-- _____________________________________
-- NOTES:
--
-- colors chart...
-- http://www.graphviz.org/doc/info/colors.html
-- or...
-- cat /usr/share/X11/rgb.txt
--
-- Gauges:
-- syntax: label(no.spaces) unit measure(or conky_parse) max(value) warn(value) xr(rowpos) yc(columnpos)
-- unit is such as °C or % ... if none is desired (leave blank), enter 'nil' (no quotes)
-- if no warn indication is desired, make value of warn parameter equal value of max
-- _____________________________________
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
alignment = 'bottom_right',
background = false, -- set to yes if you want Conky to be forked in the background
border_width = 1,
-- --- change colors as needed ---
color1 = 'skyblue4', -- text/data
color2 = 'dodgerblue3', -- labels
color3 = '1874cd', -- highlights
color4 = 'gray10', -- bar charts
color5 = 'gray17', -- graph borders
color6 = 'yellow1', -- warning (hi cpu temp)
color7 = 'green3', -- stock ticker "up"
color8 = 'red3', -- stock ticker "down"
-- -------------------------------
cpu_avg_samples = 1,
default_color = 'white',
default_gauge_width = 25,
default_gauge_height = 25,
default_graph_width = 0,
default_graph_height = 25,
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
extra_newline = false,
font = 'Droid Sans:size=14',
gap_x = 10,
gap_y = 50,
maximum_width = 555,
minimum_width = 555,
minimum_height = 190,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
own_window = true,
own_window_class = 'Conky',
own_window_colour = '000000',
own_window_argb_visual = true,
own_window_argb_value = 40,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_transparent = true, -- should be set to no
own_window_type = 'normal', -- if enabled, does not move according to taskbar height
out_to_console = false,
-- pad_percents = 2, -- use_spacer must be enabled (not using, throws off other numbers)
short_units = true,
show_graph_scale = false,
show_graph_range = false,
stippled_borders = 0,
temperature_unit = 'celsius',
cpu_avg_samples = 10,
update_interval = 0.1,
net_avg_samples = 1,
uppercase = false,
use_spacer = 'none', -- right, left , none
use_xft = true,
-- --- Lua Load all ---
lua_load = './white4.lua',
-- --------------------
};
conky.text = [[
# ---------------------------
# ----- CPU % USE -----------
# ---------------------------
${lua conky_gauge CPU1 % ${cpu cpu1} 100 46 50}\
${lua conky_gauge CPU2 % ${cpu cpu2} 100 140 50}\
${lua conky_gauge CPU3 % ${cpu cpu3} 100 234 50}\
${lua conky_gauge CPU4 % ${cpu cpu4} 100 328 50}\
${lua conky_gauge CPU5 % ${cpu cpu5} 100 422 50}\
${lua conky_gauge CPU6 % ${cpu cpu6} 100 516 50}\
${lua conky_gauge CPU7 % ${cpu cpu7} 100 46 152}\
${lua conky_gauge CPU8 % ${cpu cpu8} 100 140 152}\
${lua conky_gauge CPU9 % ${cpu cpu9} 100 234 152}\
${lua conky_gauge CPU10 % ${cpu cpu10} 100 328 152}\
${lua conky_gauge CPU11 % ${cpu cpu11} 100 422 152}\
${lua conky_gauge CPU12 % ${cpu cpu12} 100 516 152}\
]]
Kod: Označi sve
--[[
lua script to...
- draw 'analog' gauges
--------------------------------------------------
Acknowledgments... -------------------------------
--- analog clock & rings ---
based on code from...
Clock Rings by Linux Mint (2011) reEdited by despot77
--------------------------------------------------
Notes: -------------------------------------------
- To call this script in Conky, add the following lines in conky.rc (above TEXT):
lua_load = 'gauge2.lua',
]]
---------------------------------------
----- main setup & initialization -----
---------------------------------------
require 'cairo'
----------------------------------------------------
------- functions ----------------------------------
----------------------------------------------------
-- ==================================================
function conky_gauge(p_label, p_unit, p_measure, p_max, p_xr, p_yc)
--[[ NOTES:
-- "label" is the label/name for this gauge
-- "measure" is the type of stat to display; you can choose from 'cpu', 'memperc'... in Conky you would write ${cpu cpu0}
-- "max" is the maximum value of gauge
-- "xr" & "yc" are the x/row y/col coordinates for center of gauge
-- for colors: regular rgb color prefixed with 0x as in 0x######
--]]
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
cairo_surface_destroy(cs)
--- items common to all rings ------------------
local bg_color = 0xffffff
local bg_alpha = 0.1
local ok_color = 0xffffff -- color for ok guide/arc --
local ok_alpha = 1.0
local needle_color = 0x93cdea -- color of indicator needle ---
local needle_alpha = 1.0
local label_color = 0x93cdea -- color of label --
local label_alpha = 1.0
local val_color = 0xffffff -- color of current value --
local val_alpha = 1.0
local bg_radius = 35 -- gauge background starts here --
local guide_radius = 0 -- guide is the colored line (showing ok zones) starts here --
local val_radius = 36 -- value indicator arc... generally between bg_radius & guide_radius --
local needle_radius = 10 -- bottom of needle rests here --
local bg_width = 8 -- width/thickness of background arc --
local guide_width = 0 -- width/thickness of guide arc --
local val_width = 8 -- width/thickness of value indicator arc --
local needle_width = 35 -- "length" of needle --
local needle_thickness = 2 -- thickness of needle for visibility --
local start_angle = -220 -- note: 0 is at "3 o'clock"... example: to start at top/12 o'clock use -90 --
local end_angle = 45
local angle_0 = (start_angle) * (math.pi / 180)
local angle_f = (end_angle) * (math.pi / 180)
local graduation_radius = 38 -- centered on the ring
local graduation_thickness = 8
local graduation_mark_thickness = 1 -- thickness of the mark
local graduation_unit_angle = 13.75 -- draw a mark every 27 degree
local graduation_fg_colour = 0xFFFFFF
local graduation_fg_alpha = 0.3
local font = "Droid Sans:bold"
local font_size = 14
local font_h = font_size -- normally same as font size, but adjust as needed --
local font_w = 7 -- adjust this for font used --
local font_slant = CAIRO_FONT_SLANT_NORMAL -- mono font does not have SLANT --
local font_face = CAIRO_FONT_WEIGHT_BOLD -- mono font does not have BOLD --
cairo_select_font_face(cr, font, font_slant, font_face)
cairo_set_font_size(cr, font_size)
--- --------------------------------------------
--- individual ring items ----------------------
local label = p_label
local unit = p_unit
if unit == "nil" then unit = "" end
local measure = p_measure
local max = p_max
local xr = p_xr
local yc = p_yc
local str = conky_parse(measure)
local value = tonumber(str)
local pct = value / max
local pct_needle = (value / max) - needle_thickness
local t_arc = pct * (angle_f - angle_0)
local t_arc_needle = pct_needle * (angle_f - angle_0)
-- ---------------------------------------------
--- draw background ring ---
cairo_arc(cr, xr, yc, bg_radius, angle_0, angle_f)
cairo_set_source_rgba(cr, rgb_to_r_g_b(bg_color, bg_alpha))
cairo_set_line_width(cr, bg_width)
cairo_stroke(cr)
-- Draw graduation marks
cairo_set_source_rgba(cr, rgb_to_r_g_b(graduation_fg_colour, graduation_fg_alpha))
cairo_set_line_width(cr, graduation_mark_thickness)
for angle = start_angle, end_angle, graduation_unit_angle do
local angle_rad = angle * (math.pi / 180)
local x1 = xr + (graduation_radius - graduation_thickness) * math.cos(angle_rad)
local y1 = yc + (graduation_radius - graduation_thickness) * math.sin(angle_rad)
local x2 = xr + graduation_radius * math.cos(angle_rad)
local y2 = yc + graduation_radius * math.sin(angle_rad)
cairo_move_to(cr, x1, y1)
cairo_line_to(cr, x2, y2)
cairo_stroke(cr)
end
--- draw OK area ring ---
cairo_arc(cr, xr, yc, guide_radius, angle_0, angle_0 + t_arc)
cairo_set_source_rgba(cr, rgb_to_r_g_b(ok_color, ok_alpha))
cairo_set_line_width(cr, guide_width)
cairo_stroke(cr)
--- draw value indicator ring ---
cairo_set_line_width(cr, val_width)
cairo_arc(cr, xr, yc, val_radius, angle_0, angle_0 + t_arc)
cairo_set_source_rgba(cr, rgb_to_r_g_b(ok_color, ok_alpha))
cairo_stroke(cr)
--- draw indicator needle ---
cairo_move_to(cr, xr, yc)
cairo_rel_line_to(cr, needle_width * math.cos(angle_0 + t_arc), needle_width * math.sin(angle_0 + t_arc))
cairo_set_line_width(cr, needle_thickness)
cairo_set_source_rgba(cr, rgb_to_r_g_b(needle_color, needle_alpha))
cairo_stroke(cr)
--- display label text ---
cairo_set_source_rgba(cr, rgb_to_r_g_b(label_color, label_alpha))
local text_label = label
if text_label == "!" then text_label = "" end --<< added by koentje, empty out textfield
text_label_pos = (string.len(text_label) * font_w) / 2
cairo_move_to(cr, xr - text_label_pos - 8, yc + 32) -- Moved label 24 pixels down
cairo_show_text(cr, text_label)
cairo_stroke(cr)
--- display value text ---
cairo_set_source_rgba(cr, rgb_to_r_g_b(val_color, val_alpha))
local text_value = value .. unit
text_value_pos = (string.len(text_value) * font_w) / 2
cairo_move_to(cr, xr - text_value_pos - 8, yc + font_h)
cairo_show_text(cr, text_value)
cairo_stroke(cr)
end
--- --------------------------------------------------------------
function rgb_to_r_g_b(color, alpha)
return ((color / 0x10000) % 0x100) / 255., ((color / 0x100) % 0x100) / 255., (color % 0x100) / 255., alpha
end
--- --------------------------------------------------------------
function conky_main()
if conky_window == nil then return end
conky_gauge("FREQ ", "GHz", "${freq_g 8}", "10.0", 625, 374)
end
--- --------------------------------------------------------------
Kod: Označi sve
...
cairo_move_to(cr, xr - text_value_pos - 8, yc + font_h)
cairo_show_text(cr, text_value)
cairo_stroke(cr)
cairo_destroy(cr)
end
--- --------------------------------------------------------------
function rgb_to_r_g_b(color, alpha)
return ((color / 0x10000) % 0x100) / 255., ((color / 0x100) % 0x100) / 255., (color % 0x100) / 255., alpha
end
--- --------------------------------------------------------------