Announcement

Collapse
No announcement yet.

Conky is slowly updating the info

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Conky is slowly updating the info

    I really don't know what I did wrong: I just put some pieces of code to make conky display what I want.
    Here's the code of my conky setup:
    Code:
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_hints undecorated,below,skip_taskbar
    own_window_type normal
    own_window_colour brown
    own_window_transparent yes
    own_window_argb_visual yes
    
    background no
    maximum_width 250
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer right
    
    # Update interval in seconds
    update_interval 1
    
    # Minimum size of text area
    minimum_size 450 2
    
    # Draw shades?
    draw_shades yes
    
    
    draw_borders no
    # Stippled borders?
    #stippled_borders 8
    # window.border_inner_margin 4
    border_width 10
    
    
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color white
    default_shade_color black
    default_outline_color white
    
    
    
    # Text alignment, other possible values are commented
    #alignment top_right
    alignment top_left
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 0
    gap_y 10
    
    # Text stuff
    draw_outline no # amplifies text if yes
    uppercase no # set to yes if you want all text to be in uppercase
    override_utf8_locale yes
    use_xft yes
    xftfont Terminus:size=9
    #xftfont Sans:size=8
    xftalpha 0.8
    
    text_buffer_size 3000
    
    ########## BEGIN FORMATTED DISPLAY ##########
    TEXT
    ${font :size=8}${color white}${alignc}${execi 6000 hostname}${font}${color }
    ${font :size=8}${alignc}${color #93E0E3}Linux kernel: $kernel${font}${color }
    ${hr 1}
    ${color #93E0E3}UpTime: ${alignr}${color #93E0E3}$uptime${color }
    
    ${font StyleBats:size=17}k${font Terminus:size=12} CPU ${font}${hr 2}
    
    ${color #72D5A3}CPU1:${color } ${cpu cpu1}%${alignr}${color #72D5A3}CPU2:${color }${cpu cpu2}%
    ${cpugraph cpu1 10,100 72D5A3 72D5A3}${alignr}${cpugraph cpu2 10,100 72D5A3 72D5A3}
    
    ${color #72D5A3}Processes:${color }${alignr}$processes
    ${color #72D5A3}Running:${color }${alignr}$running_processes
    ${color #72D5A3}CPU Temp:${color }${alignr}${acpitemp}°C
    ${color #72D5A3}HDrive Temp:${color }${alignr}${exec hddtemp -n /dev/sda}°C
    
    ${font StyleBats:size=17}M${font Terminus:size=12} MEMORY ${font}${hr 2}
    
    ${color 94BFF3}RAM: $mem${alignr}${membar 5,100}
    ${color 94BFF3}SWAP: $swap${alignr}${swapbar 5,100}
    ${color 94BFF3}ROOT: $fs_used${alignr}${fs_bar 5,100 /}
    
    ${color ffffff}${font StyleBats:size=17}Q${font Terminus:size=12} WEATHER ${font}${hr 2}
    ${if_match $updates >= 10}\
    ${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=924943&u=c" -o ~/.cache/weather.xml} 
    Location $alignr${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} 
    Temperature $alignr${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°C 
    Weather $alignr${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} 
    Wind $alignr${execi 300 grep "yweather:wind" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${execi 300 grep "yweather:units" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} 
    Humidity $alignr${execi 300 grep "yweather:atmosphere" ~/.cache/weather.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}% 
    
    ${color #DCA3A3}Sunrise $alignr${execi 900 grep "yweather:astronomy" ~/.cache/weather.xml | grep -o "sunrise=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
    ${color #F0DFAF}Sunset $alignr${execi 900 grep "yweather:astronomy" ~/.cache/weather.xml | grep -o "sunset=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
    
    ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'} $alignr${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'} ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}-${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°C 
    ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'} $alignr${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'} ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}-${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°C 
    ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'} $alignr${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'} ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}-${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°C 
    ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'} $alignr${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'} ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}-${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°C 
    ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'} $alignr${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'} ${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}-${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°C 
    $endif
    ${color ffffff}${font StyleBats:size=17}5${font Terminus:size=12} NETWORK ${font}${hr 2} 
    ${if_existing /sys/class/net/eth0/operstate up}${color #EC93D3} IP (eth0): 
    ${alignr}${color }${execi 60 LANG=en_US; /sbin/ifconfig eth0 | grep "inet addr:" | cut -d : -f 2 | awk '{print $1}'}
    ${color #EC93D3} UP: ${color }${upspeed eth0}${alignr}${color #EC93D3} DOWN: ${color }${downspeed eth0}
    ${upspeedgraph eth0 10,100 EC93D3 EC93D3}${alignr}${downspeedgraph eth0 10,100 EC93D3 EC93D3}
    ${else}
    ${if_existing /sys/class/net/wlan0/operstate up}${color #EC93D3} IP (wlan0): ${alignr}${color }${execi 60 LANG=en_US; /sbin/ifconfig wlan0 | grep "inet addr:" | cut -d : -f 2 | awk '{print $1}'}
    
    ${color #EC93D3}UP: ${color }${upspeed wlan0}${alignr}${color #EC93D3}DOWN: ${color }${downspeed wlan0}
    ${upspeedgraph wlan0 10,100 EC93D3 EC93D3} ${alignr}${downspeedgraph wlan0 10,100 EC93D3 EC93D3}
    ${endif}
    Now, the conky won't update quite fast, and numbers overlap each other:
    Click image for larger version

Name:	Selection_002.png
Views:	1
Size:	50.4 KB
ID:	648737

    Please, advise me what to do.
    Thx

    #2
    hear is mine ,,,,,,,,I am to tired right now to go thrugh them both and look for misalignment

    VINNY




    Code:
     background no
     use_xft yes
    xftfont Ubuntu Mono:size=9
    update_interval 3.0
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_argb_visual true
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 220 5
    maximum_width 220
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color gray
    #default_shade_color black
    alignment top_right
    gap_x 12
    gap_y 35
    cpu_avg_samples 2
    override_utf8_locale yes
    uppercase yes # set to yes if you want all text to be in uppercase
    
    TEXT
    ${color gray}SYSTEM ${hr 1}${color}
    
    Hostname: $alignr$nodename
    Kernel: $alignr$kernel
    Release: $alignr${pre_exec lsb_release -rs | awk '{print $1}'}
    Codename: $alignr${pre_exec lsb_release -cs | awk '{print $1}'}
    Desktop: ${alignr}KDE ${pre_exec kde4-config --version | grep KDE | awk '{print $4}'}
    Uptime: $alignr$uptime
    #Temperatures: ${alignr}GPU ${intel temp}°C
    #${alignr}Core0 ${execi 5 sensors | grep "Core 0" | awk '{print $3}' | cut -c2-3}°C
    ${color 0538ab}Avgerage: ${execi 8 sensors | grep -A 0 'temp1' | cut -c14-19 | sed '/^$/d'}°C $alignr${execi 8 sensors -f | grep -A 0 'temp1' | cut -c14-19 | sed '/^$/d'}°F${color}
    Core 1  : ${execi 8 sensors | grep -A 0 'Core 0' | cut -c14-19 | sed '/^$/d'}°C $alignr${execi 8 sensors -f | grep -A 0 'Core 0' | cut -c14-19 | sed '/^$/d'}°F
    Core 2  : ${execi 8 sensors | grep -A 0 'Core 2' | cut -c14-19 | sed '/^$/d'}°C $alignr${execi 8 sensors -f | grep -A 0 'Core 2' | cut -c14-19 | sed '/^$/d'}°F
    
    CPU: ${alignr}${freq} MHz
    Processes: ${alignr}$processes ($running_processes running)
    Load: ${alignr}$loadavg
    
    CPU1 ${alignr}${cpu cpu1}%
    ${color 00af00}${cpubar 4 cpu1}${color}
    CPU2 ${alignr}${cpu cpu2}%
    ${color 00af00}${cpubar 4 cpu2}${color}
    CPU3 ${alignr}${cpu cpu3}%
    ${color 00af00}${cpubar 4 cpu3}${color}
    CPU4 ${alignr}${cpu cpu4}%
    ${color 00af00}${cpubar 4 cpu4}${color}
    
    Ram ${alignr}$mem / $memmax ($memperc%)
    ${color 00af00}${membar 4}${color}
    swap ${alignr}$swap / $swapmax ($swapperc%)
    ${color 00af00}${swapbar 4}${color}
    
    Highest CPU $alignr CPU% MEM%
    ${color 7e0f06}${top name 1}$alignr${top cpu 1}${top mem 1}${color}
    ${color d2d00a}${top name 2}$alignr${top cpu 2}${top mem 2}${color}
    ${color 0538ab}${top name 3}$alignr${top cpu 3}${top mem 3}${color}
    
    Highest MEM $alignr CPU% MEM%
    ${color 7e0f06}${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}${color}
    ${color d2d00a}${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}${color}
    ${color 0538ab}${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}${color}
    
    ${color gray}Filesystem ${hr 1}${color}
    
    Root: ${alignr}${fs_free /} / ${fs_size /}
    ${color 00af00}${fs_bar 4 /}${color}
    Disk: ${alignr}${fs_free /mnt/disk} / ${fs_size /mnt/disk}
    ${color 00af00}${fs_bar 4 /mnt/disk}${color}
    Disk1: ${alignr}${fs_free /mnt/disk1} / ${fs_size /mnt/disk1}
    ${color 00af00}${fs_bar 4 /mnt/disk1}${color}
    
    ${color gray}NETWORK ${hr 1}${color}
    
    Down ${downspeed wlan0} k/s ${alignr}Up ${upspeed wlan0} k/s
    ${downspeedgraph wlan0 25,107 0000ff 00ff00 scale -t -l}${alignr}${upspeedgraph wlan0 25,107 d0c40c 6b0853}
    Total ${totaldown wlan0} ${alignr}Total ${totalup wlan0}
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      hears a screen shot so you can see the result.



      VINNY
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #4
        Originally posted by Ksiencha View Post
        numbers overlap each other
        A common cause for this is that you have multiple instances of conky running on top of each other.

        you can check this by running "pgrep conky", if there are multiple processes you can kill all but one (or kill them all and then start conky)

        Comment


          #5
          Thank you, guys, really. I'm gonna do this all later, 'cause it's night here. I'll report tomorrow

          Comment


            #6
            @kubicle, thank you so much ))). Your solution worked. The output of pgrep conky gave me several processes, and I killed every process except the first one. I also removed startup file which I originally created in ~/.config/autostart/conky.desktop. So now there's only one instance of conky running on my desktop at startup (so it appears the startup file was created automatically?). However, I cannot figure out where's the startup file for the current conky process, I've looked into .kde/share/config/session list, but there's no conky file. I'd really like to know where is it hiding (lol).
            Anyway, I will mark the thread as solved, because my problem is solved now. Good luck, everyone

            Comment


              #7
              nice one Vinny!

              this problem is very common, on my home server anyway, almost always after login:
              killall conky; conky &
              K 14.4 64 AMD 955be3200MHz 8GB 1866Mhz 6TB Plex/samba.etc.+ Macbook Air 13".

              Comment


                #8
                Originally posted by Ksiencha View Post
                However, I cannot figure out where's the startup file for the current conky process, I've looked into .kde/share/config/session list, but there's no conky file. I'd really like to know where is it hiding (lol).
                I have sessions disabled, so I'm not 100% certain, but IIRC sessions are stored in ~/.kde/share/config/ksmserverrc (and ~/.kde/share/config/session/ only holds the state files for individual applications in a session).

                You can run the following to test whether conky is started by ksmserver when it restores a session:
                grep conky ~/.kde/share/config/ksmserverrc

                Comment


                  #9
                  Yep, it's there.

                  Code:
                  command1=conky
                  Thx

                  Would you mind give an answer to another question ( pretty please): how can I tweak conky start-up time then? so that it would appear faster after system is up. This question is being asked bacause I as you know now I have only ksmserverrc file for that and I don't know how to modify it.
                  Last edited by Ksiencha; Sep 06, 2014, 09:05 AM.

                  Comment


                    #10
                    Check System Settings > Startup and Shutdown > Autostart to see if Conky is shown as either a Desktop File or Script File. Also, check Session Management. If you have Restore previous session marked, and Conky was still running when you shutdown, that instance will be restarted and a new instance will be started.

                    Many here simply opt to start our PCs and Logon with Start with an empty session.
                    Using Kubuntu Linux since March 23, 2007
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Yay! Thank you I had Restore previous session checked and I saw Conky on shutdown. Changed it to Start with an empty session, and on Autostart added conky, now it starts right away.

                      P.S. Gru rocks! lol

                      Comment


                        #12


                        Happy to help when/where/as I can.
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment

                        Working...
                        X