Networking Forums

Networking Forums > Computer Networking > Linux Networking > device connected

Reply
Thread Tools Display Modes

device connected

 
 
Michael Lodman
Guest
Posts: n/a

 
      05-21-2004, 03:03 AM
Is there a way in say the /proc filesystem to tell if the ethernet media is
actually connected or not? I understand how to tell if the device is there
or no.
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      05-21-2004, 06:53 AM
In comp.os.linux.networking Michael Lodman
<(E-Mail Removed)> wrote:
> Is there a way in say the /proc filesystem to tell if the ethernet
> media is actually connected or not? I understand how to tell if the
> device is there or no.


You can use mii-tool and grep to prevent network services starting (dhcp
on a laptop is a pain on boot otherwise).

mii-tool eth0 | grep -q 'link ok' && dhclient

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Damion de Soto
Guest
Posts: n/a

 
      05-21-2004, 07:29 AM
Hi Michael,
> Is there a way in say the /proc filesystem to tell if the ethernet media is
> actually connected or not? I understand how to tell if the device is there
> or no.

Whether or not a cable is connected is information available from the ethernet card's
MII PHY. Depending on the card, this info is available to the linux driver, and you
can usually see it reported in the kernel logs. I have never seen any ethernet
driver implement it under a /proc entry, although it's not impossible.
There are also some user-space tools you may find of interest: mii-diag, mii-tool and
eth-tool, which talk to the mii via ioctls to the ethernet driver.

regards,

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer email: (E-Mail Removed)
SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809
| Custom Embedded Solutions fax: +61 7 3891 3630
| and Security Appliances web: http://www.snapgear.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
--- Free Embedded Linux Distro at http://www.snapgear.org ---
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vonage device connected; now XP network dont work, why? JoeDontKnow Windows Networking 3 05-12-2008 03:58 PM
SSH, remote device connected via 3G Jer Linux Networking 2 03-28-2008 03:35 PM
USB Device Problems when USB Wireless Network Connected amber.husband@gmail.com Wireless Internet 10 11-17-2006 03:17 PM
device does not appear, though connected Daniel CLEMENT Wireless Internet 0 08-10-2005 07:50 AM
remote access to network w/ TCP/IP device connected Randy Broadband Hardware 1 11-10-2004 03:04 PM



1 2 3 4 5 6 7 8 9 10 11