grep eri setting via ndd

Monday, August 30, 2010 at 10:01 PM
#! /bin/ksh
# erigrep version 0.0.1 - grep eri settings via ndd.
# o_|/ borked eri drivers!
# June 5 2003 Sam Nelson
# As usual, not clever or efficient, but quick, dirty and effective.
# tested on Solaris 8 and 9.

#Set a tmpfile
TMPFILE=erigrep.txt

echo "Running erigrep script........"

# Got root?
#
Check_ID()
{
ID=$(/usr/ucb/whoami)
if [ $ID != "root" ]; then
echo "$ID, you must be root to run this script."
exit 1
fi
}
Check_ID

# Get uname (useful!)
echo "erigrep report for host:" >$TMPFILE
/usr/bin/uname -a >>$TMPFILE 2>&1

# Get some basic stuff:
echo "netstat -s -P tcp" >>$TMPFILE 2>&1
netstat -s -P tcp >>$TMPFILE 2>&1
echo "netstat -s -P udp" >>$TMPFILE 2>&1
netstat -s -P udp >>$TMPFILE 2>&1

###get eri stuff

echo "eri settings" >>$TMPFILE 2>&1

echo "ndd -get /dev/eri transceiver_inuse" >>$TMPFILE 2>&1
ndd -get /dev/eri transceiver_inuse >>$TMPFILE 2>&1

echo "ndd -get /dev/eri link_status" >>$TMPFILE 2>&1
ndd -get /dev/eri link_status >>$TMPFILE 2>&1

echo "ndd -get /dev/eri link_speed" >>$TMPFILE 2>&1
ndd -get /dev/eri link_speed >>$TMPFILE 2>&1

echo "ndd -get /dev/eri link_mode" >>$TMPFILE 2>&1
ndd -get /dev/eri link_mode >>$TMPFILE 2>&1

echo "ndd -get /dev/eri ipg1" >>$TMPFILE 2>&1
ndd -get /dev/eri ipg1 >>$TMPFILE 2>&1

echo "ndd -get /dev/eri ipg2" >>$TMPFILE 2>&1
ndd -get /dev/eri ipg2 >>$TMPFILE 2>&1

echo "ndd -get /dev/eri use_int_xcvr" >>$TMPFILE 2>&1
ndd -get /dev/eri use_int_xcvr >>$TMPFILE 2>&1

echo "ndd -get /dev/eri pace_size" >>$TMPFILE 2>&1
ndd -get /dev/eri pace_size >>$TMPFILE 2>&1

echo "ndd -get /dev/eri adv_autoneg_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri adv_autoneg_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri adv_100T4_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri adv_100T4_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri adv_100fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri adv_100fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri adv_100hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri adv_100hdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri 10fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri 10fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri 10hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri 10hdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_autoneg_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_autoneg_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_100T4_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_100T4_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_100fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_100fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_100hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_100hdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_10fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_10fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lp_10hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/eri lp_10hdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/eri instance" >>$TMPFILE 2>&1
ndd -get /dev/eri instance >>$TMPFILE 2>&1

echo "ndd -get /dev/eri lance_mode" >>$TMPFILE 2>&1
ndd -get /dev/eri lance_mode >>$TMPFILE 2>&1

echo "ndd -get /dev/eri ipg0" >>$TMPFILE 2>&1
ndd -get /dev/eri ipg0 >>$TMPFILE 2>&1

echo "ndd -get /dev/eri intr_blank_time" >>$TMPFILE 2>&1
ndd -get /dev/eri intr_blank_time >>$TMPFILE 2>&1

echo "ndd -get /dev/eri intr_blank_packets" >>$TMPFILE 2>&1
ndd -get /dev/eri intr_blank_packets >>$TMPFILE 2>&1

# hot kstat action:
echo "kstat eri output" >>$TMPFILE 2>&1
kstat eri >>$TMPFILE 2>&1

echo "OK script finished" >>$TMPFILE 2>&1

echo Check current directory for erigrep.txt file!

Shell script to analyse potential NIC / Network problems

at 9:58 PM
#! /bin/ksh
# netgrep version 0.0.6 April 4, 2004
# shell script to analyse potential NIC / network problems.
# not clever or efficient, but quick, dirty and effective.
# Sam Nelson
# I've moved companies. All updates will be available at http://www.unix.ms
#

TMPFILE=netgrep.txt
NDD=/usr/sbin/ndd
NETSTAT=/usr/bin/netstat
IFC=/sbin/ifconfig

typeset -R5 LINK
typeset -R9 AUTOSPEED
typeset -R6 STATUS
typeset -R6 SPEED
typeset -R5 MODE
typeset -R18 ETHER

echo "Running netgrep v0.0.6, Sam Nelson "
echo "netgrep v0.0.6 output - for latest version see http://www.unix.ms" >$TMPFILE 2>&1
echo "netgrep diagnostic script " >> $TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "ifconfig output:" >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/sbin/ifconfig -a >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

# Get basic TCP / UDP info
echo "netstat -s -P tcp" >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
netstat -s -P tcp >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "netstat -s -P udp" >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
netstat -s -P udp >>$TMPFILE 2>&1

# Check the speed and settings of interfaces.
# Thanks and regards to Paul Bates and James Council
# This section http://www.sun.com/bigadmin/scripts/submittedScripts/nicstatus.txt

echo "Interface Settings:" >> $TMPFILE

#---- Function to test a Cassini Gigabit-Ethernet port (i.e. ce_).
#
Check_CE()
{
autospeed=`${NETSTAT} -k $LINK| awk '/xcvr_id/ {print $4}'`
case $autospeed in
1) AUTOSPEED=on ;;
0) AUTOSPEED=off ;;
*) AUTOSPEED=Error ;;
esac

status=`${NETSTAT} -k $LINK| awk '/link_up/ {print $2}'`
case $status in
1) STATUS=Up ;;
0) STATUS=DOWN ;;
*) STATUS=Error ;;
esac

SPEED=`${NETSTAT} -k $LINK| grep link_speed| awk '{print $2}'`

mode=`${NETSTAT} -k $LINK| grep link_speed| awk '{print $4}'`
case $mode in
2) MODE=FDX ;;
1) MODE=HDX ;;
0) MODE=--- ;;
*) MODE=Error ;;
esac
}

# Function to test Quad Fast-Ethernet, Fast-Ethernet, and
# GEM Gigabit-Ethernet (i.e. qfe_, hme_, ge_)
#
Check_NIC()
{
${NDD} -set /dev/${1} instance ${2}

if [ $type = "ge" ];then
autospeed=`${NDD} -get /dev/${1} adv_1000autoneg_cap`
else autospeed=`${NDD} -get /dev/${1} adv_autoneg_cap`
fi
case $autospeed in
1) AUTOSPEED=on ;;
0) AUTOSPEED=off ;;
*) AUTOSPEED=Error ;;
esac

status=`${NDD} -get /dev/${1} link_status`
case $status in
1) STATUS=Up ;;
0) STATUS=DOWN ;;
*) STATUS=Error ;;
esac

speed=`${NDD} -get /dev/${1} link_speed`
case $speed in
1) SPEED=100MB ;;
0) SPEED=10MB ;;
*) SPEED=Error ;;
esac

mode=`${NDD} -get /dev/${1} link_mode`
case $mode in
1) MODE=FDX ;;
0) MODE=HDX ;;
*) MODE=Error ;;
esac
}


# Output header.
echo
echo " NIC Autospeed Status Speed Mode MAC Address" >>$TMPFILE 2>&1
echo "----- --------- ------ ------ ----- ------------------">>$TMPFILE 2>&1

# make a list of active i/f.
# i.e multi qfe!
#
for LINK in `${IFC} -a| egrep -v "lo|be|dman|lpfc"| egrep "^[a-z,A-z]"| cut -f1 -d :| sort| uniq`
do
type=$(echo $LINK | sed 's/[0-9]//g')
num=$(echo $LINK | sed 's/[a-z,A-Z]//g')

# Set variables / reference functions.
#
if [ $type = ce ]; then
Check_CE $type $num
else Check_NIC $type $num
fi
# Set ethernet variable / dump it all.
#
ETHER=`${IFC} ${LINK}| awk '/ether/ {print $2}'`
echo "$LINK $AUTOSPEED $STATUS $SPEED $MODE $ETHER" >>$TMPFILE 2>&1
done

set +x
echo "" >>$TMPFILE 2>&1

# rudimentary check for collisions / ierrors / oerrors.
echo "Check for ierrors/oerrors/collisions......" >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/netstat -i >>$TMPFILE 2>&1


#routing info
echo "Routing table info.">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/netstat -rvn >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#defaultrouter?
echo "checking for existence of /etc/defaultrouter">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/defaultrouter>>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/defaultrouter....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/defaultrouter>>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check nsswitch.conf
echo "Checking permissions of /etc/nsswitch.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/nsswitch.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/nsswitch.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/nsswitch.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check resolv.conf
echo "Checking permissions of /etc/resolv.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/resolv.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/resolv.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/resolv.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check inetd.conf
echo "Checking permissions of /etc/inetd.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/inetd.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/inetd.conf....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/inetd.conf >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check hosts file
echo "Checking permissions of /etc/inet/hosts....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/inet/hosts >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/inet/hosts....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/inet/hosts >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check /etc/gateways if it exists
echo "Checking permissions of /etc/gateways....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/gateways >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/gateways....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/gateways >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check nodename file
echo "Checking permissions of /etc/nodename....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/nodename >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/nodename....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/nodename >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check hostname.*** file(s)
echo "Checking permissions of /etc/hostname.*....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/ls -al /etc/hostname* >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
echo "Checking contents of /etc/hostname.*....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/cat /etc/hostname*>>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#what's open / connected?
echo "Open connections...." >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/bin/netstat -an >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

# ARP you being served?
echo "ARP cache details">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/sbin/arp -a >>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1

#check other hosts in the vicinity
echo "Ping responses from this subnet....">>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
/usr/sbin/ping -sn 255.255.255.255 1 255>>$TMPFILE 2>&1
echo "" >>$TMPFILE 2>&1
chmod 777 $TMPFILE

echo "OK script finished" >>$TMPFILE 2>&1

echo Check current directory for netgrep.txt file!

Script to check Port with Pid

at 9:35 PM
Usage is simple:

root@node1/>pcp
usage:/bin/pcp [-p PORT] [-P PID] [-a ALL] (Wildcard OK)

Which process has port 22 open?

root@node1/>pcp -p 22

What ports does PID 516 have open?

root@node1/>pcp -P 516

I want to see all open TCP ports and their corresponding PIDS

root@node1/>pcp -a

Script:

#!/usr/bin/ksh
#
# PCP (PID con Port)
# v1.09 11/12/2009
#
# If you have a Solaris 8, 9 or 10 box and you can't
# install lsof, try this. It maps PIDS to ports and vice versa.
# It also shows you which peers are connected on which port.
# Wildcards are accepted for -p and -P options.
#
# Many thanks Daniel Trinkle trinkle @ cs.purdue.edu
# for the help, much appreciated.
i=0
while getopts :p:P:a opt
do
case "${opt}" in
p ) port="${OPTARG}";i=3;;
P ) pid="${OPTARG}";i=3;;
a ) all=all;i=2;;
esac
done
if [ $OPTIND != $i ]
then
echo >&2 "usage: $0 [-p PORT] [-P PID] [-a] (Wildcards OK) "
exit 1
fi
shift `expr $OPTIND - 1`
if [ "$port" ]
then
# Enter the port number, get the PID
#
port=${OPTARG}
echo "PID\tProcess Name and Port"
echo "_________________________________________________________"
for proc in `ptree -a | awk '/ptree/ {next} {print $1};'`
do
result=`pfiles $proc 2> /dev/null| egrep "port: $port$"`
if [ ! -z "$result" ]
then
program=`ps -fo comm= -p $proc`
echo "$proc\t$program\t$port\n$result"
echo "_________________________________________________________"
fi
done
elif [ "$pid" ]
then
# Enter the PID, get the port
#
pid=$OPTARG
# Print out the information
echo "PID\tProcess Name and Port"
echo "_________________________________________________________"
for proc in `ptree -a | awk '/ptree/ {next} $1 ~ /^'"$pid"'$/ {print $1};'`
do
result=`pfiles $proc 2> /dev/null| egrep port:`
if [ ! -z "$result" ]
then
program=`ps -fo comm= -p $proc`
echo "$proc\t$program\n$result"
echo "_________________________________________________________"
fi
done
elif [ $all ]
then
# Show all PIDs, Ports and Peers
#
echo "PID\tProcess Name and Port"
echo "_________________________________________________________"
for proc in `ptree -a | sort -n | awk '/ptree/ {next} {print $1};'`
do
out=`pfiles $proc 2>/dev/null| egrep "port:"`
if [ ! -z "$out" ]
then
name=`ps -fo comm= -p $proc`
echo "$proc\t$name\n$out"
echo "_________________________________________________________"
fi
done
fi
exit 0

Steps for Installing EMC Solutions Enabler version 6.2.1

Wednesday, August 25, 2010 at 9:15 AM
Steps for Installing EMC Solutions Enabler version 6.2.1

server:/tmp/symcli/6.2.1# ./emc_install.csh

#----------------------------------------------------------------------------
# EMC Installation Manager
#----------------------------------------------------------------------------
Copyright 2003, EMC Corporation
All rights reserved.

The terms of your use of this software are governed by the
applicable contract.

1. Kit Location [/tmp/symcli/6.2.1/osl_cd] :
Provide the location of the software

2. Install root directory [/opt/emc] :
Enter the path where the symcli needs to be installed

#-----------------------------------------------------------------------------
# The following is AVAILABLE TO BE INSTALLED from the selected Kit Location:
#-----------------------------------------------------------------------------
# ITEM PRODUCT VERSION
#-----------------------------------------------------------------------------
01 EMC Solutions Enabler V6.2.1

What would you like to do? Install (i) Uninstall (u) Register (r) Exit (x):
Enter i to proceed installation

3. At the following prompt, specify whether to install all of the
Solutions Enabler libraries:
Install All Solutions Enabler Shared Libraries and Run
Time Environment? [Y]:
• A [Y]es response installs all the libraries.
• A [N]o response produces the following series of prompts,
which allow you to select the libraries to install. If you only
want to install Solutions Enabler’s core functionality, specify
[N]o for each of the prompts. Solutions Enabler’s core
functionality includes symapi[mt], symlvm[mt],
storapi[mt], storsrvd[mt], symapisrv[mt],
storapid[mt], storcore[mt], stordaemon[mt], and
storpds[mt].
– BaseStor Library Component ? [Y]:
A [Y]es response installs StorSil and Storbase. This
option provides base storage and host specific
functionality, and an interface to storage arrays for features
like I/O scan, device listings, statistics, and showings.
– CtrlStor Library Component ? [Y]:
A [Y]es response installs StorSil, Storbase, and
Storctrl. This option provides the same functionality as
the BaseStor option (explained earlier), but includes
storage control functionality for features like Snap, device
masking, and device mirroring.
– BaseMapping Library Component ? [Y]:
A [Y]es response installs stormap, which provides Storage
Resource Management (SRM) functionality.

4. Solutions Enabler is available in both 32 and 64 bit support on
some operating systems. The following prompt only displays if
Solutions Enabler can support both 32 and 64 bit versions of the
libraries and executables on the host:
Install Solutions Enabler 64-bit Shared libraries ?
[N]:
A [Y]es response installs the 32 and 64 bit libraries. A [N]o
response only installs the 32 bit libraries.
9
Installation
5. At the following prompt, specify whether to install the collection
of binaries known as SYMCLI. A [Y]es response installs the
SYMCLI binaries:
Install Symmetrix Command Line Interface (SYMCLI) ?
[Y]:

6. If you are installing Solutions Enabler on a host with a Linux,
HP-UX, SunOS, or AIX operating system, the following prompt
displays, asking whether to install one or more optional database
components:
Install Solutions Enabler SRM Database Run Time
Components ? [N]:
A [Y]es response displays the following prompts, depending on
your operating system:
• SRM Oracle Database Component ? [N]:
This prompt only displays on operating systems where
Solutions Enabler supports Oracle. A [Y]es response installs
the optional Oracle daemon.
• SRM Informix Database Component ? [N]:
This prompt only displays on operating systems where
Solutions Enabler supports Informix. A [Y]es response
installs the optional Informix daemon.
• SRM Sybase Database Component ? [N]:
This prompt only displays on operating systems where
Solutions Enabler supports Sybase. A [Y]es response installs
the optional Sybase daemon.
• IBM UDB Database Component ? [N]:
This prompt only displays on operating systems where
Solutions Enabler supports UDB. A [Y]es response installs
the optional UDB daemon.

7. At the following prompt, specify whether to install the Solutions
Enabler Java interface component. You should install this
component if your Solutions Enabler application uses a Java
interface. A [Y]es response installs the JNI component:
Install Option to Enable JNI Interface for EMC
Solutions Enabler APIs ? [N]:
40
Installation
8. At the following prompt, specify whether to install the Solutions
Enabler Star component. A [Y]es response installs the Star
component:
Install option to Enable EMC Solutions Enabler Star
component ? [N]:


9. If you are upgrading, the following prompt displays, asking
whether to move the previous installation’s data files to the
symapi_old directory. A [Y]es response moves the files:
Do you want to move this data to
/usr/emc/API/symapi_old ? [N]:

In server server the below issue is faced

server:/opt/emc/SYMCLI/V6.2.1/bin# ./syminq
A requested network service was not found in the service file
server:/opt/emc/SYMCLI/V6.2.1/bin#

Found the environmental variables are not set properly
>>>
server:/tmp/symcli/6.2.1# symcli -def
Symmetrix Command Line Interface (SYMCLI) Version V6.2.1.0 (Edit Level: 733)
built with SYMAPI Version V6.2.1.0 (Edit Level: 733)

Current settings of the SYMCLI environmental variables:

SYMCLI_CONNECT : SYMAPI_SERVER
>>>

To correct this I done the unset command
Unset SYMCLI_CONNECT and removed the SYMCLI_CONNECT from root user .profile file as below

# SYMCLI_CONNECT=SYMAPI_SERVER
# export SYMCLI_CONNECT

QLC error message for HBA in Solaris

Friday, August 13, 2010 at 7:35 AM
QLC error message:

Aug 9 02:00:42 test1 qlc: [ID 607548 kern.info] QEL qlc(4): ql_sdm_setup, failed, version
Aug 9 02:00:42 test1 qlc: [ID 599862 kern.info] QEL qlc(4): ql_sdm_ioctl, failed, sdm_setup
Aug 9 02:00:42 test1 qlc: [ID 771894 kern.info] QEL qlc(4): ql_ioctl,unknown command = 115
Aug 9 02:00:42 test1 qlc: [ID 875411 kern.info] QEL qlc(4): ql_ioctl,failed, rval = 25
Aug 10 02:00:45 test1 qlc: [ID 607548 kern.info] QEL qlc(4): ql_sdm_setup, failed, version
Aug 10 02:00:45 test1 qlc: [ID 599862 kern.info] QEL qlc(4): ql_sdm_ioctl, failed, sdm_setup
Aug 10 02:00:45 test1 qlc: [ID 771894 kern.info] QEL qlc(4): ql_ioctl,


Solution:

The error messages observed are the consequence of enabling the extended loggin on qld driver, see configuration file qlc.conf:

#Name: Enable extended logging
#Type: Integer, flag; Range: 0 (disable), 1 (enable); Default: 0
#Usage: This field enables logging of driver detected events occurring
# either in the driver or fibre channel bus. Events are logged
# in Solaris /var/adm/messages file.
#
#
# extended-logging=0;
extended-logging=1; <---!!!

Those messages are reported against instances 3 and 4, this are related to the following paths:

"/node@1/pci@8,700000/pci@2/SUNW,qlc@4" 0 "qlc"
"/node@1/pci@8,700000/pci@2/SUNW,qlc@5" 1 "qlc"

"/node@1/pci@9,600000/QLGC,qla@1" 4 "qlc" -->
"/node@1/pci@9,600000/QLGC,qla@2" 3 "qlc" -->

"/node@1/pci@8,600000/SUNW,qlc@2" 2 "qlc"


There are two SUN HBAs :

Opening Device: /devices/pci@8,700000/pci@2/SUNW,qlc@4/fp@0,0:devctl
Detected FCode Version: ISP2200 FC-AL Host Adapter Driver: 1.13 01/03/05

Opening Device: /devices/pci@8,700000/pci@2/SUNW,qlc@5/fp@0,0:devctl
Detected FCode Version: ISP2200 FC-AL Host Adapter Driver: 1.13 01/03/05

Opening Device: /devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl
Detected FCode Version: ISP2200 FC-AL Host Adapter Driver: 1.14 01/11/20


1) | 'PCI Dual FC Network Adapter+' | X6727A | 375-3030
/devices/pci@8,700000/pci@2/SUNW,qlc@4/fp@0,0:devctl NOT CONNECTED qlc0
/devices/pci@8,700000/pci@2/SUNW,qlc@5/fp@0,0:devctl NOT CONNECTED qlc1



2) | 'Onboard FC-AL (ISP220x)' | N/A | N/A
/devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl CONNECTED qlc2



And there is a third party HBA, configured under Sun qlc driver, used to access EMC array:

/devices/pci@9,600000/QLGC,qla@1/fp@0,0:devctl CONNECTED qlc4
/devices/pci@9,600000/QLGC,qla@2/fp@0,0:devctl CONNECTED qlc3

DEVICE PROPERTIES for disk: 5006048441dde6a3
Vendor: EMC
Product ID: SYMMETRIX
Revision: 5568
Serial Num: 702042C64000
Unformatted capacity: 4095.000 MBytes
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0xffff
Device Type: Disk device
Path(s):

/dev/rdsk/c6t5006048441DDE6A3d15s2
/devices/pci@9,600000/QLGC,qla@1/fp@0,0/ssd@w5006048441dde6a3,f:c,raw
LUN path port WWN: 5006048441dde6a3
Host controller port WWN: 210000e08b06abcb
Path status: O.K.
/dev/rdsk/c7t5006048441DDE69Cd15s2
/devices/pci@9,600000/QLGC,qla@2/fp@0,0/ssd@w5006048441dde69c,f:c,raw
LUN path port WWN: 5006048441dde69c
Host controller port WWN: 210000e08b06accb
Path status: O.K.


bash-3.00$ more luxadm_-e_port.out

Found path to 5 HBA ports

/devices/pci@8,700000/pci@2/SUNW,qlc@4/fp@0,0:devctl NOT CONNECTED
/devices/pci@8,700000/pci@2/SUNW,qlc@5/fp@0,0:devctl NOT CONNECTED
/devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
/devices/pci@9,600000/QLGC,qla@1/fp@0,0:devctl CONNECTED
/devices/pci@9,600000/QLGC,qla@2/fp@0,0:devctl CONNECTED


If you don't want to see those debugging messsages, you can edit /kernel/drv/qlc.conf and chage line extended-logging=1; to extended-logging=0; , save the file and reboot.

Add and remove NIS+ Client

Monday, July 5, 2010 at 7:14 AM
Remove NIS+ client from server

# rm -r /var/nis/*
# rm /etc/defaultdomain; rm /etc/.rootkey
# cp /etc/nsswitch.conf /etc/nsswitch.conf.bck
# cp /etc/nsswitch.files /etc/nsswitch.conf
# init 6

Install NIS+ client on server

# domainname test.ind
# domainname > /etc/defaultdomain
# cp /etc/nsswitch.conf.bck /etc/nsswitch.conf
# nisinit -c -H master
# ps -ef|grep keyserv
# kill -9 PID_keyserv
# keyserv
# keylogin -r
# init 6

Solaris Command Reference

Wednesday, June 30, 2010 at 4:18 AM
Solaris Command Reference
HD info(vendor, RPM, capacity)
oasis:/home/tse/dxy[9:18pm] iostat -E

sd0 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: SEAGATE Product: ST34371W SUN4.2G Revision: 7462 Serial No: 9742K71685
RPM: 7200 Heads: 16 Size: 4.29GB <4292075520>
Media Error: 0 Device Not Ready: 0 No Device: 3 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

sd1 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: SEAGATE Product: ST32171W SUN2.1G Revision: 7462 Serial No: 9736T74649
RPM: 5400 Heads: 19 Size: 2.13GB <2127708160>
Media Error: 0 Device Not Ready: 0 No Device: 3 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

sd6 Soft Errors: 0 Hard Errors: 3 Transport Errors: 0
Vendor: TOSHIBA Product: XM5701TASUN12XCD Revision: 0997 Serial No: 04/09/97
RPM: 0 Heads: 0 Size: 18446744073.71GB <-8589934591 bytes>
Media Error: 0 Device Not Ready: 3 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

Display the number of used and free i-nodes
impulse:/home/dxy[4:07pm] df -F ufs -o i
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t3d0s0 38555 403045 9% /
/dev/dsk/c0t1d0s0 160761 345607 32% /export/home
/dev/md/dsk/d20 149826 1905214 7% /usr/local
impulse:/home/dxy[4:07pm] /usr/ucb/df -i
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t3d0s0 38555 403045 9% /
/dev/dsk/c0t1d0s0 160761 345607 32% /export/home
/dev/md/dsk/d20 149826 1905214 7% /usr/local
impulse:/home/dxy[4:07pm]

Display processes with the highest CPU utilization
velocity:/home/dxy[4:54pm] ps -eo pid,pcpu,args sort +1n

Display processes with the highest memory usage
velocity:/home/dxy[4:54pm] ps -eo pid,vsz,args sort +1n

Printing disk geometry and partition info
oasis:/home/dxy[4:16pm] prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 135 sectors/track
* 16 tracks/cylinder
* 2160 sectors/cylinder
* 3882 cylinders
* 3880 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 7855920 7855919 /usr/local
1 3 01 7855920 524880 8380799
2 5 00 0 8380800 8380799
oasis:/home/dxy[4:16pm]

Checking whether it's running in 32-bit mode or 64-bit mode
64-bit mode
% isalist -v
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
% isainfo -v
64-bit sparcv9 applications
32-bit sparc applications

32-bit mode
% isalist -v
sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
% isainfo -v
32-bit sparc applications

Verifying a route to a specified network
# route -n get xxx.yyy.zzz.0
route to: xxx.yyy.zzz.0
destination: default
mask: default
gateway: xxx.yyy.aaa.254
interface: hme0
flags:
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
#

print the version of OBP
% prtconf -V
OBP 3.3.2 1996/06/28 08:43

% /usr/platform/`uname -i`/sbin/prtdiag -v grep OBP
OBP 3.11.1 1997/12/03 15:53 POST 3.11.4 1997/05/27 02:26
%

{2} ok .version
Release 3.23 Version 1 created 1999/07/16 12:08
OBP 3.23.1 1999/07/16 12:08
POST 2.0.2 1998/10/19 10:46
{2} ok

print the version of Open Windows
% showrev -w

OpenWindows version:
OpenWindows Version 3.6.1 25 January 1999

%

To determine which monitor resolution is available
% /usr/sbin/ffbconfig -res \?
Valid values for -res option are:
1024x768x60 [1]
1024x768x70 [1]
1024x768x75 [1] [2]
1024x768x77
1024x800x84
1152x900x66
1152x900x76
1280x800x76 [1] [2]
1280x1024x60 [1] [2]
1280x1024x67
1280x1024x76
1280x1024x85 [1] [2]
960x680x112s
960x680x108s
640x480x60 [1] [2]
640x480x60i [1]
768x575x50i [1]
1440x900x76 [1] [2]
1600x1000x66 [1] [2]
1600x1000x76 [1] [2]
1600x1280x76 [1] [2]
1920x1080x72 [1] [2]
1920x1080x76 [1] [2]
1920x1200x70 [1] [2]
1920x1200x75 [1] [2]
svga [1]
1152
1280
stereo
vga [1] [2]
ntsc [1]
pal [1]
none
Notes:
[1] monitor does not support this resolution.
[2] this version of FFB (FFB1) does not support this resolution.
%

system configuration
% sysdef
Display the device list (and drivers attached to devices)
% prtconf -D
System Configuration: Sun Microsystems sun4u
Memory size: 256 Megabytes
System Peripherals (Software Nodes):

SUNW,Ultra-1
packages
terminal-emulator
deblocker
obp-tftp
disk-label
ufs-file-system
chosen
openprom
client-services
options, instance #0 (driver name: options)
aliases
memory
virtual-memory
counter-timer
sbus, instance #0 (driver name: sbus)
SUNW,CS4231 (driver name: audiocs)
auxio
flashprom
SUNW,fdtwo, instance #0 (driver name: fd)
eeprom (driver name: eeprom)
zs, instance #0 (driver name: zs)
zs, instance #1 (driver name: zs)
sc
SUNW,pll
SUNW,fas, instance #0 (driver name: fas)
sd (driver name: sd)
st (driver name: st)
sd, instance #0 (driver name: sd)
sd, instance #1 (driver name: sd)
sd, instance #2 (driver name: sd)
sd, instance #3 (driver name: sd)
sd, instance #4 (driver name: sd)
sd, instance #5 (driver name: sd)
sd, instance #6 (driver name: sd)
sd, instance #7 (driver name: sd)
sd, instance #8 (driver name: sd)
sd, instance #9 (driver name: sd)
sd, instance #10 (driver name: sd)
sd, instance #11 (driver name: sd)
sd, instance #12 (driver name: sd)
sd, instance #13 (driver name: sd)
sd, instance #14 (driver name: sd)
SUNW,hme, instance #0 (driver name: hme)
SUNW,bpp (driver name: bpp)
SUNW,UltraSPARC
SUNW,ffb, instance #0 (driver name: ffb)
pseudo, instance #0 (driver name: pseudo)

processor type, speed
% psrinfo -v
Status of processor 0 as of: 06/16/99 12:38:51
Processor has been on-line since 02/07/99 01:47:11.
The sparcv9 processor operates at 200 MHz,
and has a sparcv9 floating point processor.

patch applied on the system
% showrev -p
exported file system on NFS server
% showmount -e NFS_SERVER
display current run level
% who -r
Find out a package which a file belongs to
% pkgchk -l -p /usr/lib/sendmail
Pathname: /usr/lib/sendmail
Type: regular file
Expected mode: 4555
Expected owner: root
Expected group: bin
Expected file size (bytes): 650720
Expected sum(1) of contents: 22626
Expected last modification: Apr 07 04:13:53 1999
Referenced by the following packages:
SUNWsndmu
Current status: installed

%

Examining gcc behavior
% gcc -v -x c /dev/null
Display the version of CDE
% /usr/ccs/bin/what /usr/dt/bin/dtmail
/usr/dt/bin/dtmail:
CDE Version 1.3.4
CDEVersion1.3.4

Display the version of BIND
% nslookup -class=chaos -q=txt version.bind ns0.optix.org
Server: impulse.optix.org
Address: 210.164.85.210
Aliases: 210.85.164.210.in-addr.arpa

VERSION.BIND text = "8.2.2-P5"
% dig @ns-tk021.ocn.ad.jp version.bind chaos txt
; <<>> DiG 8.2 <<>> @ns-tk021.ocn.ad.jp version.bind chaos txt
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUERY SECTION: ;; version.bind, type = TXT, class = CHAOS ;; ANSWER SECTION: VERSION.BIND. 0S CHAOS TXT "4.9.7-REL" ;; Total query time: 81 msec ;; FROM: velocity to SERVER: ns-tk021.ocn.ad.jp 203.139.160.103 ;; WHEN: Tue May 9 17:26:23 2000 ;; MSG SIZE sent: 30 rcvd: 64 % system configuration % /usr/platform/`uname -i`/sbin/prtdiag System Configuration: Sun Microsystems sun4u 8-slot Sun Enterprise 4000/5000 System clock frequency: 82 MHz Memory size: 512Mb ========================= CPUs ========================= Run Ecache CPU CPU Brd CPU Module MHz MB Impl. Mask --- --- ------- ----- ------ ------ ---- 0 0 0 248 2.0 US-II 1.1 0 1 1 248 2.0 US-II 1.1 2 4 0 248 2.0 US-II 1.1 2 5 1 248 2.0 US-II 1.1 ========================= Memory ========================= Intrlv. Intrlv. Brd Bank MB Status Condition Speed Factor With --- ----- ---- ------- ---------- ----- ------- ------- 0 0 256 Active OK 60ns 2-way A 2 0 256 Active OK 60ns 2-way A ========================= IO Cards ========================= Bus Freq Brd Type MHz Slot Name Model --- ---- ---- ---- -------------------------------- ---------------------- 1 SBus 25 3 SUNW,hme 1 SBus 25 3 SUNW,fas/sd (block) 1 SBus 25 13 SUNW,soc/SUNW,pln 501-2069 5 SBus 25 3 SUNW,hme 5 SBus 25 3 SUNW,fas/sd (block) 5 SBus 25 13 SUNW,soc/SUNW,pln 501-2069 Detached Boards =============== Slot State Type Info ---- --------- ------ ----------------------------------------- 3 disabled disk Disk 0: Target: 10 Disk 1: Target: 11 7 disabled disk Disk 0: Target: 14 Disk 1: Target: 15 No failures found in System =========================== No System Faults found ====================== %

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com