Checking status of hme0

2007-12-25 11:39:00

Hi there,

thanks to all who replied.

The original message was:

> I need to create a script which checks automatically the status

> of the hme0 interface. If the interface fails, the script has to disable

> hme0 and enable hme1.

>

> Do you know an easy way the check the status of the interface?

> It's an Ultra 3500 with solaris 2.6

The solution (for me) was to check the status via the ndd command.

Special thanks to Thorsten Biel.

- set the device instance:

  ndd -set /dev/hme instance 0

  this makes the next commands apply to hme0. Similarly, to set to hme1,

  simply say

  ndd -set /dev/hme instance 1

- query parameters for the set instance:

  ndd -get /dev/hme link_status 0 = link up, 1 = link down

  ndd -get /dev/hme link_speed 0 = 10MBit, 1 = 100MBit

  ndd -get /dev/hme link_mode 0 = half duplex, 1 = full duplex

  ndd -get /dev/hme adv_autoneg_cap 0 = no autonegotiation, 1 = autoneg.

enabled

- set parameters, e.g.

  ndd -set /dev/hme instance 0

  ndd -set /dev/hme adv_autoneg_cap 1

  to enable autonegotiation for hme0

for a full list of what can be queried and set for /dev/hme, do

ndd /dev/hme \?

Thanks go also to:

Dave Wreski [dave@nic.com]

Thorsten.Biel@ks.sel.alcatel.de

Sebastian Benoit [benoit@mathematik.uni-marburg.de]

Gregg TeHennepe [gat@aretha.jax.org]

Todd M. Wilkinson [tmwilkin@appliedtheory.com]

foster@bial1.ucsd.edu

Rodney C. Marable [marable@netgen.com]

Seth Rothenberg [SROTHENB@montefiore.org]

Andrew Mitchell [afm@colltech.com]

Jonathan.Loh@bankamerica.com

Simon Alexander Klaus Kissler [Simon.Kissler@valpo.edu]

mwang@tech.cicg.ml.com

Dieter Wurm [dieter.wurm@de.origin-it.com]

Marco Greene [cmgreene@netcom.ca]

Jürgen Rothenanger

DeTeCSM, SCZ Bamberg

Tel.: +49 951 1336 5218

Fax.: +49 951 1336 5299

Email: juergen.rothenanger@telekom.de

Comments

Got something to say?

You must be logged in to post a comment.