Sponsored Content
Operating Systems Solaris How to retrieve network link status from Kernel? Post 302387818 by mrmurdock on Monday 18th of January 2010 11:09:48 AM
Old 01-18-2010
How to retrieve network link status from Kernel?

I have need for a reliable and easy way to get from within a script, or a java class, the status of the network interface cards (whether the link is up, or down).
I believe the kernel status would be quicker to know if they were up or down rather than if a ping simply didnt respond back.
My brain lately has been on hold and need some ideas and mabye code sample. Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Network Status

Hi, My system ( Solaris 2.6, Entrerprise 250 ) shows lot of connections in TIME_WAIT status against service localhost.8007 and localhost.45221 What are these services and where can I get the cross references. I have checked up in /etc/services and there is no such entry. Infact... (5 Replies)
Discussion started by: shibz
5 Replies

2. Shell Programming and Scripting

Multiple Network Card Status Script

I have multiple Sun Solaris 8 systems running multiple network cards. (Mix of quad and gig cards.) What I would like to do is create a monitor script to ensure high availability of these cards. Has anyone ever had a situation like this? I was thinking of using the ping command, but am... (1 Reply)
Discussion started by: Krusty
1 Replies

3. UNIX for Advanced & Expert Users

Speed of network link

Sorry to keep bothering you guys like this with all these boring, related questions. But here's one that should be more readily answerable. What command or file should i use to get the speed/data rate of a network link? This is the capacity speed for instance 10Mbps or 100 Mbps in the case of the... (2 Replies)
Discussion started by: mint1981
2 Replies

4. Solaris

HOW-TO Retrieve all network interfaces??!

Yes. But just wait a bit. How to do it via system calls? I'm just a newbie in Unix\Linux\Solaris e.t.c. programming. Can anyone help me? I need an advice probably how to do it or may be what API to read... :) Please, help... (2 Replies)
Discussion started by: LocalStorm
2 Replies

5. Solaris

Link status turning up and down continously

Hi All, Happy New Year. I have a weird situation in one of my servers.The OS is solaris 10 We don't have bcme1 interface configured/plumbed on that system but every 5 second i get this message in /var/adm/messages Jan 4 20:22:45 XXXX bcme: NOTICE: bcme1 : Link is Up (1000Mbps, Full... (3 Replies)
Discussion started by: Jartan
3 Replies

6. Red Hat

RHEL4 on VM cannot get status network link down

Hi All, RHEL4 on VM cannot get status network link down. when I unplug network cable. - ESX found interface down - but VM RHEL4 not detect that !, It show still up (mii-tool) Please help share you idea for my case. ESXi 5.1.0, RHEL4 Thank you, (3 Replies)
Discussion started by: arm_naja
3 Replies

7. Shell Programming and Scripting

Network script for ping status

Actually I am using Red hat Linux 4.4 version. I want to check the 16 client pc status of connection from server.Whether the connection is available or not.I tried to develop the shell script for this code.But It don't work properly.I am a self study learner.Please give me a shell script for this... (9 Replies)
Discussion started by: kannansoft1985
9 Replies

8. Solaris

Link aggregation and status of network interfaces in “ipadm” command

I am again rephrasing the issue that we are facing: We are creating link aggregations with two interfaces named net0 & net5: # dladm create-aggr -m dlmp -l net0 -l net5 -l net2 aggr1 Setting prob targets for aggr1: # dladm set-linkprop -p probe-ip=+ aggr1 Setting failure detection... (3 Replies)
Discussion started by: amitanshu.verma
3 Replies
ifplugstatus(8) 					      System Manager's Manual						   ifplugstatus(8)

NAME
ifplugstatus - A link beat detection tool SYNOPSIS
ifplugstatus [options] [INTERFACE] DESCRIPTION
ifplugstatus is an utility which may be used to detect the link status of a local Linux ethernet device, much in the same way mii-diag, mii-tool and ethtool work. In fact it supports all three different APIs these three tools use. In addition it supports link checking with the IFF_RUNNING interface flag, which most modern drivers (not only ethernet) support, and association status checking with the wireless extension API for WLAN devices. The APIs are tried in the following order: First the newest API: SIOCETHTOOL (aka ethtool API) Second the next older API: SIOCGMIIREG (aka mii-diag API) Than the WLAN API: wireless extension (aka iwconfig API) Followed by the cleanest API: IFF_RUNNING (aka ifconfig API) The oldest API (SIOCPRIV aka mii-tool API) is not tested since it is obsolete. ifplugstatus may be used in shell script since it returns the current status as return value. It is especially useful to detect the avail- able APIs on the used network driver. (Option -v) OPTIONS
You may specify an ethernet device on the command line. Otherwise ifplugstatus will check all available network interfaces. -a | --auto Enable interface automatically before querying (default: off) -h | --help Show help -q | --quiet Decrease verbosity by one. If the verbosity is < 0, no text will be shown, only the return value is relevant; if the verbosity is = 0, a terse status will be shown; If the verbosity is > 0, detailed information about the used API is returned. (By default the ver- bosity is 0) -v | --verbose Increase verbosity by one. See option -q. -V | --version Show version RETURN VALUES
0 Success 1 Failure 2 Link beat detected (only available when an interface is specified) 3 Unplugged (same here) AUTHOR
ifplugd was written by Lennart Poettering <mzvscyhtq (at) 0pointer (dot) de>. ifplugd is available at http://0pointer.de/lennart/projects/ifplugd/ SEE ALSO
mii-diag(8), mii-tool(8), ethtool(8), ifplugd(8) COMMENTS
This man page was written using xml2man(1) by Oliver Kurth. Manuals User ifplugstatus(8)
All times are GMT -4. The time now is 11:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy