- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: redhat network status unpluged
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 03:19 PM
02-20-2009 03:19 PM
im trying to find a command or a way to detect network fauilers on redhat es 5.
mii and ethtool are no use ethtool link status is always yes and its not even supported for my driver also the mii tool , also thers no ifplugd for the kernel 2.6 only working version is for 2.4.
the ifconfig always giv status up.
any ideas?
i noted that when ever the network is un pluged the avahi deamon starts to dump errors into the messages
but i need a more relaiable way for detecting the unpluged network
regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 05:32 AM
02-22-2009 05:32 AM
SolutionPick an IP address on the network at a location that means there is a network if it can be pinged.
ping -c 1 -W 30
rc=$?
if [ $rc -ne 0 ]
then
echo "No network!!!"
else
echo "Network up"
fi
The ping statement is 1 ping timeout 30 seconds.
The code has echo statements where you can place code and do notification of network failure.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2009 02:20 AM
02-23-2009 02:20 AM
Re: redhat network status unpluged
yeah i know this way but im looking for a way for linux to recognize an unpluged network card.
regards,
mohannad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2009 02:43 AM
02-23-2009 02:43 AM
Re: redhat network status unpluged
you can use "ethtool"
it gives (among other information):
Link detected: yes
rgds
HGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2009 02:50 AM
02-23-2009 02:50 AM
Re: redhat network status unpluged
My script provides the basis for the system knowing the network is disconnected.
Replacing the echo statement with what you want the system to do accomplishes the goal.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2009 03:21 AM
02-24-2009 03:21 AM
Re: redhat network status unpluged
We also have the HP NIC agents running so that when a network cable is unplugged an SNMP trap is sent to our monitoring system. This picks up if the link is down but as the traps are generated from the server you need network connectivity in order for the traps to reach their destination.
If you need more in-depth checking like errors or collisions (duplex mismatch, dodgy cable etc..) or that the routes are up youâ ll need something a bit more than the basic up/down type events above, really depends on what exactly youâ re after.