免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7217 | 回复: 5
打印 上一主题 下一主题

SUN网卡工作状态检测 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-02-22 23:05 |只看该作者 |倒序浏览
以前论坛讨论过,这个是从SUNSOLVE粘贴来的 INFODOC ID: 47729

Below are several methods, with examples, to check network link status of ethernet interfaces in Solaris.

-------------

checking messages:

Sep 18 11:51:08 server1 qfe: [ID 349649 kern.notice] NOTICE: SUNW,qfe0: No response from Ethernet network : Link Down - cable problem?

Oct 1 08:37:06 serrver2 unix: SUNW,hme0: 100 Mbps full-duplex Link Up

-------------

checking link status with ndd

# ndd -set /dev/qfe instance 0 (instance set to "0" checks qfe0 status; "1" for qfe1,etc...)
# ndd  /dev/qfe link_status
  1
  ( 1 -up, 0 = down )                        
--------------------

Checking link status for Gigaswift Ethernet(ce) is different from other Ethernet interfaces.  netstat
-k is used:

netstat -k ce0

link_up (1=up,0=down)                                               
-------------

checking with kstat (netstat -k)

# kstat qfe:0::link_up
module: qfe                             instance: 0
name:   qfe0                            class:    net
          link_up                         1

# kstat eri |grep link_up
link_up                         1

# netstat -k qfe0 |grep link_up
  ......  link_up 1                                                
note: kstat link_up was added by Bug 4167319 : Add additional useful driver kstat variables(hme,qfe, gem)

-------------

examining LED states

newer network interface adapters have light indicators.

on "qfe" quad fast ethernet and "ge" Sun Gigabit Ethernet 2.0 adapters:

   LED      Status         Description
--------------------------------------------------------------
LINK     Off            Port not connected or Link partner down
          Green Steady   Link detected & active                                                
on "ce" Gigaswift:
  --------------------------------------------------------------
LINK QUALITY  Purple   Gigabit link quality good
  PHY 1000X    Green     Link 1Gbit/s up
  PHY 100X     Green     Link 100Mbit/s up
  PHY 10X      Green     Link 10Mbit/s up                                                
-------------

checking with SNMP ( requires snmp Software)
./snmpwalk netlab11 public interfaces.ifTable

...
interfaces.ifTable.ifEntry.ifDescr.1 = lo0
interfaces.ifTable.ifEntry.ifDescr.2 = ce3
interfaces.ifTable.ifEntry.ifDescr.3 = hme0
interfaces.ifTable.ifEntry.ifDescr.4 = qfe0
...
interfaces.ifTable.ifEntry.ifOperStatus.1 = up(1)
interfaces.ifTable.ifEntry.ifOperStatus.2 = up(1)
interfaces.ifTable.ifEntry.ifOperStatus.3 = up(1)
interfaces.ifTable.ifEntry.ifOperStatus.4 = down(2)

-------------

examine Running flag in S9 gigaswift

ce3: flags=1000803<UP,BROADCAST,MULTICAST,IPv4>;
                                
ce3: flags=1000803<UP,BROADCAST,RUNNING,MULTICAST,IPv4>;
                                 ^^^^^^^

  Implemented as part of Solaris 9.
  IP will clear the RUNNING flag if the link is down, and
  set it again when the link is up.

  Bug/RFE ref:  1208229 link status should be reflected by the RUNNING flag, not the
             UP flag                                                
------------------------

mpathd notices

If using Solaris 8 IPMP (IP Multipathing ) mpathd will detect NIC failures and post notices.

  NIC failure detected on qfe0
  in.mpathd has detected that NIC qfe0 is repaired and operational
  Successfully failed back to NIC qfe0 to NIC qfe1
  in.mpathd has restored network traffic back to NIC qfe0, which is
  now repaired and operational.
                                                

Applies To AFO Vertical Team Docs/NetAdmin
Attachments (none)
Document Content INFODOC ID: 47729

论坛徽章:
0
2 [报告]
发表于 2003-02-22 23:36 |只看该作者

SUN网卡工作状态检测

加精

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2003-02-23 00:27 |只看该作者

SUN网卡工作状态检测

!错

论坛徽章:
0
4 [报告]
发表于 2003-02-23 12:22 |只看该作者

SUN网卡工作状态检测

up/up

论坛徽章:
0
5 [报告]
发表于 2003-02-25 09:27 |只看该作者

SUN网卡工作状态检测

收藏,有空试试!!

论坛徽章:
0
6 [报告]
发表于 2003-02-25 15:11 |只看该作者

SUN网卡工作状态检测

好,但是要记住以root去执行上面的命令哟!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP