Posts

storage check script for AIX

echo "HOSTNAME = `hostname`" echo "OS Level : `uname -a|awk '{print $1, $3}'`" echo "" echo "Device,WWN no,SPEED,Status,Target Name,pwwn" /usr/sbin/lscfg >lscfgout cat lscfgout|grep fcs|awk '{print $2}'|sort>fcl for i in `cat fcl` do touch tgname echo $i>fcsname /usr/sbin/lscfg -vpl $i |grep 'Network Address'|awk -F. '{print $14}'>wwn speed=`/usr/bin/fcstat $i |grep 'Port Speed (running)'|awk '{print $4}'` echo "$speed ">speed if [ -n "$speed" ];then echo "Active">status fcsaddr=`cat lscfgout|grep -w $i|awk '{print $3}'` cat lscfgout|grep $fcsaddr|egrep -v '(fcs|fcnet|fscsi|PowerPath)'|awk '{print $3}'|awk -F- '{print $5}'|sort |uniq>tgwwn for t in `cat tgwwn`;do cat lscfgout|grep $t|head -1|awk '{print $4,$5,$6,$7,$8,$9,$10}'>>tgname;done else echo "Not Active">status echo " "...

Steps to configure HACMP

1. Install the nodes, make sure the redundancy is maintained for power supplies, n/w and fiber n/ws. Then Install AIX on the nodes. 2. Install all the HACMP filesets except HAview and HATivoli. Install all the RSCT filesets from the AIX base CD. Make sure that the AIX, HACMP patches and server code are at the latest level ( ideally recommended). 4. Check for fileset bos.clvm to be present on both the nodes. This is required to make the VGs enhanced concurrent capable. 5. V.IMP: Reboot both the nodes after installing the HACMP filesets. 6. Configure shared storage on both the nodes. Also in case of a disk heartbeat, assign a 1GB shared storage LUN on both nodes. 7. Create the required VGs only on the first node. The VGs can be either normal VGs or enhanced concurrent VGs. Assign particular major number to each VGs while creating the VGs. Record the major no. information. To check the Majar no. use the command: ls –lrt /dev |grep <vgname> Mount automatically at system restart shou...

Some useful AIX commands

    ODM Delete Command easy Step to remove a  Disk odmdelete -o CuDv -q name=hdisk1 Check the status of a mksysb tape (Guessing tape drive is rmt0) chdev -l rmt0 -a block_size=0 mt -t /dev/rmt0.1 fsf 3 lsmksysb -c -f //dev/rmt0.1 or restore -Tvf /dev/rmt0.1 -s4 How to remove  vpath rmdev -Rdl dpo NIM showlog command example nim -o showlog -a full_log=yes -a log_type=nimerr 530TL4spot Command to boot from network (provided maint boot enabled in the boot server) bootlist -m normal ent0 speed=auto duplex=auto gateway=X.X.X.X bserver=X.X.X.X client=X.X.X.X  ( replace x with the real IPs and speed/duplex according to your network speed settings) Remove a mksysb image from NIM Server nim -o remove -a rm_image=yes mksysbname Create a image.data from mksysb image restore -xvqf /images/mksysb.image ./image.data List all ODM Definitions odmget CuAt to see all the attributes odmget CuDv to see all the devices To remove a mirror copy from a LV /usr/sbin/rmlvcopy fslv0...

Enabling Remote Command Line Execution on the HMC

On the HMC GUI (either locally or remote) click on HMC Management in the Navigation area, then on HMC Configuration and finally on Enable/Disable Remote Command Execution. That's it - simple. You can try to login to the HMC using a SSH client of your choice. Please note... The login name is hscroot not root! Enabling SSH access without password Now that you can access the HMC using SSH it might be usefull to allow access from certain workstations without get prompted for a username and a password - this is quite usefull especially when using scripts. But if you don't need it just skip the following steps. First step is to generate a public-private key file on your client. Here's an example on my Linux workstation. [pjuerss@ankh-morpork ~]$ ssh-keygen -f /home/pjuerss/.ssh/id_dsa -q -t dsa -N "" The keys are stored at /USER/HOME/.ssh/id_dsa and /USER/HOME/.ssh/id_dsa.pub. Now you must tell the HMC to accept this keys using the mkauthkeys command. [pjuerss@ankh-mor...

commands to change user security params

chsec -f /etc/security/user -s default -a "histsize = 0" chsec -f /etc/security/user -s default -a "histsize = 5"        1    To change the /dev/tty0 port to automatically lock if 5 unsuccessful login attempts occur within 60 seconds,             enter:             chsec -f /etc/security/login.cfg -s /dev/tty0 -a logindisable=5 -a logininterval=60        2    To unlock the /dev/tty0 port after it has been locked by the system, enter:             chsec -f /etc/security/portlog -s /dev/tty0 -a locktime=0        3    To allow logins from 8:00 a.m. until 5:00 p.m. for all users, enter:             chsec -f /etc/security/user -s default -a lo...

AIX tunable parameters

We had received some of the tuning parameters from our technical team lead .It is recommended that we should set the parameters as suggested below . Also pls tune them and then collect "vmstat" and "iostat" while running the test to understand the system utilization. This will help us to resolve the performance related problems and improve your system . Recommended Starter Tuning Parameters :  ======================================= no -p -o rfc1323=1 no -p -o sb_max=1310720 no -p -o tcp_sendspace=262144 no -p -o tcp_recvspace=262144 no -p -o udp_sendspace=65536 no -p -o udp_recvspace=655360 nfso -p -o nfs_rfc1323=1 nfso -p -o nfs_socketsize=60000 nfso -p -o nfs_tcp_socketsize=600000 vmo -p -o minperm%=5 vmo -p -o maxperm%=90 vmo -p -o maxclient%=90 vmo -p -o minfree=960 vmo -p -o maxfree=1088 vmo -p -o lru_file_repage=0 vmo -p -o lru_poll_interval=10 ioo -p -o j2_maxPageReadAhead=128 ioo -p -o maxpgahead=16 ioo -p -o j2_maxRandomWrite=32 ioo -p -o maxrandwrt=32 io...

script for security audit on AIX

#!/usr/bin/ksh dir="/tmp/hc_agent" hostname=`hostname` CFGOUT=${hostname}.healthcheck.out do_lspath() { echo "\f\n\n MULTIPATH IO CAPABLE DEVICES (lspath -l <hdisk>)" >> $CFGOUT for pv in `/usr/sbin/lspv | awk '{print $1}'` do         lspath -l $pv >> $CFGOUT done echo     "------------------------------------------------------\n" >> $CFGOUT } do_smtctl() { #SMT Enabled ? echo "\n\nSIMULTANEOUS MULTITHREADING ENABLED (smtctl) " >> $CFGOUT echo     "------------------------------------\n"  >> $CFGOUT smtctl >> $CFGOUT echo     "------------------------------------\n"  >> $CFGOUT } do_users() { # Check the password security info echo "\n\nPASSWORD SECURITY INFORMATION" >> $CFGOUT echo     "-----------------------------\n"  >> $CFGOUT lsuser -c -a  histexpire histsize  maxage  maxexpired...