sftp error ld.so.1: sftp: fatal: libgcc_s.so.1: open failed: No such file or directory

Tuesday, December 21, 2010 at 12:08 AM
sftp Error message

#sftp
ld.so.1: sftp: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed
#

ldd utility lists the dynamic dependencies of executable files

#ldd /local/opt/SSH/product/4.3p2/sbin/sshd
libpam.so.1 => /usr/lib/libpam.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libcrypto.so.0.9.8 => /usr/local/lib/libcrypto.so.0.9.8
librt.so.1 => /usr/lib/librt.so.1
libz.so => /usr/lib/libz.so
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libgcc_s.so.1 => (file not found)
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libscf.so.1 => /usr/lib/libscf.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libm.so.2 => /usr/lib/libm.so.2
/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-880/lib/libmd5_psr.so.1
#

symbolic link (/usr/local/lib/libgcc_s.so.1) is missing and not pointing to source
path /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1.


#ls -l /usr/local/lib/libgcc_s.so.1
usr/local/lib/libgcc_s.so.1: No such file or directory
#

Create symbolic link

#ln -s /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1 /usr/local/lib/libgcc_s.so.1


# ls -l /usr/local/lib/libgcc_s.so.1
lrwxrwxrwx 1 root root 46 Dec 21 08:40 /usr/local/lib/libgcc_s.so.1 -> /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1
#

Verify the dynamic dependencies of executable files

#ldd /local/opt/SSH/product/4.3p2/sbin/sshd
libpam.so.1 => /usr/lib/libpam.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libcrypto.so.0.9.8 => /usr/local/lib/libcrypto.so.0.9.8
librt.so.1 => /usr/lib/librt.so.1
libz.so => /usr/lib/libz.so
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libscf.so.1 => /usr/lib/libscf.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libm.so.2 => /usr/lib/libm.so.2
/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-880/lib/libmd5_psr.so.1
/#

#sftp
usage: sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]
[-o ssh_option] [-P sftp_server_path] [-R num_requests]
[-S program] [-s subsystem | sftp_server] host
sftp [[user@]host[:file [file]]]
sftp [[user@]host[:dir[/]]]
sftp -b batchfile [user@]host
#

#sftp node2
Connecting to node2...
exec: /usr/local/bin/ssh: No such file or directory
Connection closed
#

#ls -l /usr/local/bin/ssh
/usr/local/bin/ssh: No such file or directory
#

checked the location of the ssh binary

#which scp ssh
/local/opt/SSH/product/4.3p2/bin/scp
/usr/local/bin/ssh
#

The easy workaround is to make /usr/local/bin/ssh a valid path. created symbolic link (/usr/local/bin/ssh) pointing to the source path.

#ln -s /local/opt/SSH/product/4.3p2/bin/ssh /usr/local/bin/ssh

#ls -la /usr/local/bin/ssh
lrwxrwxrwx 1 root root 36 Dec 21 08:40 /usr/local/bin/ssh -> /local/opt/SSH/product/4.3p2/bin/ssh
#

#sftp node2
Connecting to node1...
The authenticity of host 'node1 (192.168.1.3)' can't be established.
RSA key fingerprint is 6a:51:92:3a:4e:07:8d:dc:01:e8:63:10:e5:45:46:a5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2,192.168.1.3' (RSA) to the list of known hosts.
root@node1's password:
sftp>

Adding EMC disk and Increasing the Cluster 3.0 file system (Veritas volume manager)

Friday, December 17, 2010 at 5:22 AM
Adding EMC disk and Increasing the Cluster 3.0 file system (Veritas volume manager)

- Check the disk is declared in /kernel/drv/sd.conf - On both nodes.

- Perform the LUN masking for both nodes from the SAN admin

WARNING: Select the correct Storage system, FA port and Volume ID !

(For instance:
STORAGE SYSTEM: …2683
FA PORT: 3BB
Volume ID: 024 [ ie 36 in decimal ] )

- Tick the boxes for node1 and node2, for each adapter (HBA).

- Do NOT forget, for each Symmetrix to do:
“Masking”/ “VCMDB Management”/ “Make active”.


#devfsadm - On node #1

When finished:

#devfsadm - On node #2

#scdidadm –L | grep tXdY
(X = SYMM number. Y = LUN number)
DID devices are not seen yet.

#scgdevs - On node #1

When terminated, enter the following command on node#2

# ps –ef | grep scgdevs

Wait for this process to be terminated before going to next step !

# scdidadm –L | grep tXdY
DID devices are now seen.

“# format” | grep tXdY - On both nodes
+ Enter “Control D” to exit the format command.

Check that the disk is seen on both nodes !

# format => to “label” the disk, and check that its size is correct – On one node

PowerPath commands: On both nodes

# powermt display dev=all | grep tXdY (new device is not visible yet)
# powercf –q (or –i for interactive)
# powermt config
# powermt display dev=all | grep tXdY (new device is now visible)


# vxdisk -o alldgs list | grep tXdY
(X = SYMM number. Y = LUN number)
new device is not yet visible by VxVM.

# vxdctl enable => On both nodes

# vxdisk -o alldgs list | grep tXdY
Only one controller is seen as PowerPath only shows one controller.
Check that the disk is in “error” state ! (Otherwise, this means that this disk could be in use !)

No action required regarding DMP.

(With PowerPath 3.0.3, DMP has to stay enabled. In previous version of PowerPath, DMP had to be disabled)

Configure the disks that will be in the new Disk Group for use with VERITAS Volume

Manager: => On one node.

node1# /etc/vx/bin/vxdisksetup -i c3t9d120 format=sliced
node1# /etc/vx/bin/vxdisksetup -i c3t9… (continue for other disks of SYMM9)
node1# /etc/vx/bin/vxdisksetup -i c3t11d131 format=sliced
node1# /etc/vx/bin/vxdisksetup -i c3t11… (continue for other disks of SYMM11)


To add disks in the DG, use the following command lines:

This is an example given for a Disk Group “DG_name”, made up of a mirrored Logical Volume “Volume_name”.

Add the DG disks for SYMM09: => On one node !

sym11
node1#vxdg -g DG_name adddisk DG_name_m_08=emcpower553
node1#vxdg -g DG_name adddisk DG_name_m_09=emcpower558
node1#vxdg -g DG_name adddisk DG_name_m_10=emcpower557

Add the DG disks for SYMM11: => On one node !

sym19
node1#vxdg -g DG_name adddisk DG_name_08=emcpower554
node1#vxdg -g DG_name adddisk DG_name_09=emcpower555
node1#vxdg -g DG_name adddisk DG_name_10=emcpower556


node1# vxprint –g DG_name (Check the DG configuration)

node1# scconf -c -D name=DG_name,sync


For every added disk in the Disk Group, declare the disk in NOHOTUSE mode:

node1#vxedit -g DG_name set nohotuse=on DG_name_m_08
node1#vxedit -g DG_name set nohotuse=on DG_name_m_09
node1#vxedit -g DG_name set nohotuse=on DG_name_m_10

node1#vxedit -g DG_name set nohotuse=on DG_name_08
node1#vxedit -g DG_name set nohotuse=on DG_name_09
node1#vxedit -g DG_name set nohotuse=on DG_name_10


node1# vxprint –g DG_name (Check the DG configuration)

node1# scconf -c -D name=DG_name,sync


In this example, we want to grow the logical volume volume_name by 50 gigabytes (i.e. add 2 disks of 50 gigabytes).


node1:root> df -k /filesystem
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/DG_name/volume_name
10268396 8923420 1252376 88% /filesystem
node1:root>

Get the really size of the disk:

node1:root> vxassist -g DG_name maxsize layout=mirror
Maximum volume size: 33607680 (16410Mb)
node1:root>

node1:root> vxdisk -g DG_name list DG_name_m_08 | grep public
public: slice=4 offset=0 len=8380800 disk_offset=3840
node1:root>


Associate subdisk to the disks:

sym11
node1#vxmake -g DG_name sd DG_name_m_08-01 DG_name_m_08,0,8380800
node1#vxmake -g DG_name sd DG_name_m_09-01 DG_name_m_09,0,4190400

sym19
node1#vxmake -g DG_name sd DG_name_08-01 DG_name_08,0,8380800
node1#vxmake -g DG_name sd DG_name_09-01 DG_name_09,0,4190400


Associate the subdisk to the existing plex volume_name-04 and volume_name-01:

node1#vxsd -g DG_name assoc volume_name-01 DG_name_m_08-01
node1#vxsd -g DG_name assoc volume_name-01 DG_name_m_09-01

node1#vxsd -g DG_name assoc volume_name-04 DG_name_08-01
node1#vxsd -g DG_name assoc volume_name-04 DG_name_09-01

Grow the FS and volume to the required size:

node1#vxresize -F ufs -g DG_name volume_name +12571200

node1:root> df -k /u663
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/DG_name/volume_name
16455210 8929556 7433054 55% /u663
node1:root>

v volume_name fsgen ENABLED 33434176 - ACTIVE - -
pl volume_name-01 volume_name ENABLED 33434880 - ACTIVE - -
sd DG_name_m_05-01 volume_name-01 ENABLED 8380800 0 - - -
sd DG_name_m_06-01 volume_name-01 ENABLED 8380800 8380800 - - -
sd DG_name_m_07-01 volume_name-01 ENABLED 2053440 16761600 - - -
sd DG_name_m_01-02 volume_name-01 ENABLED 2048640 18815040 - - -
sd DG_name_m_08-01 volume_name-01 ENABLED 8380800 20863680 - - -
sd DG_name_m_09-01 volume_name-01 ENABLED 4190400 29244480 - - -
pl volume_name-02 volume_name ENABLED LOGONLY - ACTIVE - -
sd DG_name_05-05 volume_name-02 ENABLED 64 LOG - - -
pl volume_name-04 volume_name ENABLED 33434880 - ACTIVE - -
sd DG_name_05-01 volume_name-04 ENABLED 8378880 0 - - -
sd DG_name_02-02 volume_name-04 ENABLED 2047680 8378880 - - -
sd DG_name_06-01 volume_name-04 ENABLED 8380800 10426560 - - -
sd DG_name_02-03 volume_name-04 ENABLED 7680 18807360 - - -
sd DG_name_01-02 volume_name-04 ENABLED 2048640 18815040 - - -
sd DG_name_08-01 volume_name-04 ENABLED 8380800 20863680 - - -
sd DG_name_09-01 volume_name-04 ENABLED 4190400 29244480 - - -


When finished:

• Check that the DG has the proper configuration (mirroring between SYMM9 and SYMM11):

node1# vxprint -g DG_name

• check that the filesystem has been increased by the right size:

node1# df -k /filesystem

• Resync the Cluster DG:

node1# scconf -c -D name=DG_name,sync

#scgdevs - On node #1

When terminated, enter the following command on node #2:

#ps –ef | grep scgdevs
Wait for this process to be terminated before going to next step.

Configuring NEW LUNs:

Sunday, December 5, 2010 at 12:20 AM
egrep 'qlc|WWN' /var/adm/messages
mpathadm list lu

# format < /dev/null
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c506b2fca,0
1. c1t1d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c506b39cf,0
Specify disk (enter its number):

# cfgadm -o show_FCP_dev -al
Ap_Id Type Receptacle Occupant Condition
c1 fc-private connected configured unknown
c1::2100000c506b2fca,0 disk connected configured unknown
c1::2100000c506b39cf,0 disk connected configured unknown
c3 fc-fabric connected unconfigured unknown

spdma501:# cfgadm -c configure c3
Nov 16 17:32:25 spdma501 last message repeated 54 times
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,48 (ssd2):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,47 (ssd3):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,46 (ssd4):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,45 (ssd5):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,44 (ssd6):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,43 (ssd7):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,42 (ssd8):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,41 (ssd9):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number
Nov 16 17:32:26 spdma501 scsi: WARNING: /pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,40 (ssd10):
Nov 16 17:32:26 spdma501 corrupt label - wrong magic number

spdma501:# cfgadm -c configure c5
Nov 16 17:32:55 spdma501 last message repeated 5 times
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,48 (ssd14):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,47 (ssd15):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,46 (ssd16):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,45 (ssd17):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,44 (ssd18):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,43 (ssd19):
Nov 16 17:32:59 spdma501 corrupt label - wrong magic number
Nov 16 17:32:59 spdma501 scsi: WARNING: /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50060482ccaae5bc,42 (ssd20):

c3t50060482CCAAE5A3d61: configured with capacity of 17.04GB
c3t50060482CCAAE5A3d62: configured with capacity of 17.04GB
c3t50060482CCAAE5A3d63: configured with capacity of 17.04GB
c3t50060482CCAAE5A3d64: configured with capacity of 17.04GB
c3t50060482CCAAE5A3d65: configured with capacity of 17.04GB


AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c506b2fca,0
1. c1t1d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c506b39cf,0
2. c3t50060482CCAAE5A3d61
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,3d
3. c3t50060482CCAAE5A3d62
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,3e
4. c3t50060482CCAAE5A3d63
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,3f
5. c3t50060482CCAAE5A3d64
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,40
6. c3t50060482CCAAE5A3d65
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,41
7. c3t50060482CCAAE5A3d66
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,42
8. c3t50060482CCAAE5A3d67
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,43
9. c3t50060482CCAAE5A3d68
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,44
10. c3t50060482CCAAE5A3d69
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,45
11. c3t50060482CCAAE5A3d70
/pci@8,700000/SUNW,qlc@2/fp@0,0/ssd@w50060482ccaae5a3,46
Specify disk (enter its number):

IF YOU DON'T SEE THE NEW LUNS IN FORMAT, RUN devfsadm !!!!

# /usr/sbin/devfsadm

Label the new disks !!!!

# cd /tmp

# cat format.cmd
label
quit

# for disk in `format < /dev/null 2> /dev/null | grep "^c" | cut -d: -f1`
do
format -s -f /tmp/format.cmd $disk
echo "labeled $disk ....."
done

SAN Stuff for Solaris

at 12:18 AM
To verify whether an HBA is connected to a fabric or not:
# /usr/sbin/luxadm -e port

Found path to 4 HBA ports

/devices/pci@1e,600000/SUNW,qlc@3/fp@0,0:devctl CONNECTED
/devices/pci@1e,600000/SUNW,qlc@3,1/fp@0,0:devctl NOT CONNECTED
/devices/pci@1e,600000/SUNW,qlc@4/fp@0,0:devctl CONNECTED
/devices/pci@1e,600000/SUNW,qlc@4,1/fp@0,0:devctl NOT CONNECTED



Your SAN administrator will ask for the WWNs for Zoning. Here are some steps I use to get that information:
# prtconf -vp | grep wwn
port-wwn: 210000e0.8b1d8d7d
node-wwn: 200000e0.8b1d8d7d
port-wwn: 210100e0.8b3d8d7d
node-wwn: 200000e0.8b3d8d7d
port-wwn: 210000e0.8b1eaeb0
node-wwn: 200000e0.8b1eaeb0
port-wwn: 210100e0.8b3eaeb0
node-wwn: 200000e0.8b3eaeb0


Or you may use fcinfo, if installed.
# fcinfo hba-port
HBA Port WWN: 210000e08b8600c8
OS Device Name: /dev/cfg/c11
Manufacturer: QLogic Corp.
Model: 375-3108-xx
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200000e08b8600c8
HBA Port WWN: 210100e08ba600c8
OS Device Name: /dev/cfg/c12
Manufacturer: QLogic Corp.
Model: 375-3108-xx
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200100e08ba600c8
HBA Port WWN: 210000e08b86a1cc
OS Device Name: /dev/cfg/c5
Manufacturer: QLogic Corp.
Model: 375-3108-xx
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200000e08b86a1cc
HBA Port WWN: 210100e08ba6a1cc
OS Device Name: /dev/cfg/c6
Manufacturer: QLogic Corp.
Model: 375-3108-xx
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200100e08ba6a1cc



Here are some commands you can use for QLogic Adapters:
# modinfo | grep qlc
76 7ba9e000 cdff8 282 1 qlc (SunFC Qlogic FCA v20060630-2.16)

# prtdiag | grep qlc
pci 66 PCI5 SUNW,qlc-pci1077,2312 (scsi-+
okay /ssm@0,0/pci@18,600000/SUNW,qlc@1
pci 66 PCI5 SUNW,qlc-pci1077,2312 (scsi-+
okay /ssm@0,0/pci@18,600000/SUNW,qlc@1,1
pci 33 PCI2 SUNW,qlc-pci1077,2312 (scsi-+
okay /ssm@0,0/pci@19,700000/SUNW,qlc@1
pci 33 PCI2 SUNW,qlc-pci1077,2312 (scsi-+
okay /ssm@0,0/pci@19,700000/SUNW,qlc@1,1

# luxadm qlgc

Found Path to 4 FC100/P, ISP2200, ISP23xx Devices

Opening Device: /devices/ssm@0,0/pci@19,700000/SUNW,qlc@1,1/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter Driver: 1.14.09 03/08/04

Opening Device: /devices/ssm@0,0/pci@19,700000/SUNW,qlc@1/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter Driver: 1.14.09 03/08/04

Opening Device: /devices/ssm@0,0/pci@18,600000/SUNW,qlc@1,1/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter Driver: 1.14.09 03/08/04

Opening Device: /devices/ssm@0,0/pci@18,600000/SUNW,qlc@1/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter Driver: 1.14.09 03/08/04
Complete


# luxadm -e dump_map /devices/ssm@0,0/pci@19,700000/SUNW,qlc@1,1/fp@0,0:devctl
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 1f0112 0 5006048accab4f8d 5006048accab4f8d 0x0 (Disk device)
1 1f011f 0 5006048accab4e0d 5006048accab4e0d 0x0 (Disk device)
2 1f012e 0 5006048acc7034cd 5006048acc7034cd 0x0 (Disk device)
3 1f0135 0 5006048accb4fc0d 5006048accb4fc0d 0x0 (Disk device)
4 1f02ef 0 50060163306043b6 50060160b06043b6 0x0 (Disk device)
5 1f06ef 0 5006016b306043b6 50060160b06043b6 0x0 (Disk device)
6 1f0bef 0 5006016330604365 50060160b0604365 0x0 (Disk device)
7 1f19ef 0 5006016b30604365 50060160b0604365 0x0 (Disk device)
8 1f0e00 0 210100e08ba6a1cc 200100e08ba6a1cc 0x1f (Unknown Type,Host Bus Adapter)


# prtpicl -v
.
.
SUNW,qlc (scsi-fcp, 7f0000066b) <--- go to qLogic website to get model number
:_fru_parent (7f0000dc86H)
:DeviceID 0x1
:UnitAddress 1
:vendor-id 0x1077
:device-id 0x2312
:revision-id 0x2
:subsystem-vendor-id 0x1077
:subsystem-id 0x10a
:min-grant 0x40
:max-latency 0
:cache-line-size 0x10
:latency-timer 0x40

To Determine what HBA is installed in a Solaris server

at 12:03 AM
The prtpicl command outputs information to accurately determine the make and model of an HBA.

The QLogic HBAs have a PCI identifier of 1077. Search through the output from the command prtpicl -v for the number 1077. A section displays similar to the following:

QLGC,qla (scsi, 44000003ac)
:DeviceID 0x4
:UnitAddress 4
:vendor-id 0x1077
:device-id 0x2300
:revision-id 0x1
:subsystem-vendor-id 0x1077
:subsystem-id 0x9
:min-grant 0x40
:max-latency 0
:cache-line-size 0x10
:latency-timer 0x40

The subsystem-ID value determines the model of HBA. Reference this chart to determine the model of HBA:


Vendor HBA model VendorID DeviceID SubsysVendorID Subsys Device ID
QLogic QCP2340 1077 2312 1077 109
QLogic QLA200 1077 6312 1077 119
QLogic QLA210 1077 6322 1077 12F
QLogic QLA2300/QLA2310 1077 2310 1077 9
QLogic QLA2340 1077 2312 1077 100
QLogic QLA2342 1077 2312 1077 101
QLogic QLA2344 1077 2312 1077 102
QLogic QLE2440 1077 2422 1077 145
QLogic QLA2460 1077 2422 1077 133
QLogic QLA2462 1077 2422 1077 134
QLogic QLE2360 1077 2432 1077 117
QLogic QLE2362 1077 2432 1077 118
QLogic QLE2440 1077 2432 1077 147
QLogic QLE2460 1077 2432 1077 137
QLogic QLE2462 1077 2432 1077 138
QLogic QSB2340 1077 2312 1077 104
QLogic QSB2342 1077 2312 1077 105
Sun SG-XPCI1FC-QLC 1077 6322 1077 132
Sun 6799A 1077 2200A 1077 4082
Sun SG-XPCI1FC-QF2/x6767A 1077 2310 1077 106
Sun SG-XPCI2FC-QF2/x6768A 1077 2312 1077 10A
Sun X6727A 1077 2200A 1077 4083
Sun SG-XPCI1FC-QF4 1077 2422 1077 140
Sun SG-XPCI2FC-QF4 1077 2422 1077 141
Sun SG-XPCIE1FC-QF4 1077 2432 1077 142
Sun SG-XPCIE2FC-QF4 1077 2432 1077 143

HA NFS Sun Cluster Setup

Saturday, December 4, 2010 at 10:58 AM
HA NFS Sun Cluster Setup

Goal: dual-node NFS failover cluster that shares 2 concatenated SVM volumes

2 nodes (hostname: node1, node2) with installed Solaris 10 01/06, patches, Sun Cluster, NFS agent for Sun Cluster, VxFS
Both nodes are connected to the FC SAN storage, 8 storage LUNs are mapped to each node.

Configure SVM
On both nodes
Create the 25MB partition on the boot disk (s7)
Create the SVM database replica
metadb -afc 3 c0d0s7 (c0t0d0s7 on sparc)

On one node (node1)- Create disk sets :

metaset -s nfs1 -a -h node1 node2
metaset -s nfs1 -t -f
metaset -s nfs1 -a /dev/did/rdsk/d2 /dev/did/rdsk/d3 /dev/did/rdsk/d4 /dev/did/rdsk/d5
metainit -s nfs1 d1 4 1 /dev/did/rdsk/d2s0 1 /dev/did/rdsk/d3s0 1 /dev/did/rdsk/d4s0 1 /dev/did/rdsk/d5s0
metastat -s nfs1 -p >> /etc/lvm/md.tab
metaset -s nfs2 -a -h node2 node1
metaset -s nfs2 -t -f
metaset -s nfs2 -a /dev/did/rdsk/d6 /dev/did/rdsk/d7 /dev/did/rdsk/d8 /dev/did/rdsk/d9
metainit -s nfs2 d1 4 1 /dev/did/rdsk/d6s0 1 /dev/did/rdsk/d7s0 1 /dev/did/rdsk/d8s0 1 /dev/did/rdsk/d9s0
metastat -s nfs2 -p >> /etc/lvm/md.tab
scp /etc/lvm/md.tab node2:/tmp/md.tab
ssh node2 'cat /tmp/md.tab >> /etc/lvm/md.tab'

- Create VxFS on shared devices

mkfs -F vxfs /dev/md/nfs1/rdsk/d1
mkfs -F vxfs /dev/md/nfs2/rdsk/d1

On both nodes - Create the directories

mkdir -p /global/nfs1
mkdir -p /global/nfs2

- Add the mount entries to the vfstab file

cat >> /etc/vfstab << EOF
/dev/md/nfs1/dsk/d1 /dev/md/nfs1/rdsk/d1 /global/nfs1 vxfs 2 no noatime
/dev/md/nfs2/dsk/d1 /dev/md/nfs2/rdsk/d1 /global/nfs2 vxfs 2 no noatime
EOF
(mount-at-boot "no" because we'll use the HAStoragePlus resource type)

- Add logical hostnames :

cat >> /etc/hosts << EOF
10.1.1.1 log-name1
10.1.1.2 log-name2
EOF

On one node (node1)- Mount metavolumes and create the PathPrefix directories

mount /global/nfs1
mount /global/nfs2

mkdir -p /global/nfs1/share
mkdir -p /global/nfs2/share

Configure HA NFS On one node (node1) - Register resource types :

scrgadm -a -t SUNW.HAStoragePlus
scrgadm -a -t SUNW.nfs

- Create failover resource groups :

scrgadm -a -g nfs-rg1 -h node1,node2 -y PathPrefix=/global/nfs1 -y Failback=true
scrgadm -a -g nfs-rg2 -h node2,node1 -y PathPrefix=/global/nfs2 -y Failback=true

- Add logical hostname resources to the resource groups :

scrgadm -a -j nfs-lh-rs1 -L -g nfs-rg1 -l log-name1
scrgadm -a -j nfs-lh-rs2 -L -g nfs-rg2 -l log-name2

- Create dfstab file for each NFS resource :

mkdir -p /global/nfs1/SUNW.nfs /global/nfs1/share
mkdir -p /global/nfs2/SUNW.nfs /global/nfs2/share
echo 'share -F nfs -o rw /global/nfs1/share' > /global/nfs1/SUNW.nfs/dfstab.share1
echo 'share -F nfs -o rw /global/nfs2/share' > /global/nfs2/SUNW.nfs/dfstab.share2

- Configure device groups :

scconf -c -D name=nfs1,nodelist=node1:node2,failback=enabled
scconf -c -D name=nfs2,nodelist=node2:node1,failback=enabled

- Create HAStoragePlus resources :

scrgadm -a -j nfs-hastp-rs1 -g nfs-rg1 -t SUNW.HAStoragePlus -x FilesystemMountPoints=/global/nfs1 -x AffinityOn=True
scrgadm -a -j nfs-hastp-rs2 -g nfs-rg2 -t SUNW.HAStoragePlus -x FilesystemMountPoints=/global/nfs2 -x AffinityOn=True

- Share :

share -F nfs -o rw /global/nfs1/share
share -F nfs -o rw /global/nfs2/share

- Bring the groups online :

scswitch -Z -g nfs-rg1
scswitch -Z -g nfs-rg2

- Create NFS resources :

scrgadm -a -j share1 -g nfs-rg1 -t SUNW.nfs -y Resource_dependencies=nfs-hastp-rs1
scrgadm -a -j share2 -g nfs-rg2 -t SUNW.nfs -y Resource_dependencies=nfs-hastp-rs2

- Change the probe interval for each NFS resource to a different value so each probe runs
at at different time (see InfoDoc 84817) :

scrgadm -c -j share1 -y Thorough_probe_interval=130
scrgadm -c -j share2 -y Thorough_probe_interval=140

- Change the number of NFS threads - on each node edit the file /opt/SUNWscnfs/bin/nfs_start_daemons -
instead of
DEFAULT_NFSDCMD="/usr/lib/nfs/nfsd -a 16"
put
DEFAULT_NFSDCMD="/usr/lib/nfs/nfsd -a 1024"

- Enable NFS resources :

scswitch -e -j share1
scswitch -e -j share2
scswitch -e -j share3
scswitch -e -j share4

- Switch resource groups to check the cluster :

scswitch -z -h node2 -g nfs-rg1
scswitch -z -h node2 -g nfs-rg2
scswitch -z -h node1 -g nfs-rg1
scswitch -z -h node1 -g nfs-rg2
scswitch -z -h node2 -g nfs-rg2
________________________________________
Configure IPMP On the node node1

cat > /etc/hostname.bge0 << eof
node1 netmask + broadcast + group sc_ipmp0 up \
addif 10.1.1.5 netmask + broadcast + -failover -standby deprecated up
eof
cat > /etc/hostname.bge1 << eof
10.1.1.6 netmask + broadcast + group sc_ipmp0 -failover -standby deprecated up
eof

On the node node2

cat > /etc/hostname.bge0 << eof
node2 netmask + broadcast + group sc_ipmp0 up \
addif 10.1.1.7 netmask + broadcast + -failover -standby deprecated up
eof
cat > /etc/hostname.bge1 << eof
10.1.1.8 netmask + broadcast + group sc_ipmp0 -failover -standby deprecated up
eof
________________________________________

Configure XNTP

On the node node1
Edit /etc/inet/ntp.conf.cluster
________________________________________
Fix according to InfoDoc 85773 :
Replace the "exit 0" line in /etc/rc2.d/S77scpostconfig.sh with "return"
________________________________________

Patches:
sparc x86 Description
120500-06
120501-06
Sun Cluster 3.1: Core Patch for Solaris 10
119374-13
119375-13
SunOS 5.10: sd and ssd patch
119130-16
119131-16
SunOS 5.10: Sun Fibre Channel Device Drivers
119715-10
119716-10
SunOS 5.10: scsi_vhci driver patch
120182-02
120183-02
SunOS 5.10: Sun Fibre Channel Host Bus Adapter Library
120222-08
120223-07
SunOS 5.10: Emulex-Sun LightPulse Fibre Channel Adapter driver
119302-02
120111-02
VRTSvxfs 4.1MP1: Maintenance Patch for File System 4.1

VXVM recover volume (I/O error)

Friday, December 3, 2010 at 10:20 AM
Plex I/O error Volume Recover

# vxmend -o force off
# vxmend on
# vxmend fix clean
# vxvol start

Meaning of the “Fault LED” in amber

Wednesday, December 1, 2010 at 11:04 PM
Meaning of the “Fault LED” in amber.

When the Fault LED flashes on and off, a problem has occurred that is fatal to the
server. Circumstances that cause the Fault LED to flash include the following:
n The speed of one of the fans inside the server is too low.
n The temperature inside the server’s enclosure is too high. (By default, this
causes the server to shut down. For information about configuring the server
not to shut down in this condition, see Appendix C.)
n The voltage on one of the server’s output supply rails is too high. (By default,
this causes the server to shut down. For information about configuring the
server not to shut down in this condition, see Appendix C.)
n The temperature inside the CPU is too high. (This causes the server to shut
down.)

Domain snapshot in xscf console

Monday, September 6, 2010 at 7:10 AM
XSCF> snapshot -L F -t root@node:/var/test
Downloading Public Key from 'node'...
Public Key Fingerprint: 0a:33:18:87:73:4b:3b:47:5e:b9:0b:9a:59:10:7e:10
Accept this public key (yes/no)? yes
Enter ssh password for user 'root' on host 'node':
Setting up ssh connection to root@node...
Collecting data into root@node:/var/test/nodersc_44.191.122.26_2010-09-06T13-25-32.zip
Data collection complete
XSCF>

Change the savecore path and take the dump file from dump device

Wednesday, September 1, 2010 at 8:22 AM
server is PANIC but crash file is not created but crash dumped in the dump device. this procedure will explain how to save the file from dump device to savecore path
node1:/root# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c1t0d0s1 (dedicated)
Savecore directory: /var/crash/node1
Savecore enabled: yes
node1:/root#


node1:/root# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 31G 72K 31G 1% /tmp
node1:/root# mkdir -p /tmp/node1


node1:/root# dumpadm -s /tmp/node1
Dump content: kernel pages
Dump device: /dev/dsk/c1t0d0s1 (dedicated)
Savecore directory: /tmp/node1
Savecore enabled: yes


node1:/root# savecore -dv
System dump time: Mon Aug 30 12:37:53 2010
Constructing namelist /tmp/node1/unix.0
Constructing corefile /tmp/node1/vmcore.0
100% done: 263253 of 263253 pages saved
node1:/root#


node1:/root# ls -l /tmp/node1
total 4266032
-rw-r--r-- 1 root root 2 Sep 1 13:40 bounds
-rw-r--r-- 1 root root 2266738 Sep 1 13:39 unix.0
-rw-r--r-- 1 root root 2181931008 Sep 1 13:40 vmcore.0
node1:/root# dumpadm -s /var/crash/node1
Dump content: kernel pages
Dump device: /dev/dsk/c1t0d0s1 (dedicated)
Savecore directory: /var/crash/node1
Savecore enabled: yes
node1:/root#

zpool Mirror state FAULTED and REMOVED state

Tuesday, August 31, 2010 at 11:26 PM
Clear FAULTED issue in the zpool

# zpool status
pool: pool
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
pool DEGRADED 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d14 FAULTED 2 151 0 too many errors
c5t50060E8005707711d14 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d15 FAULTED 0 179 0 too many errors
c5t50060E8005707711d15 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d16 FAULTED 0 182 0 too many errors
c5t50060E8005707711d16 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d17 FAULTED 0 171 0 too many errors
c5t50060E8005707711d17 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d18 REMOVED 0 0 0
c5t50060E8005707711d18 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d19 REMOVED 0 0 0
c5t50060E8005707711d19 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d20 REMOVED 0 0 0
c5t50060E8005707711d20 ONLINE 0 0 0

errors: No known data errors
bash-3.00#

The below command will clear the faulty error

#zpool clear


bash-3.00# zpool status
pool: pool
state: DEGRADED
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
pool DEGRADED 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d14 ONLINE 0 0 0
c5t50060E8005707711d14 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d15 ONLINE 0 0 0
c5t50060E8005707711d15 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d16 ONLINE 0 0 0
c5t50060E8005707711d16 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d17 ONLINE 0 0 0
c5t50060E8005707711d17 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d18 REMOVED 0 0 0
c5t50060E8005707711d18 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d19 REMOVED 0 0 0
c5t50060E8005707711d19 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t50060E8005707700d20 REMOVED 0 0 0
c5t50060E8005707711d20 ONLINE 0 0 0

errors: No known data errors
bash-3.00#

Some time SAN storage disk will loss the connection and back to online but in the ZFS pool it shows REMOVED state. Clear the removed error with detaching and reattching the zpool disks

bash-3.00# zpool detach pool c1t50060E8005707700d18
bash-3.00#

bash-3.00# zpool attach pool c5t50060E8005707711d18 c1t50060E8005707700d18


bash-3.00# zpool status
pool: pool
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Wed Sep 1 06:59:02 2010
config:

NAME STATE READ WRITE CKSUM
pool ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d14 ONLINE 0 0 0
c5t50060E8005707711d14 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d15 ONLINE 0 0 0
c5t50060E8005707711d15 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d16 ONLINE 0 0 0
c5t50060E8005707711d16 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d17 ONLINE 0 0 0
c5t50060E8005707711d17 ONLINE 0 0 0
mirror ONLINE 0 0 0
c5t50060E8005707711d18 ONLINE 0 0 0
c1t50060E8005707700d18 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d19 ONLINE 0 0 0
c5t50060E8005707711d19 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t50060E8005707700d20 ONLINE 0 0 0
c5t50060E8005707711d20 ONLINE 0 0 0

errors: No known data errors
bash-3.00#

Script to grep hme settings via ndd

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

#Set a tmpfile
TMPFILE=hmegrep.txt

echo "Running hmegrep 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 "hmegrep 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 hme stuff

echo "hme settings..." >>$TMPFILE 2>&1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

echo Check current directory for hmegrep.txt file!

Script to grep ce settings via ndd

at 10:04 PM
#! /bin/ksh
# cegrep version 0.0.1 - grep ce settings via ndd.
# o_|/ borked ce!
# 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=cegrep.txt

echo "Running cegrep script........"

# Got root?
# o_|/ shrink!
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 "cegrep 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 ce stuff

echo "ce settings..." >>$TMPFILE 2>&1

# check available modules
echo "available modules" >>$TMPFILE 2>&1
ndd -get /dev/ce \? >>$TMPFILE 2>&1

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

echo "ndd -get /dev/ce enable_ipg0" >>$TMPFILE 2>&1
ndd -get /dev/ce enable_ipg0 >>$TMPFILE 2>&1

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

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

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

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

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

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

echo "ndd -get /dev/ce adv_1000fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_1000fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/ce adv_1000hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_1000hdx_cap >>$TMPFILE 2>&1

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

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

echo "ndd -get /dev/ce adv_10fdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_10fdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/ce adv_10hdx_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_10hdx_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/ce adv_asmpause_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_asmpause_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/ce adv_pause_cap" >>$TMPFILE 2>&1
ndd -get /dev/ce adv_pause_cap >>$TMPFILE 2>&1

echo "ndd -get /dev/ce master_cfg_enable" >>$TMPFILE 2>&1
ndd -get /dev/ce master_cfg_enable >>$TMPFILE 2>&1

echo "ndd -get /dev/ce master_cfg_value" >>$TMPFILE 2>&1
ndd -get /dev/ce master_cfg_value >>$TMPFILE 2>&1

echo "ndd -get /dev/ce rx_intr_pkts" >>$TMPFILE 2>&1
ndd -get /dev/ce rx_intr_pkts >>$TMPFILE 2>&1

echo "ndd -get /dev/ce rx_intr_time" >>$TMPFILE 2>&1
ndd -get /dev/ce rx_intr_time >>$TMPFILE 2>&1

echo "ndd -get /dev/ce red_dv4to6k" >>$TMPFILE 2>&1
ndd -get /dev/ce red_dv4to6k >>$TMPFILE 2>&1

echo "ndd -get /dev/ce red_dv6to8k" >>$TMPFILE 2>&1
ndd -get /dev/ce red_dv6to8k >>$TMPFILE 2>&1

echo "ndd -get /dev/ce red_dv8to10k" >>$TMPFILE 2>&1
ndd -get /dev/ce red_dv8to10k >>$TMPFILE 2>&1

echo "ndd -get /dev/ce red_dv10to12k" >>$TMPFILE 2>&1
ndd -get /dev/ce red_dv10to12k >>$TMPFILE 2>&1

echo "ndd -get /dev/ce tx_dma_weight" >>$TMPFILE 2>&1
ndd -get /dev/ce tx_dma_weight >>$TMPFILE 2>&1

echo "ndd -get /dev/ce infinite_burst" >>$TMPFILE 2>&1
ndd -get /dev/ce infinite_burst >>$TMPFILE 2>&1

echo "ndd -get /dev/ce disable_64bit" >>$TMPFILE 2>&1
ndd -get /dev/ce disable_64bit >>$TMPFILE 2>&1


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

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

echo Check current directory for cegrep.txt file!

Script to grep tcp/ip/udp/icmp settings via ndd

at 10:02 PM
#! /bin/ksh
# nddgrep version 0.0.5 - grep tcp/ip/udp/icmp settings via ndd.
# March 28 2003 Sam Nelson
# As usual, not clever or efficient, but quick, dirty and effective.
# tested on Solaris 8 and 9, works ok-ish on 7, 2.6.
# I've moved companies! updated scripts will now be available at http://www.unix.ms

#Set a tmpfile
TMPFILE=nddgrep.txt

echo "Running nddgrep script v0.0.5 Sam Nelson ........"
echo "nddgrep output - for latest version see http://www.unix.ms" >$TMPFILE
# Get uname (useful!)

echo "nddgrep report for host:" >>$TMPFILE
/usr/bin/uname -a >>$TMPFILE

# Get basic TCP / UDP info
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 IP stuff

echo "IP settings" >>$TMPFILE

echo /dev/ip/ ip_respond_to_address_mask_broadcast >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_respond_to_address_mask_broadcast >>$TMPFILE 2>&1

echo /dev/ip/ ip_respond_to_echo_broadcast >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_respond_to_echo_broadcast >>$TMPFILE 2>&1

echo /dev/ip/ ip_respond_to_timestamp >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_respond_to_timestamp >>$TMPFILE 2>&1

echo /dev/ip/ ip_respond_to_timestamp_broadcast >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_respond_to_timestamp_broadcast >>$TMPFILE 2>&1

echo /dev/ip/ ip_send_redirects >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_send_redirects >>$TMPFILE 2>&1

echo /dev/ip/ ip_forward_directed_broadcasts >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_forward_directed_broadcasts >>$TMPFILE 2>&1

echo /dev/ip/ ip_debug >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_debug >>$TMPFILE 2>&1

echo /dev/ip/ ip_mrtdebug >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_mrtdebug >>$TMPFILE 2>&1

echo /dev/ip/ ip_ire_timer_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ire_timer_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_ire_arp_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ire_arp_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_ire_redirect_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ire_redirect_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_def_ttl >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_def_ttl >>$TMPFILE 2>&1

echo /dev/ip/ ip_forward_src_routed >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_forward_src_routed >>$TMPFILE 2>&1

echo /dev/ip/ ip_wroff_extra >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_wroff_extra >>$TMPFILE 2>&1

echo /dev/ip/ ip_ire_pathmtu_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ire_pathmtu_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_icmp_return_data_bytes >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_icmp_return_data_bytes >>$TMPFILE 2>&1

echo /dev/ip/ ip_path_mtu_discovery >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_path_mtu_discovery >>$TMPFILE 2>&1

echo /dev/ip/ ip_ignore_delete_time >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ignore_delete_time >>$TMPFILE 2>&1

echo /dev/ip/ ip_ignore_redirect >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ignore_redirect >>$TMPFILE 2>&1

echo /dev/ip/ ip_output_queue >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_output_queue >>$TMPFILE 2>&1

echo /dev/ip/ ip_broadcast_ttl >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_broadcast_ttl >>$TMPFILE 2>&1

echo /dev/ip/ ip_icmp_err_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_icmp_err_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_icmp_err_burst >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_icmp_err_burst >>$TMPFILE 2>&1

echo /dev/ip/ ip_reass_queue_bytes >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_reass_queue_bytes >>$TMPFILE 2>&1

echo /dev/ip/ ip_strict_dst_multihoming >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_strict_dst_multihoming >>$TMPFILE 2>&1

echo /dev/ip/ ip_addrs_per_if >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_addrs_per_if >>$TMPFILE 2>&1

echo /dev/ip/ ipsec_override_persocket_policy >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipsec_override_persocket_policy >>$TMPFILE 2>&1

echo /dev/ip/ icmp_accept_clear_messages >>$TMPFILE 2>&1
ndd -get /dev/ip/ icmp_accept_clear_messages >>$TMPFILE 2>&1

echo /dev/ip/ igmp_accept_clear_messages >>$TMPFILE 2>&1
ndd -get /dev/ip/ igmp_accept_clear_messages >>$TMPFILE 2>&1

echo /dev/ip/ ip_ndp_delay_first_probe_time >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ndp_delay_first_probe_time >>$TMPFILE 2>&1

echo /dev/ip/ ip_ndp_max_unicast_solicit >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ndp_max_unicast_solicit >>$TMPFILE 2>&1

echo /dev/ip/ ip6_def_hops >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_def_hops >>$TMPFILE 2>&1

echo /dev/ip/ ip6_icmp_return_data_bytes >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_icmp_return_data_bytes >>$TMPFILE 2>&1

echo /dev/ip/ ip6_forwarding >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_forwarding >>$TMPFILE 2>&1

echo /dev/ip/ ip6_forward_src_routed >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_forward_src_routed >>$TMPFILE 2>&1

echo /dev/ip/ ip6_respond_to_echo_multicast >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_respond_to_echo_multicast >>$TMPFILE 2>&1

echo /dev/ip/ ip6_send_redirects >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_send_redirects >>$TMPFILE 2>&1

echo /dev/ip/ ip6_ignore_redirect >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_ignore_redirect >>$TMPFILE 2>&1

echo /dev/ip/ ip6_strict_dst_multihoming >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip6_strict_dst_multihoming >>$TMPFILE 2>&1

echo /dev/ip/ ip_ire_reclaim_fraction >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ire_reclaim_fraction >>$TMPFILE 2>&1

echo /dev/ip/ ipsec_policy_log_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipsec_policy_log_interval >>$TMPFILE 2>&1

echo /dev/ip/ pim_accept_clear_messages >>$TMPFILE 2>&1
ndd -get /dev/ip/ pim_accept_clear_messages >>$TMPFILE 2>&1

echo /dev/ip/ ip_ndp_unsolicit_interval >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ndp_unsolicit_interval >>$TMPFILE 2>&1

echo /dev/ip/ ip_ndp_unsolicit_count >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ndp_unsolicit_count >>$TMPFILE 2>&1

echo /dev/ip/ ip_forwarding >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_forwarding >>$TMPFILE 2>&1

echo /dev/ip/ ip_ill_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ill_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_ipif_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ipif_status >>$TMPFILE 2>&1

echo /dev/ip/ ipv4_ire_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipv4_ire_status >>$TMPFILE 2>&1

echo /dev/ip/ ipv4_mrtun_ire_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipv4_mrtun_ire_status >>$TMPFILE 2>&1

echo /dev/ip/ ipv4_srcif_ire_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipv4_srcif_ire_status >>$TMPFILE 2>&1

echo /dev/ip/ ipv6_ire_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ipv6_ire_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_ipc_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ipc_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_rput_pullups >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_rput_pullups >>$TMPFILE 2>&1

echo /dev/ip/ ip_enable_group_ifs >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_enable_group_ifs >>$TMPFILE 2>&1

echo /dev/ip/ ifgrp_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ifgrp_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_ndp_cache_report >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_ndp_cache_report >>$TMPFILE 2>&1

echo /dev/ip/ ip_proxy_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_proxy_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_srcid_status >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_srcid_status >>$TMPFILE 2>&1

echo /dev/ip/ ip_forwarding >>$TMPFILE 2>&1
ndd -get /dev/ip/ ip_forwarding >>$TMPFILE 2>&1


###Get TCP stuff

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

echo /dev/tcp/ tcp_time_wait_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_time_wait_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_conn_req_max_q >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_conn_req_max_q >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_conn_req_max_q0 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_conn_req_max_q0 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_conn_req_min >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_conn_req_min >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_conn_grace_period >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_conn_grace_period >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_cwnd_max >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_cwnd_max >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_debug >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_debug >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_smallest_nonpriv_port >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_smallest_nonpriv_port >>$TMPFILE 2>&1

echo /dev/tcp tcp_ip_abort_cinterval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ip_abort_cinterval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ip_abort_linterval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ip_abort_linterval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ip_abort_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ip_abort_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ip_notify_cinterval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ip_notify_cinterval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ip_notify_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ip_notify_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ipv4_ttl >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ipv4_ttl >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_keepalive_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_keepalive_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_maxpsz_multiplier >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_maxpsz_multiplier >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_mss_def_ipv4 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_mss_def_ipv4 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_mss_max_ipv4 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_mss_max_ipv4 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_mss_min >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_mss_min >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_naglim_def >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_naglim_def >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rexmit_interval_initial >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rexmit_interval_initial >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rexmit_interval_max >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rexmit_interval_max >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rexmit_interval_min >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rexmit_interval_min >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_deferred_ack_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_deferred_ack_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_snd_lowat_fraction >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_snd_lowat_fraction >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_sth_rcv_hiwat >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_sth_rcv_hiwat >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_sth_rcv_lowat >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_sth_rcv_lowat >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_dupack_fast_retransmit >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_dupack_fast_retransmit >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ignore_path_mtu >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ignore_path_mtu >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rcv_push_wait >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rcv_push_wait >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_smallest_anon_port >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_smallest_anon_port >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_largest_anon_port >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_largest_anon_port >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_xmit_hiwat >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_xmit_hiwat >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_xmit_lowat >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_xmit_lowat >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_recv_hiwat >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_recv_hiwat >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_recv_hiwat_minmss >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_recv_hiwat_minmss >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_fin_wait_2_flush_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_fin_wait_2_flush_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_co_min >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_co_min >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_max_buf >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_max_buf >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_strong_iss >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_strong_iss >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rtt_updates >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rtt_updates >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_wscale_always >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_wscale_always >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_tstamp_always >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_tstamp_always >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_tstamp_if_wscale >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_tstamp_if_wscale >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rexmit_interval_extra >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rexmit_interval_extra >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_deferred_acks_max >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_deferred_acks_max >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_slow_start_after_idle >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_slow_start_after_idle >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_slow_start_initial >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_slow_start_initial >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_co_timer_interval >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_co_timer_interval >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_sack_permitted >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_sack_permitted >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_trace >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_trace >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_compression_enabled >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_compression_enabled >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_ipv6_hoplimit >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_ipv6_hoplimit >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_mss_def_ipv6 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_mss_def_ipv6 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_mss_max_ipv6 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_mss_max_ipv6 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_rev_src_routes >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_rev_src_routes >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_wroff_xtra >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_wroff_xtra >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_extra_priv_ports >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_extra_priv_ports >>$TMPFILE 2>&1
echo /dev/tcp/ tcp_extra_priv_ports_add >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_extra_priv_ports_add >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_extra_priv_ports_del >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_extra_priv_ports_del >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_status >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_status >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_bind_hash >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_bind_hash >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_listen_hash >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_listen_hash >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_conn_hash >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_conn_hash >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_acceptor_hash >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_acceptor_hash >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_host_param >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_host_param >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_time_wait_stats >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_time_wait_stats >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_host_param_ipv6 >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_host_param_ipv6 >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_1948_phrase >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_1948_phrase >>$TMPFILE 2>&1

echo /dev/tcp/ tcp_reserved_port_list >>$TMPFILE 2>&1
ndd -get /dev/tcp tcp_reserved_port_list >>$TMPFILE 2>&1


###And UDP.....

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

echo /dev/udp udp_wroff_extra >>$TMPFILE 2>&1
ndd -get /dev/udp udp_wroff_extra >>$TMPFILE 2>&1

echo /dev/udp udp_ipv4_ttl >>$TMPFILE 2>&1
ndd -get /dev/udp udp_ipv4_ttl >>$TMPFILE 2>&1

echo /dev/udp udp_ipv6_hoplimit >>$TMPFILE 2>&1
ndd -get /dev/udp udp_ipv6_hoplimit >>$TMPFILE 2>&1

echo /dev/udp udp_smallest_nonpriv_port >>$TMPFILE 2>&1
ndd -get /dev/udp udp_smallest_nonpriv_port >>$TMPFILE 2>&1

echo /dev/udp udp_do_checksum >>$TMPFILE 2>&1
ndd -get /dev/udp udp_do_checksum >>$TMPFILE 2>&1

echo /dev/udp udp_smallest_anon_port >>$TMPFILE 2>&1
ndd -get /dev/udp udp_smallest_anon_port >>$TMPFILE 2>&1

echo /dev/udp udp_largest_anon_port >>$TMPFILE 2>&1
ndd -get /dev/udp udp_largest_anon_port >>$TMPFILE 2>&1

echo /dev/udp udp_xmit_hiwat >>$TMPFILE 2>&1
ndd -get /dev/udp udp_xmit_hiwat >>$TMPFILE 2>&1

echo /dev/udp udp_xmit_lowat >>$TMPFILE 2>&1
ndd -get /dev/udp udp_xmit_lowat >>$TMPFILE 2>&1

echo /dev/udp udp_recv_hiwat >>$TMPFILE 2>&1
ndd -get /dev/udp udp_recv_hiwat >>$TMPFILE 2>&1

echo /dev/udp udp_max_buf >>$TMPFILE 2>&1
ndd -get /dev/udp udp_max_buf >>$TMPFILE 2>&1

echo /dev/udp udp_extra_priv_ports >>$TMPFILE 2>&1
ndd -get /dev/udp udp_extra_priv_ports >>$TMPFILE 2>&1

echo /dev/udp udp_extra_priv_ports_add >>$TMPFILE 2>&1
ndd -get /dev/udp udp_extra_priv_ports_add >>$TMPFILE 2>&1

echo /dev/udp udp_extra_priv_ports_del >>$TMPFILE 2>&1
ndd -get /dev/udp udp_extra_priv_ports_del >>$TMPFILE 2>&1

echo /dev/udp udp_status >>$TMPFILE 2>&1
ndd -get /dev/udp udp_status >>$TMPFILE 2>&1

echo /dev/udp udp_bind_hash >>$TMPFILE 2>&1
ndd -get /dev/udp udp_bind_hash >>$TMPFILE 2>&1

# get ICMP stuff

echo /dev/icmp icmp_wroff_extra >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_wroff_extra >>$TMPFILE 2>&1

echo /dev/icmp icmp_ipv4_ttl >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_ipv4_ttl >>$TMPFILE 2>&1

echo /dev/icmp icmp_ipv6_hoplimit >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_ipv6_hoplimit >>$TMPFILE 2>&1

echo /dev/icmp icmp_bsd_compat >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_bsd_compat >>$TMPFILE 2>&1

echo /dev/icmp icmp_xmit_hiwat >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_xmit_hiwat >>$TMPFILE 2>&1

echo /dev/icmp icmp_xmit_lowat >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_xmit_lowat >>$TMPFILE 2>&1

echo /dev/icmp icmp_recv_hiwat >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_recv_hiwat >>$TMPFILE 2>&1

echo /dev/icmp icmp_max_buf >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_max_buf >>$TMPFILE 2>&1

echo /dev/icmp icmp_status >>$TMPFILE 2>&1
ndd -get /dev/icmp icmp_status >>$TMPFILE 2>&1

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

echo Check current directory for nddgrep.txt file!

grep eri setting via ndd

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