Sponsored Content
Top Forums Shell Programming and Scripting Grabbing IP and zonename from multiline 'ifconfig' output Post 302723743 by Yoda on Tuesday 30th of October 2012 04:25:00 PM
Old 10-30-2012
Try piping the output to the below code:-

Code:
awk 'BEGIN { print "iface ip zonename"; } /^nxge/,/[.*]$/ {
        if(match($1,/nxge/)>0)
                printf("\n%s",$1);
        if(match($1,/inet/)>0)
                printf(" %s",$2);
        if(match($1,/zone/)>0)
                printf(" %s",$2);
} '

This User Gave Thanks to Yoda For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Further question on 'ifconfig' output

I asked a similar question earlier and got a very good answer but a new doubt came up. This is a few lines of a '/sbin/ifconfig' command on my PC: RX packets:3781025 errors:0 dropped:0 overruns:0 frame:0 TX packets:1941909 errors:0 dropped:0 overruns:0 carrier:0 Does the RX and TX packets... (1 Reply)
Discussion started by: mint1981
1 Replies

2. Solaris

/sbin/zonename file giving me problems

I'm trying to install the recommended patch cluster on a x86 Solaris 10 box. I get this error: ERROR: /sbin/zonename cannot be found. install_cluster for 10_x86 patch cluster not applied. Exiting. I tried touching the file and it gave a different error of: expected argument.. anyone... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

3. UNIX for Dummies Questions & Answers

Grabbing a value from an output file

I am executing a stored proc and sending the results in a log file. I then want to grab one result from the output parameters (bolded below, 2) so that I can store it in a variable which will then be called in another script. There are more details that get printed in the beginning of the log file,... (3 Replies)
Discussion started by: hern14
3 Replies

4. Solaris

How to know the global zonename from non-global zone?

It is easy to list all zones from global zones, but how to find out the global zone name from non-global zone? thx (11 Replies)
Discussion started by: honglus
11 Replies

5. OS X (Apple)

Ifconfig output - help understanding flags 'Smart, Simplex', etc

Hi - Trying to understand a few things from an ifconfig -a output - can't seem to find info anywhere on the net. Specifically - looking to understand the following: Flags=8863 Smart Running (is this the same as UP) Simplex inet6 supported media: autoselect - does that imply the... (1 Reply)
Discussion started by: littlefrog
1 Replies

6. Shell Programming and Scripting

assigning a multiline grep output which has been piped through sed to a shell variabl

Hi, I wish to format the output of a grep command in such a way that sed will be able to handle the newline characters held in the output. Since sed does not allow newlines to be contained in a replacement pattern, that means adding a backslash '\' character to the end of each line from... (8 Replies)
Discussion started by: timculhane
8 Replies

7. Shell Programming and Scripting

Grabbing value from command output and monitoring for changes

Hi all, Very new to shell scripting so appreciate some help! There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in: echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
Discussion started by: monty77
14 Replies

8. Shell Programming and Scripting

parsing ifconfig output

I'm trying to gather information on the interfaces on a large number of servers. If I run ifconfig I will get: eth0 Link encap:Ethernet HWaddr 00:50:56:A2:27:C1 inet addr:10.145.xxx.xxx Bcast:10.152.45.255 Mask:255.255.254.0 ----- eth1 Link... (2 Replies)
Discussion started by: C0ppert0p
2 Replies

9. UNIX for Dummies Questions & Answers

Assigning ipv6 to bonding interface - getting old as well as changed ipv6 in ifconfig output

Hi, I have created a bonding bond1 interface with 6 Eth , mode=4. Recently i have changed my old ipv6 to new one and tried to restart as well as reload network service. Post which i can see old as well as changed ipv6 in ifconfig command output. Below are few files and command output for your... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

10. Shell Programming and Scripting

Printing from multiline output

Dear all, I have below "ldapsearch" output $ ldapsearch -D "CN=SVC-ACCOUNT,OU=SVC,OU=VDSI,OU=Non-Human,DC=Org,DC=com" -w secretword -H ldaps://org.com:636 -b DC=Org,DC=com -s sub uid=v00000 "(filter)" "displayName" "uid" "street" # extended LDIF # # LDAPv3 # base <DC=Org,DC=com> with... (7 Replies)
Discussion started by: baluchen
7 Replies
nxge(7D)							      Devices								  nxge(7D)

NAME
nxge - Sun 10/1 Gigabit Ethernet network driver SYNOPSIS
/dev/nxge* DESCRIPTION
The nxge Gigabit Ethernet driver is a multi-threaded, loadable, clonable, GLD-based STREAMS driver supporting the Data Link Provider Inter- face, dlpi(7P), on Sun Gigabit Ethernet hardware (NIU, Sun x8, Express Dual 10 Gigabit Ethernet fiber XFP low profile adapter and the 10/100/1000BASE-T x8 Express low profile adapter). The nxge driver functions include chip initialization, frame transmit and receive, flow classification, multicast and promiscuous support, and error recovery and reporting. The nxge device provides fully-compliant IEEE 802.3ae 10Gb/s full duplex operation using XFP-based 10GigE optics (NIU, dual 10 Gigabit fiber XFP adapter). The Sun Ethernet hardware supports the IEEE 802.3x frame-based flow control capabilities. For the 10/100/1000BASE-T adapter, the nxge driver and hardware support auto-negotiation, a protocol specified by the 1000 Base-T standard. Auto-negotiation allows each device to advertise its capabilities and discover those of its peer (link partner). The highest common denomi- nator supported by both link partners is automatically selected, yielding the greatest available throughput while requiring no manual con- figuration. The nxge driver also allows you to configure the advertised capabilities to less than the maximum (where the full speed of the interface is not required) or to force a specific mode of operation, irrespective of the link partner's advertised capabilities. APPLICATION PROGRAMMING INTERFACE
The cloning character-special device, /dev/nxge, is used to access all Sun Neptune NIU devices installed within the system. The nxge driver is managed by the dladm(1M) command line utility, which allows VLANs to be defined on top of nxge instances and for nxge instances to be aggregated. See dladm(1M) for more details. You must send an explicit DL_ATTACH_REQ message to associate the opened stream with a particular device (PPA). The PPA ID is interpreted as an unsigned integer data type and indicates the corresponding device instance (unit) number. The driver returns an error (DL_ERROR_ACK) if the PPA field value does not correspond to a valid device instance number for the system. The device is initialized on first attach and de- initialized (stopped) at last detach. The values returned by the driver in the DL_INFO_ACK primitive in response to a DL_INFO_REQ are: o Maximum SDU (default 1500). o Minimum SDU (default 0). The driver pads to the mandatory 60-octet minimum packet size. o DLSAP address length is 8. o MAC type is DL_ETHER. o SAP length value is -2, meaning the physical address component is followed immediately by a 2-byte SAP component within the DLSAP address. o Broadcast address value is the Ethernet/IEEE broadcast address (FF:FF:FF:FF:FF:FF). Due to the nature of link address definition for IPoIB, the DL_SET_PHYS_ADDR_REQ DLPI primitive is not supported. In the transmit case for streams that have been put in raw mode via the DLIOCRAW ioctl, the dlpi application must prepend the 20 byte IPoIB destination address to the data it wants to transmit over-the-wire. In the receive case, applications receive the IP/ARP datagram along with the IETF defined 4 byte header. Once in the DL_ATTACHED state, you must send a DL_BIND_REQ to associate a particular Service Access Point (SAP) with the stream. CONFIGURATION
For the 10/100/1000BASE-T adapter, the nxge driver performs auto-negotiation to select the link speed and mode. Link speed and mode may be 10000 Mbps full-duplex (10 Gigabit adapter), 1000 Mbps full-duplex, 100 Mbps full-duplex, or 10 Mbps full-duplex, depending on the hardware adapter type. See the IEEE802.3 standard for more information. The auto-negotiation protocol automatically selects the 1000 Mbps, 100 Mbps, or 10 Mbps operation modes (full-duplex only) as the highest common denominator supported by both link partners. Because the nxge device supports all modes, the effect is to select the highest throughput mode supported by the other device. You can also set the capabilities advertised by the nxge device using dladm(1M). The driver supports a number of parameters whose names begin with en_ (see below). Each of these parameters contains a boolean value that determines if the device advertises that mode of opera- tion. The adv_autoneg_cap parameter controls whether auto-negotiation is performed. If adv_autoneg_cap is set to 0, the driver forces the mode of operation selected by the first non-zero parameter in priority order as shown below: (highest priority/greatest throughput) en_1000fdx_cap 1000Mbps full duplex en_100fdx_cap 100Mpbs full duplex en_10fdx_cap 10Mpbs full duplex (lowest priority/least throughput) All capabilities default to enabled. Note that changing any capability parameter causes the link to go down while the link partners renego- tiate the link speed/duplex using the newly changed capabilities. FILES
/dev/nxge* Special character device. /kernel/drv/nxge 32-bit device driver (x86). /kernel/drv/sparcv9/nxge 64-bit device driver (SPARC). /kernel/drv/amd64/nxge 64-bit device driver (x86). /kernel/drv/nxge.conf Configuration file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC, x86 | +-----------------------------+-----------------------------+ SEE ALSO
dladm(1M), netstat(1M), attributes(5), streamio(7I), dlpi(7P), driver.conf(4) Writing Device Drivers STREAMS Programming Guide Network Interfaces Programmer's Guide IEEE 802.3ae Specification -- 2002 SunOS 5.11 12 Apr 2008 nxge(7D)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy