ciphermethod.com

Solaris

Set Solaris 10 Link Aggregation LACP Mode

by on May.18, 2016, under Solaris

Set Solaris 10 Link Aggregation LACP Mode

# dladm modify-aggr -l active -T long 1

# dladm show-link
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2
bge3            type: non-vlan  mtu: 1500       device: bge3
nxge0           type: non-vlan  mtu: 9194       device: nxge0
nxge1           type: non-vlan  mtu: 9194       device: nxge1
nxge2           type: non-vlan  mtu: 1500       device: nxge2
nxge3           type: non-vlan  mtu: 1500       device: nxge3
nxge4           type: non-vlan  mtu: 1500       device: nxge4
nxge5           type: non-vlan  mtu: 1500       device: nxge5
aggr1           type: non-vlan  mtu: 9194       aggregation: key 1
aggr104001      type: vlan 104  mtu: 9194       aggregation: key 1
aggr160001      type: vlan 160  mtu: 9194       aggregation: key 1

# dladm show-aggr
key: 1 (0x0001) policy: L4      address: 0:21:28:eb:92:1e (auto)
           device       address                 speed           duplex  link    state
           nxge0        0:21:28:eb:92:1e          10000 Mbps    full    up      attached
           nxge1        0:21:28:eb:92:1f          10000 Mbps    full    up      attached





Leave a Comment more...

20130530: si

by on May.30, 2013, under AIX, Linux, Scripts, Solaris, Sun


#!/bin/sh
# System Information
# Created: 07 April 2000
# by: Jamey Hopkins
#
# 23Jul2002 jah - send error on uptime and ps to /dev/null to handle
# output of unknown HZ value kernel bug
# 28Jul2004 jah - added CPU information / format change
# 26Apr2013 jah - added SunOS support
# 21May2013 jah - initial linux distro support (redhat mint oracle ubuntu)
# 30May2013 jah - added AIX support

OS=`uname`

echo
echo [ `uname -n` ]
date
if [ "$OS" = "Linux" ]
then
DISTRO=`lsb_release -d | cut -f2 -d: | xargs echo`
RH=`cat /proc/version 2>/dev/null | grep redhat.com`
[ "$RH" ] && DISTRO=`cat /etc/redhat-release`
OR=`cat /proc/version 2>/dev/null | grep oracle`
[ "$OR" ] && DISTRO="(Oracle) `cat /etc/enterprise-release`"
[ "$DISTRO" = "" ] && DISTRO="Unknown Distro"
echo $DISTRO

CPU=`cat /proc/cpuinfo | grep "model name" | tail -1 | awk -F: '{ print $2 }' | xargs echo`
NCPU=`cat /proc/cpuinfo | grep "processor" | wc -l | xargs echo`
MHZ=`cat /proc/cpuinfo | grep "MHz" | tail -1 | awk -F: '{ print $2 }' | xargs echo`
printf "%s on %s %s (%s MHz)\n" "$OS" "$NCPU" "$CPU" "$MHZ"
fi

if [ "$OS" = "SunOS" ]
then
CPU=`/usr/sbin/psrinfo -v | grep "processor operates" | head -1 | awk '{ print $2 }'`
NCPU=`/usr/sbin/psrinfo -v | grep Status | wc -l | xargs echo`
REL=`uname -X | grep Release | cut -f3 -d' '`
MHZ=`/usr/sbin/psrinfo -v | grep "operates at" | head -1 | awk '{ print $6" "$7 }' | sed 's/,//g'`
printf "%s %s on %s %s (%s)\n" "$OS" "$REL" "$NCPU" "$CPU" "$MHZ"
fi

if [ "$OS" = "AIX" ]
then
CPU=`lsattr -E -l proc0 | grep "Processor type" | awk '{ print $2 }'`
NCPU=`lscfg | grep proc | wc -l | xargs echo`
REL=`oslevel`
MHZ=`pmcycles | awk '{ print $5" "$6 }'`
printf "%s %s on %s %s (%s)\n" "$OS" "$REL" "$NCPU" "$CPU" "$MHZ"
fi

STATS=`uptime 2>/dev/null`
echo $STATS

echo
echo "Active Processes Using >= 1% of CPU:"
echo _________________________________________________________

if [ "$OS" = "Linux" -o "$OS" = "SunOS" ]
then
ps -e -o user -o pid -o c -o args 2>/dev/null | grep -v ' 0 '
elif [ "$OS" = "AIX" ]
then
ps -e -o user -o pid -o cpu -o args 2>/dev/null | grep -v ' 0 '
elif [ "$OS" = "SCO_SV" ]
then
ps -A -o user -o pid -o c -o args 2>/dev/null | grep -v ' 0 ' | grep -v $$ > /tmp/ps.tmp
echo "UID\\t\\tPID\\tC\\tCMD"
while read data
do
set $data
if [ $3 -gt 4 ]
then
echo -n $1\\t
if [ `expr length $1` -lt 8 ]
then echo -n \\t
fi
echo $2\\t$3\\t$4' '$5
fi
done < /tmp/ps.tmp fi echo _________________________________________________________ rm /tmp/si.tmp /tmp/usr.tmp /tmp/ps.tmp >/dev/null 2>&1
echo

Leave a Comment more...

How-To: Create Solaris Virtual/Alias Interface

by on Sep.25, 2009, under Networking, Solaris

1. Copy existing interface to new interface.

cp /etc/hostname.ce0 /etc/hostname.ce0:1

2. Edit the new hosntaname file and change the old hostname to the new one.

Example: server-ce0 to server-ce0-v1

3. Use the ifconfig plumb option to create the new interface.

ifconfig ce0:1 plumb

4. Assign the IP Address to the new interface.

ifconfig ce0:1 10.35.129.134 netmask 255.255.255.128 up

5. Verify interface is up and functional.

ifconfig -a

ce0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.35.129.134 netmask ffffff80 broadcast 10.255.255.255

ce0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 10.35.129.134 netmask ffffff80 broadcast 10.255.255.255

ping 10.35.129.134
10.35.129.134 is alive

6. Add new IP Address to /etc/hosts

<10.35.129.134        server-ce0-v1

To delete the interface:

ifconfig ce0:1 unplumb

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...