How to use the VRTSexplorer utility on AIX to gather information for VCS Technical Support.

#  cd /opt/VRTSspt/VRTSexplorer
# ./VRTSexplorer

Troubleshooting:
Check the process running.
# ps -eaf | grep VRTSexplorer
    root 10365 10343   0 21:47:03 pts/1       0:00 /bin/sh -- /opt/VRTSspt/VRTSexplorer/main.AIX
    root 10365  9800   0 21:46:59 pts/1       0:00 /bin/sh -- /opt/VRTSspt/VRTSexplorer/VRTSexplorer   <<< VRTSexplorer command

Check the process tree of VRTSexplorer
 # ps -fT 10365
     UID    PID   PPID   C    STIME    TTY  TIME CMD
    root 10365 327830   0 10:46:33  pts/1  0:00 /bin/sh -- ./VRTSexplorer
    root 618510 10365   0 10:46:44  pts/1  0:00     \--/bin/sh -- /opt/VRTSspt/VRTSexplorer/./main.AIX
    root 520346 618510   0 10:49:49  pts/1  0:00         \--/bin/sh -- /opt/VRTSspt/VRTSexplorer/./vxvm

Kill the process which got hung  
# kill -9  520346


To upload the files:
# ftp ftp.veritas.com
     username: XXXXXXXX
     password: XXXXXXXX
    
> bin
> cd /incoming/<caseid>
> put <filename>

Viewing the contents of a disk without varying on the VG in AIX


To view a disk without varying it on:

# lqueryvg -p hdisk0 -L
00c9b6fb00004c000000013a8c97f698.1   backup_lv 1
00c9b6fb00004c000000013a8c97f698.2   loglv01 1
00c9b6fb00004c000000013a8c97f698.3   fslv19 1
00c9b6fb00004c000000013a8c97f698.4   was70bkp 1
00c9b6fb00004c000000013a8c97f698.5   paging00 1
00c9b6fb00004c000000013a8c97f698.6   fixes_lv 1

Finding Library Dependencies

Have you ever wondered which libraries are being called by a binary or utility?

The AIX package “freeware.aix.tools.rte” includes the “ldd” binary which shows the shared libraries called by an executable. This example shows the shared libaries called by the ping executable. # /usr/local/bin/ldd /usr/sbin/ping
/usr/lib/libbind.a(shr.o)
/usr/sbin/ping
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libc.a(shr.o)

Remember that some “.o” files are stored with “.a” files. To examine the contents of a “.a” file use the command: ar -tv
E.g.
# ar -tv /usr/lib/libcrypt.a
rwxr-x—   300/1       4638 Mar 28 20:46 2010 shr.o

List of AIX Logs

AIX Logs:



/var/adm/ras/lvmcfg.log         # lvm log file shows what lvm commands were used (alog  -ot lvmcfg)
alog -L                   #  List the defined log types
alog -o -t boot                 #  View the boot log
alog -o -t console          #  View the console log

Find Comand in AIX

find / -xdev -type f -name "cor*" -size +10000c -exec ls -l {} \;

    /                        where to find
    -xdev                    looks only in the given fs
    -type f                  what type to look for (f: file, d: direcory)
    -name "cor*"             name to look for
    -size +10000c            search for the given size (+10000c : greater than 10000 character (larger then 10kbyte))
    -size +2                 search for greater than 1kbyte (bloxk size is 512 byte, that's why +2 is given)
    -exec ls -l {} \;        what command to execute
                             ({}: it represents each findings and \; is needed at the end of line)
                             e.g. find /home -xdev -name "*.old" -exec rm {} \;
    -mtime -1                file modifocation date is less then 1 day (+1 means older than 1 day)

find . -name '*.ksh' -ok rm {} \;                     this will ask if the command (rm) should be  executed or not (much safer if find is not perfect)

find /etc/rc.d -ls           it lists the files and dirs in the given dir

find /tmp/bb -exec awk '/func/ {print FILENAME}' {} \;   it will check in /tmp/bb if any files contains the word "func" and list those

How to check FCS Adapter Speed on AIX

To Check  Fiber Channel  Device Driver  Speed Details.

# fcstat <fcs#> | grep -i port.



 Once HBA Card is plugged in and negotiate, the link speed should stay as it is and it will follow the speed of the switch. The adapter automatically negotiates with the switch to the highest speed of which the switch is capable (2GB,4GB and 8 Gb).


8- GB FC adapter :
  

 LEDs on each port provide information on the status and link speed of the port.





How to view system Serial Number in AIX


# lsconf | grep -i "Machine Serial"

# prtconf | grep -i "Machine Serial"

# lsattr -El sys0 -a systemid


Recovery From A Deleted /dev Directory in AIX

Note that AIX recreates most of /dev on boot, but we need a certain amount.

========================================
=======
Problem(Abstract): The /dev directory was accidentally deleted.
===============================================
Symptom: System wont boot
===============================================
Environment: AIX 5.3 (and others)
==============================================
Resolving the problem

Boot system into maintenance mode.
Access a root volume group before mounting filesystems

mount /dev/hd4 /mnt
mount /dev/hd2 /mnt/usr
mknod /mnt/dev/hd1 b 10 8
mknod /mnt/dev/hd2 b 10 5
mknod /mnt/dev/hd3 b 10 7
mknod /mnt/dev/hd4 b 10 4
mknod /mnt/dev/hd5 b 10 1
mknod /mnt/dev/hd6 b 10 2
mknod /mnt/dev/hd8 b 10 3
mknod /mnt/dev/hd9var b 10 6
umount /mnt/usr
umount /mnt
shutdown -Fr

vfcpmap on VIO Server


vfcmap command maps and unmaps the virtual fibre channel adapter to the physical fibre channel port.


To Map the virtual fibre channel ,vfchost1 to the physical fibre channel port, fcs0

# vfcmap -vadapter vfchost0 -fcp fcs0


To unmap the virtual fibre channel, vfchost3 to the physical fibre channel port, fcs3

# vfcmap -vadapter vfchost3 -fcp