Grabbing IP and zonename from multiline 'ifconfig' output
Hi There,
I have a Solaris server that has a bunch of zones configured and I am trying to write a script that will take all interfaces other than the loopback ones (e.g. lo0:3 etc) and present them so that I can easily determine the zone that owns the IP
So in the case of the following ifconfg output
I would get something like
Im a little unsure how I would get it to treat each individual block of ifconfig output as a seperate entity as clearly the virtual IP's for the zones are laid out differently by ifconfig than the non zone/main IP's (eg. nxge3) .. youll notice that the ip address line is positioned differently.
I have to capture all valid IPs in the report whether they are linked to a zone or not ..
Any advice or guidance on what would be a good starting point for me would be greatly appreciated, as im not really sure how to tackle this one
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
inetutils-ifconfig
IFCONFIG(1) User Commands IFCONFIG(1)NAME
ifconfig - configure network interfaces
SYNOPSIS
ifconfig [OPTION...]
DESCRIPTION
NAME [ADDR] [broadcast BRDADDR] [pointopoint|dstaddr DSTADDR]
[netmask MASK] [metric N] [mtu N] [txqueuelen N] [up|down] [FLAGS]
Configure network interfaces.
-a, --all
display all available interfaces
-A, --address=ADDR
set interface address to ADDR
-B, -b, --broadcast=ADDR, --brdaddr=ADDR
set broadcast address to ADDR
-d, -p, --dstaddr=ADDR, --peer=ADDR
set destination (peer) address to ADDR
--down shut the interface down
--format=FORMAT
select output format (or set back to default)
-F, --flags=FLAG[,FLAG...] set interface flags
-i, --interface=NAME
configure network interface NAME
-m, --netmask=MASK
set netmask to MASK
--metric=N
set metric of interface to N
-M, --mtu=N
set mtu of interface to N
-s, --short
short output format
--up activate the interface (default if address is given)
-v, --verbose
output information when configuring interface
Linux-specific options
-T, --txqlen=N
set transmit queue length to N
-?, --help
give this help list
--usage
give a short usage message
-V, --version
print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
Known flags are: allmulti, automedia, debug, loopback, multicast, portsel, running, trailers, up
AUTHOR
Written by Marcus Brinkmann.
REPORTING BUGS
Report bugs to <bug-inetutils@gnu.org>.
COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for ifconfig is maintained as a Texinfo manual. If the info and ifconfig programs are properly installed at your
site, the command
info ifconfig
should give you access to the complete manual.
GNU inetutils 1.9 December 2011 IFCONFIG(1)