0

I work on Solaris 10 machines (eg de1a and du1b). Regarding the lltconfig command, is it possible to view only one device (eg NIC e1000g0) and not the entire list?

For example I want to get only status about e1000g0, something like the following:

 lltconfig .....
      Link 0 (e1000g0):
      Node   0 du1a      :   00:21:28:14:76:68
      Node   1 du1b      :   00:21:28:59:72:C4  permanent

Another option is to manipulate lltconfig -a list in order to get what I want (by awk or sed or ksh etc).

Here's an example of what I get from lltconfig -a list (in this case I get the entire list but I need only status for e1000g0):

 lltconfig -a list
      Link 0 (e1000g0):
      Node   0 du1a      :   00:21:28:14:76:68
      Node   1 du1b      :   00:21:28:59:72:C4  permanent

      Link 1 (e1000g1):
      Node   0 du1a      :   00:21:28:14:76:69
      Node   1 du1b      :   00:21:28:59:72:C5  permanent

      Link 2 (e1000g2):
      Node   0 du1a      :   00:21:28:14:76:99
      Node   1 du1b      :   00:21:28:59:72:95  permanent
fission
  • 3,506
  • 2
  • 20
  • 27
yael
  • 2,363
  • 4
  • 28
  • 41

1 Answers1

1

I don't have the lltconfig command on my Solaris 10 box, so I can't check the manpage; it's possible that there's already an option you could pass that would limit the display to just one interface.

In any case, this is something that sed could do for you, eg:

lltconfig -a list | sed '/e1000g0/,/^$/!d;/^$/d'

You could then add a shell function so you don't have to type that every time, eg:

function lltstatus() { lltconfig -a list | sed "/$1/,/^$/\!d;/^$/d" }
fission
  • 3,506
  • 2
  • 20
  • 27