You are not logged in.

#1 2012-12-01 15:52:26

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

Multiple eth0 Internal IPs revealed by Conky?

I stuck a toe into the Conky waters recently, and discovered a weirdness when listing my internal IP:

The pertinent section of my .conkyrc is this:

${else}${if_existing /proc/net/route eth0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 FFFFFF FFFFFF}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 FFFFFF FFFFFF}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup eth0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown eth0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   eth0 Local IP: ${alignr}${addr eth0}

Conky displays "192.168.0.126"

ifconfig says my internal IP is: "192.168.0.101" -- which I would deem "correct" based on how I set up the system

/proc/net/route eth0 reveals multiple "eth0" entries:

Iface    Destination    Gateway     Flags    RefCnt    Use    Metric    Mask        MTU    Window    IRTT                                                       
tun0    00000000    0550800A    0003    0    0    0    00000000    0    0    0                                                                               
eth0    00000000    0100A8C0    0003    0    0    202    00000000    0    0    0                                                                             
tun0    0150800A    0550800A    0007    0    0    0    FFFFFFFF    0    0    0                                                                               
tun0    0550800A    00000000    0005    0    0    0    FFFFFFFF    0    0    0                                                                               
eth0    CC711732    0100A8C0    0007    0    0    0    FFFFFFFF    0    0    0                                                                               
eth0    0000A8C0    00000000    0001    0    0    202    00FFFFFF    0    0    0

When I change "addr" to "addrs" in the .conkyrc, .101 is listed first, follow by a comma, then another IP that flows off the right edge of the conky window (I'm assuming it could be the .126 one)...

Why do I have multiple eth0's in /proc/net/route--and is there a cleaner way to list the .101 in conky without resorting to the 'addrs' option?


Hey, be nice...I'm new at this!

Offline

Board footer

Powered by FluxBB