conky lua kullanınca sürekli artan ram tüketimi

Başlatan fallofahero, 27 Şubat 2011 - 17:12:54

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

fallofahero

normal conky kullandığımda bir sıkıntı yok ama lua scripti kullanınca ram sürekli gıdım gıdım artıyor

kullandığım lua ile mi ilgili diye başka lua larda denedim luayı conkye yazınca ram anında artmaya başlıyor... bunun sebebi ne olabilir acaba?

kullandığım conkyrc:

update_interval 1
use_xft yes
xftfont segeo bold:size=8
alignment top_right
maximum_width 220
xftalpha 1
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
draw_shades yes
draw_outline yes
draw_borders no
draw_graph_borders no
stippled_borders 0
border_width 0
default_shade_color white
default_outline_color 111111
default_color f7f7f7
use_spacer none
no_buffers yes
uppercase no
color1 ffffff
gap_x 65
text_buffer_size 2048
lua_load ~/.scripts/arp-rings.lua
lua_draw_hook_pre ring_stats

TEXT
${downspeed eth0}${upspeed eth0}
${downspeedgraph eth0 32,100 f0f0f0 f0f0f0 126} ${alignr}${upspeedgraph eth0 32,100 f0f0f0 f0f0f0 32}
${color ff8c00}  ${totaldown eth0} ${totalup eth0}$color
${cpugraph 32,220 ffffff ffffff ffffff}
${color ff3333}${top name 1}${alignc}${top cpu 1}$color
${color ff8c99}${top name 2}${alignc}${top cpu 2}$color
${top name 3}${alignc}${top cpu 3}
${color ffffff}${cpu cpu0}% ${alignr}${cpu cpu1}%      $color             
${alignc}${color ff8c00}   ${exec sensors | grep "Core 0" | cut -c 13-18} °C        ${exec sensors | grep "Core 1" | cut -c 13-18} °C$color   
${alignc}      Core 0               Core 1   
${memgraph 32,220 ffffff ffffff ffffff}
${color ff3333}${top_mem name 1}${alignr}${top_mem mem_res 1}$color                       
${color ff8c99}${top_mem name 2}${alignr}${top_mem mem_res 2}$color$memperc%
${top_mem name 3}${alignr}${top_mem mem_res 3}                       
${top_mem name 4}${alignr}${top_mem mem_res 4}                       
${color ff8c00} ${hddtemp /dev/sda} °C ${hddtemp /dev/sdb} °C$color
${fs_free /home/ccc/yedek}${alignr}${fs_free /home}
${alignc}${uptime_short}
${color ff8c00}${execi 60 nvidia-settings -query GPUCoreTemp | perl -ne 'print $1 if /GPUCoreTemp.*?: (\d+)./;'} °C $color${alignr}${color ff8c00}${hwmon temp 1} °C$color 



lua dosyası

settings_table = {
{
name='fs_used_perc',
arg='/home/ccc/yedek',
max=100,
bg_colour=0x000000,
bg_alpha=0,
fg_colour=0xff0000,
fg_alpha=0.1,
x=57, y=690,
radius=33,
thickness=35,
angle=271
},
{
name='fs_used_perc',
arg='/home',
max=100,
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0xff0000,
fg_alpha=0.1,
x=178, y=690,
radius=33,
thickness=35,
angle=91
},
{

name='cpu',
arg='cpu0',
max=100,
bg_colour=0x000000,
bg_alpha=0.12,
fg_colour=0xffffff,
fg_alpha=0.2,
x=78, y=359,
radius=20,
thickness=10,
angle=270
},
{
name='cpu',
arg='cpu1',
max=100,
bg_colour=0x000000,
bg_alpha=0.12,
fg_colour=0xffffff,
fg_alpha=0.2,
x=152, y=359,
radius=20,
thickness=10,
angle=90
},
}

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(t, pt)
if conky_window==nil then return end
local w,h=conky_window.width,conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual,w,h)

cr=cairo_create(cs)

local xc,yc,ring_r,ring_w,angle=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

local angle_0=angle*(2*math.pi/360)-math.pi/2
local t_arc=t*2*math.pi

-- Draw background ring

cairo_arc(cr,xc,yc,ring_r,0,2*math.pi)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
cairo_set_line_width(cr,ring_w)
cairo_stroke(cr)

-- Draw indicator ring

cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)

cairo_destroy(cr)
cr = nil
end

function conky_cairo_cleanup()
cairo_surface_destroy(cs)
cs = nil
end

function conky_ring_stats()
local function setup_rings(pt)
local str=''
local value=0

str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)

value=tonumber(str)
pct=value/pt['max']

draw_ring(pct,pt)
end

-- Check that Conky has been running for at least 5s

local updates=conky_parse('${updates}')
update_num=tonumber(updates)

if update_num>5 then
for i in pairs(settings_table) do
setup_rings(settings_table[i])
end
end
end


bu da ekran görüntüsü


[IMG]http://i1091.photobucket.com/albums/i400/maksatmuhabbetolsun/conky.jpg[/img]     [IMG]http://i1091.photobucket.com/albums/i400/maksatmuhabbetolsun/conky2.jpg[/img]