Announcement

Collapse
No announcement yet.

Network in Conky

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

    Network in Conky

    I set up Conky, followed all the directions and rebooted and every thing works perfect, except the Network display. I'm not sure if I just didn't do something right or if it's because my internet is a tether from my cell phone. When setting up Conky, I checked and my ethernet is listed as "eth2", so in the Conky code I changed all the eth0 to eth2, then in Conky Manager, I set the network as eth2, but it doesn't show any thing in the network section. Did I do wrong when I changed the eth0 to eth2, or is it that it just won't read the network traffic coming from a cell phone? If it's the latter, then I'll go in and delete the Network title reference. I'm not going to spend a lot of time and effort getting this to work, however I would like for it to work, it's one of the reasons I installed Conky. But, I'm not going to start changing a bunch of settings, and wrecking my entire OS.

    #2
    This is my network section of my .conkyrc file.
    Code:
    ####################
    ##   NETWORKING   ##
    ####################
    ${alignc}${color Tan2}TX           NETWORKING           RX
    ${color}eth0: ${color 20a5e4}${upspeed eth0}$alignr${downspeed eth0}${color}:eth0
    ${color}eth1: ${color 20a5e4}${upspeed eth1}$alignr${downspeed eth1}${color}:eth1
    This on my laptop PC.

    What does ifconfig show as your network connection names?
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Here is my entire /etc/conky/conky.conf script. If you copy it make sure that word wrap doesn't split some of the lines. Every line below "TEXT" should start with a $ sign. If it doesn't, then it belongs to the line above.
      Code:
      #conky config
      #
      # Conky, a system monitor, based on torsmo
      #
      # Any original torsmo code is licensed under the BSD license
      #
      # All code written since the fork of torsmo is licensed under the GPL
      #
      # Please see COPYING for details
      #
      # Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
      # Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
      # All rights reserved.
      #
      # This program is free software: you can redistribute it and/or modify
      # it under the terms of the GNU General Public License as published by
      # the Free Software Foundation, either version 3 of the License, or
      # (at your option) any later version.
      #
      # This program is distributed in the hope that it will be useful,
      # but WITHOUT ANY WARRANTY; without even the implied warranty of
      # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      # GNU General Public License for more details.
      # You should have received a copy of the GNU General Public License
      # along with this program.  If not, see <http://www.gnu.org/licenses/>.
      #
      
      # Create own window instead of using desktop (required in nautilus)
      own_window yes
      own_window_transparent yes
      own_window_type normal
      own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
      own_window_argb_visual yes
      background no
      
      # Use double buffering (reduces flicker, may not work for everyone)
      double_buffer yes
      
      # fiddle with window
      use_spacer none
      use_xft yes
      xftfont Ubuntu:size=8
      xftalpha 0.8
      
      # Update interval in seconds
      update_interval 1.0
      
      # Draw shades?
      draw_shades no
      
      # Text stuff
      draw_outline no # amplifies text if yes
      draw_borders no
      
      uppercase no # set to yes if you want all text to be in uppercase
      
      # Stippled borders?
      stippled_borders 8
      
      # border margins
      border_inner_margin 20
      
      # border width
      border_width 1
      
      # Default colors and also border colors, grey90 == #e5e5e5
      default_color lightgrey
      default_shade_color black
      default_outline_color white
      
      
      # Text alignment, other possible values are commented
      alignment top_left
      alignment top_right
      #alignment bottom_left
      #alignment bottom_right
      
      # Gap between borders of screen and text
      gap_x 50
      gap_y 5
      
      # stuff after 'TEXT' will be formatted on screen
      
      override_utf8_locale no
      
      TEXT
      $color ${font nimbus mono L:size=10}${execpi 60 DJS=`date +%-d`; cal -h | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color blue}'"$DJS"'$color'/}
      ${color #F80043}Hostname:   ${color}$nodename
      ${color #F80043}System:     ${color }${exec lsb_release -d |  awk '{print $2,$3,$4}'}
      ${color #F80043}Uptime:     ${color }$uptime
      ${color #F80043}CPU Temp:   ${color }${hwmon temp 1} Celcius
      ${color #F80043}CPU Usage:  ${color }${cpu cpu0}%
      ${cpugraph 20,130 000000 ffffff}
      ${color #F80043}Load:       ${color }$loadavg
      ${color #F80043}Processes:  ${color }$processes  
      ${color #F80043}Running:    ${color }$running_processes
      
      ${color #F80043}Highest CPU (%):
      ${color #ddaa00} ${top name 1}${top cpu 1}
      ${color } ${top name 2}${top cpu 2}
      ${color } ${top name 3}${top cpu 3}
      ${color } ${top name 4}${top cpu 4}
      
      ${color #F80043}Highest MEM (%):
      ${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
      ${color } ${top_mem name 2}${top_mem mem 2}
      ${color } ${top_mem name 3}${top_mem mem 3}
      ${color } ${top_mem name 4}${top_mem mem 4}
      
      ${color #F80043}MEM:  ${color }$memperc% ($mem/$memmax)
      ${color white}${membar 5,150}
      ${color #F80043}SWAP: ${color }$swapperc% ($swap/$swapmax)
      ${color white}${swapbar 5,150}
      ${color #F80043}ROOT: ${color }${fs_free_perc /}% (${fs_free /}/${fs_size /})
      ${color white}${fs_bar 5,150 /}
      ${color #F80043}HOME: ${color }${fs_free_perc /home}% (${fs_free /home}/${fs_size /home})
      ${color white}${fs_bar 5,150 /home}
      
      ${color #F80043}NET: 
      ${if_existing /sys/class/net/eth0/operstate up}${color #F80043} IP (eth0): 
      ${color }${execi 60 LANG=en_US; /sbin/ifconfig eth0 | grep "inet addr:" | cut -d : -f 2 | awk '{print $1}'}
      ${color #F80043} Upload: ${color }${upspeed eth0}/s
      ${upspeedgraph eth0 20,150 000000 ffffff}
      ${color #F80043} Download: ${color }${downspeed eth0}/s
      ${downspeedgraph eth0 40,150 000000 ffffff}
      ${else}
      ${if_existing /sys/class/net/wlan0/operstate up}${color #F80043} IP (wlan0): ${color }${execi 60 LANG=en_US; /sbin/ifconfig wlan0 | grep "inet addr:" | cut -d : -f 2 | awk '{print $1}'}
      ${color #F80043} Upload: ${color }${upspeed wlan0}/s
      ${upspeedgraph wlan0 20,150 000000 ffffff}
      ${color #F80043} Download: ${color }${downspeed wlan0}/s
      ${downspeedgraph wlan0 40,150 000000 ffffff}
      ${endif}
      ${endif}
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        I like your use of the {if}{endif} in your networking section. More elegant than mine, which shows both eth0 and eth1 lines, but of course, only shows the traffic on the active connection. I've incorporated the if/endif into mine.

        Thank you!
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Here's my conky conf also. I'm eth0 so change accordingly. Watch for line wraps.
          Code:
          background yes
          use_xft yes
          xftfont Sans:size=8
          xftalpha 1
          update_interval 5.0
          total_run_times 0
          own_window yes
          own_window_transparent no
          own_window_type normal
          own_window_argb_visual yes
          own_window_argb_value 120
          own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
          double_buffer yes
          minimum_size 200 200
          maximum_width 210
          draw_shades yes
          draw_outline no
          draw_borders no
          draw_graph_borders yes
          default_color white
          default_shade_color black
          default_outline_color white
          alignment top_right
          gap_x 12
          gap_y 42
          no_buffers yes
          uppercase no
          cpu_avg_samples 2
          override_utf8_locale no
          
          #template0 (disks)
          template0 ${color 90DDC0}${font sans-serif:normal:size=8}\1 ${color gray}$alignc ${fs_used \2} / ${fs_size \2} ${color white}$alignr ${fs_used_perc \2}%
          
          TEXT
          ${color FFFFFF}${font sans-serif:bold:size=8}SYSTEM ${color 8888FF}${hr 2}
          ${color gray}${font sans-serif:normal:size=8}$sysname $kernel $alignr ${color 90DDC0}$machine
          ${color gray}Host:${color 90DDC0}$alignr$nodename
          ${color gray}Uptime:${color 90DDC0}$alignr$uptime_short
          ${color gray}File System: ${color 90DDC0}$alignr${fs_type}
          ${color gray}Load: ${color 90DDC0}${alignr}${loadavg 1}, ${loadavg 2}, ${loadavg 3}
          
          ${color FFFFFF}${font sans-serif:bold:size=8}PROCESSOR ${color 8888FF}${hr 2}
          ${color 90DDC0}Processes: ${color gray}$processes ${alignr}${color 90DDC0}Running: ${color gray}$running_processes
          ${cpugraph cpu1 26,100 000000 ff6600 -t} ${offset 10}${cpugraph cpu2 26,100 000000 cc0033 -t}
          ${color #ff6600}${cpubar cpu1 3,100} ${offset 10}${color #cc0033}${cpubar cpu2 3,100}$color
          
          ${color FFFFFF}${font sans-serif:bold:size=8}VIDEO ${color 8888FF}${hr 2}
          ${color 90DDC0}${font sans-serif:normal:size=8}NVidia GeForce GPU ${color FFFFFF}$alignr ${nvidia gpufreq} Mhz
          ${color 90DDC0}${font sans-serif:normal:size=8}NVidia Memory ${color FFFFFF}$alignr ${nvidia memfreq} Mhz
          ${color 90DDC0}${font sans-serif:normal:size=8}GPU Temperature ${color FEF606}$alignr ${nvidia temp} C
          ${color 90DDC0}${font sans-serif:normal:size=8}GPU Temperature Threshold${color FFFFFF}$alignr ${nvidia threshold} C
          
          ${color FFFFFF}${font sans-serif:bold:size=8}MEMORY ${color 8888FF}${hr 2}
          ${color 90DDC0}${font sans-serif:normal:size=8}RAM ${color gray}$alignc $mem / $memmax ${color FFFFFF}$alignr $memperc%
          ${color 80E0A0}$membar
          ${color 90DDC0}${font sans-serif:normal:size=8}SWAP ${color gray}$alignc $swap / $swapmax ${color FFFFFF}$alignr $swapperc%
          ${color 80E0A0}$swapbar
          
          ${color FFFFFF}${font sans-serif:bold:size=8}DISKS ${color 8888FF}${hr 2}
          ${template0 sda1 /}
          ${color 80E0A0}${fs_bar /}
          ${template0 sdb1 /media/multimedia}
          ${color 80E0A0}${fs_bar /media/multimedia}
          ${template0 sdc1 /media/backup01}
          ${color 80E0A0}${fs_bar /media/backup01}
          
          ${color FFFFFF}${font sans-serif:bold:size=8}TOP PROCESSES ${color 8888FF}${hr 2}
          ${color gray}${font sans-serif:normal:size=8}${top name 1}${color 90DDC0}${alignr}${top cpu 1} %
          ${color gray}${top name 2}${color 90DDC0}${alignr}${top cpu 2} %
          ${color gray}$font${top name 3}${color 90DDC0}${alignr}${top cpu 3} %
          ${color gray}$font${top name 4}${color 90DDC0}${alignr}${top cpu 4} %
          ${color gray}$font${top name 5}${color 90DDC0}${alignr}${top cpu 5} %
          
          ${color FFFFFF}${font sans-serif:bold:size=8}NETWORK ${color 8888FF}${hr 2}
          ${color gray}${font sans-serif:normal:size=8}IP address: ${color 90DDC0}$alignr ${addr eth0}
          ${color gray}Download:${color 90DDC0}${downspeedf eth0} kB/s${alignr}${color gray}Upload:${color 90DDC0}${upspeedf eth0} kB/s
          ${color gray}${downspeedgraph eth0 26,100 000000 009933 -t} ${offset 10}${color gray}${upspeedgraph eth0 26,100 000000 0000FF -t}
          ${color gray}Total Down:${color 90DDC0}${totaldown eth0} ${alignr}${color gray}Total Up:${color 90DDC0}${totalup eth0}
          ${color 90DDC0}Inbound: ${color gray}${tcp_portmon 1 32767 count}${alignc -36}${color 90DDC0}Outbound: ${color gray}${tcp_portmon 32768 61000 count}${alignr}${color 90DDC0}Total: ${color gray}${tcp_portmon 1 65535 count}
          ${color 90DDC0}Inbound Connection ${alignr} Local Service/Port${color gray}
           ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
           ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
           ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
           ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
           ${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
           ${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
          ${color 90DDC0}Outbound Connection ${alignr} Remote Service/Port${color gray}
           ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
           ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
           ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
           ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
           ${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
           ${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
          sigpic

          Comment


            #6
            thanks to Snowhog, he is wonderful, he always has the answer I need, I ran the ifconfig, and saw automatically, it's actually listed as usb0.

            robby@robby-Aspire-5734Z:~$ ifconfig
            eth0 Link encap:Ethernet HWaddr 88:ae:1d:1d:f4:b1
            UP BROADCAST MULTICAST MTU:1500 Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

            lo Link encap:Local Loopback
            inet addr:127.0.0.1 Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING MTU:65536 Metric:1
            RX packets:16276 errors:0 dropped:0 overruns:0 frame:0
            TX packets:16276 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:1341803 (1.3 MB) TX bytes:1341803 (1.3 MB)

            usb0 Link encap:Ethernet HWaddr e6:14:e4:be:ec:69
            inet addr:192.168.42.216 Bcast:192.168.42.255 Mask:255.255.255.0
            inet6 addr: fe80::e414:e4ff:febe:ec69/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
            RX packets:17294 errors:0 dropped:0 overruns:0 frame:0
            TX packets:10923 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:23624009 (23.6 MB) TX bytes:1346791 (1.3 MB)

            wlan0 Link encap:Ethernet HWaddr c4:46:19:49:f7:66
            UP BROADCAST MULTICAST MTU:1500 Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

            I will eventually learn these terminal commands that show what you need to know, until then, I'll be bugging all of you. lol

            Comment

            Working...
            X