You are on page 1of 20

Sys Admin Pocket Survival Guide - AIX

Home

Sys Admin Pocket Survival Guide - AIX AIX CD catalog

HP-UX

HOW-TO
AIX ADMIN 101
PMR PTF APAR ML SP TL Problem Management Record. Program Temporary Fix eg Unnnnnn Authorized Program Analysis Report, specific release of PTF. eg IYnnnnn, IXnnnnn Maintenance Level, grouping of APAR. eg 5300-04 is ML 4 Service Pack (starting aix 5.3 ML 3) eg 5300-03-01 is SP 1 on ML3

Fileset - group of files, eg bos.adt.libm VRMF - Version, Release, Modification/Maintenance level, and Fix. eg 5.2.0.60

SMIT

A lot of the sys admin task in AIX can be done thru smit (or smitty for TUI version). It can accept a parameter to get to a specific menu section right away.
Here are some example: smit mktcpip smit chfs smit lsprt smit installp smit update smit update_all relevant smitty fastpath: Action -----(add) (change) (list) (remove) Prefix -----mk ch ls rm Device -----(printer) (tty) (pty) (disk) (cdrom) (diskette) (tape) (adapter) Abbreviation -----------prt tty pty dsk cdr dskt tpe adp lang # # # # # # configure network parameters change file system, eg grow/extend it. list printers (don't list all, may need to go thru long menu) Add new software add patches automatic add patches to existing sw, no complain if patch is not

Keystrokes: F3 or ESC, F4 or ESC, F6 or ESC, F10 or ESC,

3 4 6 10

Cancel, go back Provide list of items to choose from Show command that smit will actually run Exit smitty

LINUX AFFINITY
AIX is affectionally known as It Ain't uniX. With version 5L that added Linux Affinity, it maybe called Ain't It linuX? The linux toolkit does add lot of open source utilities for AIX, it even provides an rpm package manager to manipulate these open source tools. However, it is stuck in the past, circa 2002, and so many of the newer Linux updates are not available. For example, there is no rpmbuild but use the old rpm --recompile. There is no automatic patch to update the source codes from Source RPM. These deficiencies makes development in AIX extremely painful.

AIX Idiosyncrasies

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

If a file is held open by the OS with a running program, it will not allowed to be overwritten (think Windows). For example, /lib/security/NSS_LDAP and /usr/lib/netsvc/dynload/nss_ldap.so are modules loaded by the authentication subsystem, and these files are locked and cannot be upgraded.

INITIAL SYSTEM SETUP


smitty assist /usr/sbin/install_assist # init os setup assistant to config basic system param. # what get launched automatically after init install reboot

FS LAYOUT
AIX uses a pretty good volume manager out of the box. Every FS can be expanded on the fly, so no special work is really needed on initial setup. If you use /home as NFS mounted home dir, you may wish to update /etc/filesystems so that the the local disk is mounted as /localhoome or something.

BUNDLE INSTALL
AIX that comes with the machine often don't have all the desired software packages installed. It maybe good to add some bundles before releasing the machine for general use. eg: Add the Application Development bundle ::
/usr/lib/instl/sm_inst installp_cmd -a -Q -d '/nfshome/sa/aix53/cd1' -b 'App-Dev' -f 'all' '-c' '-N' '-g' '-X' '-G'

Other bundles that can be installed are:


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. AllDevicesKernels Alt_Disk_Install App-Dev CC_EVAL.Graphics CDE GNOME Graphics KDE Kerberos_5 (Expansion Pack) Media-Defined Mozilla (AIX Toolbox for Linux Applications, Mozilla CD) PerfTools Server

Note that not everything is in the first CD. Time for IBM to get with DVD media, no? :) See also Config Files

FIRMWARE/BIOS
When upgrading an older machine to new version of AIX, be sure to check the AIX release notes to ensure the machine in question is still supported, and whether any firmware update maybe needed. RS/6000 / pSeries machine firmware is typically updated when AIX is still running. Many older machines does not support firmware update in SMS. Old hardware or firmware have tendency to crap out in a boot process giving error 20EE000B (unable to find boot device), even when boot from the CD for the initial install works fine. The saving grace is that one can boot and reinstall the old OS should machine become unbootable.
# show firmware version, sample output included # the last 6 digit of the firmware is a date code YYMMDD lscfg -vp | grep -p Platform

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

Platform Firmware: ROM Level.(alterable).......3R040323 Version.....................RS6K System Info Specific.(YL)...U0.1-P1/Y1 Physical Location: U0.1-P1/Y1 # copy new firmware from CDROM into a new dir /tmp/fwupdate # inside the microcode dir in the CDROM are subdir for each machine type # refer to the doc inside this dir for full details on firware upgrade. cp /mnt/cdrom/microcode/... /tmp/fwupdate # run checksum on the firmware image. sum vvYYMMDD.img # perform the update, it will reboot the machine automatically when done cd /usr/lpp/diagnostics/bin ./update_flash -f /tmp/fwupdate/3R041029.img

BOOT TIME TROUBLESHOOTING


RC scripts executed at startup: /etc/rc.d/rcN.d/ same as solaris, Snn--- script, but there is nothing in here from basic OS. normal run level is 2. Placed S74autofs and S89sshd in rc2.d . /etc/rc.d/rc script is the one that source all the rcN.d, but this script doesn't seems to exist by default, had to be copied from another 4.3.3 machine and then it was fine. For some unknown reason, init script for AIX 5.3 doesn't seems to run correctly!! (eg, opensshd script will create log, but fail to start)

AIX default system config is to have a few named rc scripts, they are all started by init as per /etc/inittab: /etc/rc.tcpip # tcp config, but could not start sshd from here at boot, so placed in rc2.d/S89sshd. /etc/rc.nfs # includes NIS, rcp /etc/rc.emcpower # emc added their own startup script here, which is called form /etc/inittab.

Single User/Maintenance Mode


For servers with Service Processor: 1. Power off machine Navigate the Service Processor menu (avail only when machine is off, from serial console): 2. go to (2) system power control menu 3. go to (7) Boot Mode Menu (some system list it as AIX/Linux mode config) 4. go to (2) Service Mode boot from Saved List (to enable Maintenance Mode, diff than SMS mode). Power on machine. Kernel will boot, then ask which options to boot to, choose single user mode (maintenance mode has less capability). To install new OS to system, change system to get into System Management Service (SMS) mode. Then choose to boot from cdrom (first CD for OS install). A note about the old desktop machines (eg 43P-140 604e-332 PowerPC 760): 1. When machine first boot, it will display various number on the various terminal. eg. 0 for ASCII console (dumb terminal), 1 on first graphics video, 2 on second graphics video. Press the number corresponding to the video that you wish to use. This setting is "memorized" by the system, prompt again only when a there is hardware config change.

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

2. To get into the graphical System Management Service (SMS) mode, press F1 as soon as the double beep "diripdirip" chirps happens (and the keyboard icons is displayed). You better be quick, do it before the long chime of the speaker test happens (the fifth/last icon in startup: speaker icon). If using ASCII console, F-keys are simulated via ESC+Number keys. The graphical icons won't appear, but the equivalent text will be displayed progressively across the screen:
memory keyboard network scsi speaker

3. Pressing F8 will go to the open firmware OK prompt. There are only a few commands accepted:
devalias printenv setenv boot [DEVICE] boot disk

will do a normal boot from hard drive. This is the default action if open firmware is not explicitly

invoked. will boot from the cdrom and run the installer program, whereby it will prompt for install config info. There is also option to get into maintenance mode (?? It is NOT boot -s !!) More info about open firmware: IEEE 1275. 4. SMS has entry to define boot device scan sequence, which is based on SCSI (lowest ID first). However, actual boot is according to Open Firmware boot command, so which device is booted depends on what the alias for disk is defined as. In summary, ignore the SCSI id boot sequence in SMS. 5. Some system require pressing F5 instead of F1 to get into SMS mode. If you are lucky, some will display what key to press to get into what mode right before the hardware scan progress, eg:
boot cd 1 = SMS Menu 6 = Stored Boot List 5 = Default Boot List 8 = Open Firmware Prompt

6. IBM RS/6000 hardware is pretty finiky and OS support may not be available for some machines. AIX 5.2 will no support any machines with ISA bus. Some 43P have such bus and thus can only run AIX 5.1 as latest OS. Other 43P that don't have ISA bus can run the newer AIX. If you wish to install Linux, expect even more finickyness, as there are lot of small modifications between motherboards of different serial numbers. Linux may run on one 43P, but not another that looks the same. ie: don't install Linux on these putters!

RANDOM DAILY SYS ADMIN TASKS


See if system has ASync IO feature installed: lslpp -l | grep -i asyn lppchk -c lsdev -C -t aio smitty chgaio --smitty chtz date -u # # # # # change timezone info /etc/environments TZ=PST8PDT display internal system clock (in CUT/GMT). reboot was recomended, but all future login will see corect TZ. cron and stuff may not update till reboot. # # # # list bos.rte.aio package installation check to ensure all fileset are installed correctly list whether async io is avail as device smit interface to activate aio, reboot req.

--AIX WebSM, default port is 9090 (/etc/services) To disable, use /usr/websm/bin/wsmserver -disable; -enable will re-enable it. HTTP server, started in /etc/inittab ! So it will respawn if it is just killed, edit inittab to free up port 80!

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

EMC navisphere agent also started in inittab, I guess it is the AIX way. it calls /etc/rc.agent ----

ibm option number for universal (oem) cabinet rack mount rail part. OEM means 3rd party cabinet. IBM cabinet rails are fixed length! p5 9113-550 :: 7162 IBM/OEM RACK-MOUNT DR.RAIL KIT 1 168.00 p5 510 :: 7166 IBM/OEM RACK-MOUNT DR.RAIL KIT 1 150.00

STORAGE
DISK/VOLUME MANAGEMENT/FILESYSTEM
AIX has probably the most admin-friendly Logical Volume Manager and Filesystem of all the major Unices out there. It use a single LVM for every FS. Every FS is extendable online without the need to unmount. It does have lot of commands that are needed to manipulate the system though. But if you just need to get more space on a given FS/partition, just use smit chfs.
TLA --PP LP PV VG LV FS name ------------physical part logical part physical vol volume group logical vol filesystem eg -----------------------sample cmd --------------

hdisk0 hdisk1 rootvg appvg /dev/hd0 /dev/hd9var / /var

lspv lsvg mkvg extendvg lslv mklv lsfs mount

hdiskN are physical hard drives (or RAID device?) /dev/hdN are FS level mountable device, these are created by the LVM. /dev/hdN are subcomponents of VG such as rootvg. smit vg lsdev -Cc adapter usb, graphics lsdev -Cc disk rmdev -dl hdisk2 been lsvg lsvg rootvg lsvg -l rootvg lsvg -p rootvg extendvg -f rootvg hdisk8 smitty vg mklv -y'appvol00' appvg 1 # display and set logical volume group info # list many adapters, include fc, scsi, ide, pci, LPAR virtual, # list hard disks. eg hdisk0 hdisk1 # remove a named disk from config, often needed when san disk has # changed on the storage server side. # # # # # after rm, rescan the bus.

list all VG present in system VG space usage and free, PP size, etc list LP content of rootvg list PP used and free for a VG when LV/FS need to be extended.

# allocate physical hd to VG rootvg # smitty for Vol Grp, allow remove vg # create logical volume (after volume group defined via mkvg) # if -y is not given, a generic volume name will be assigned. # This step isn't strictly needed, mkfs will create generic vol hd 255 LV) 512 LV, 4.3.1+) 256 LV, 5.2+)

as needed. mkvg -f -y'appvg' hdisk2 hdisk3 # create a VG appvg from 2 physical mkvg # original Vol Grp (Max 32 PV, mkvg -B # Big Volume Group (Max 128 PV, mkvg -S # Scalable Vol Group (Max 1024 PV, smit fs reorgvg lsfs chfs -a size=+1 /dev/hd2

# best to use smit to create a fs, many parameters. # it typically call cffs -v jfs2 # reorganize PP w/in vol grp # list fs on machine, kinda like mount, # diff output, only list fs in /etc/filesystems. # grow a file system, size mult of 512 bytes, but

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

chfs -a size=+1 /tmp smitty chfs

# # # # # # # # # #

always rounded up to integer number of PP 8 mb, 64 mb, etc (see lsvg rootvg pp size) to add 256mb, use size=+524288 256 * 1024*1024 / 512 = 524288 blocks ie, use size val of [ X MB * 2048 (constant) ] /dev/hd2 can be substituted by the fs mount pt. will see SIZE for more accurate resizing. count is # of 512 bytes block, value is absolute num only. Can also strink fs while mounted (at least tested in 5.3)

lslv hd1 cplv chlv lspv lspv -l hdisk0

# info of LV hd1 (find from mount # what fs it belongs to). # copy LV # change LV, # cplv + chlv = move Log Vol b/w Vol Grp. # # # # # list PVID (physical volume id) and vg on disk list what fs are on a given disk good to check to ensure fs does not span more than one disk unecessarily, to reduce disk crash damage. # move a fs w/in same vol grp, but diff hd. eg # migrate pagin, can take a while!

migratepv -l LVname oldPV newPV migratepv -l paging00 hdisk1 hdisk2

varyonvg

VGname

varyoffvg VGname exportvg VGname

# vary on a vol grp, needed before VG is accessible, # typically automatica with most commands now # vary off, ie, make vol grp offline. # disociate /etc/filesystems etc from the computer, # making the VG available for mount by another computer # reimport the VG. Remember the vary cmd. # Determine the VG ID# on hdisk0 # Show all the LV ID#/names in the VG on hdisk0 # Show all the PV ID# that reside in the VG on hdisk0 # Determine if ODM and VGDA data are correct (in sync)

importvg -y VGname hdiskN lqueryvg -p hdisk0 -v lqueryvg -p hdisk0 -L lqueryvg -p hdisk0 -P getlvodm -u rootvg

chvg -u rootvg getlvodm/putlvodm smitty mklvcopy

# unlick rootvg (maybe locked during crash, ODM problems) # disk ODM repair related. # # # # # # smitty fastPath for making mirrors work on each logical volume, eg hd1 Lot of menu options then, but don't like it much, not obvious how to make 2 disk mirror identically. maybe one don't have to, as it will be mapped blocks anyway not like solaris that match cylinder allocation, but solaris maybe more

resilient # aix wants to find where to place vol (center of disk, etc). # Maybe multiple copies of a logical vol inside same volume group (and potnetially # same disk! # aix book p 210 mirrorvg rootvg istat /opt ipl_varyon -i # mirror whole volume group, simple one command does it. # aix book p 202 # show inode status # Determine which disk(PV) is the boot drive

Other ref: Advanced Horizons AIX File Info

SWAP / PAGING
/etc/swpaspaces # config file

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

swapon -a swapon /dev/paging00 swapoff /dev/paging00 chps -s16 hd6 chps -d8 hd6 mkps -s16 rootvg -a -n

# activate all swap spaces # activate additional device # deactivate # # # # # # # # # # # # # # change attrib of paging space add 16 PP to existing paging space in /dev/hd6 PP size determined by lslv hd6", eg 256, 512 MB remove 8 PP to existing paging space in LV hd6 add new paging space worth 16 PP to vg called rootvg, -a = activate at once, -n = active on reboot. add new paging space on diff vg, specifying which disk to put it on. remove the whole paging space from sys list paging space stat 5L, shrink paging space (script) not sure why need this?? Need perfagent.tools

mkps -s32 datavg hdisk1 rmps paginig00 lsps -a shrinkps svmon

# view current vm usage.

CONNECTIVITY (NETWORK)
SERIAL/CONSOLE PORT
DB9 connector wiring is slightly different than Sun. Use a real null modem cable. "Psseudo" cable from sun DB9RJ45 adaptors and ribbon cable don't work. One will see text and be able to type text, but it won't accept the login, even when password is right. can't loging!! Terminal is VT100, none of the flow control stuff, but that probably don't matter. Also, for running system, when NULL modem is connected to serial, it should automatically display new text and prompt for login. ribbon cable probably don't work at all here. P4 and older machines use standard 9600 for serial port. But new POWER5 machines, they changed serial port to use 19200!! All other settings are same as before.

DUMB TERMINAL
The tip command exist on AIX, but it is slightly different than Solaris.
# aix tip host spec, typically placed in /etc/remote-file # with a /etc/remote file defining its location # alternatively, env var REMOTE can define location of this remote-file # # aix tip escape sequence is same as solaris. # ~? produces full list. # ~^D terminate the connection. # # tty0 is the system console, like Solaris Serial A, not usually usable as dumb terminal emulator # tty1 is the serial port labeled T2, the equi of serial B in Solaris. # # IBM AIX serial connection is slightly diff than Sun, req NULL modem cable. # This emulated TIP does not fully act as dumb terminal :( # Depending on the state of the machine, and whether tip session is established first, # or the cable is connected first, text may or may not be visible :( # So, tip in aix can probably only work as dumb terminal for sun and hp machines, # and the most reliable console is still a dumb terminal. # # eg usage, runnable as normal user: # export REMOTE=$HOME/etc/remote-file # tip dumb19200 # tip -9600 serial1 # # dumb9600|direct connect at 9600 bps,br#9600:dv=/dev/tty1 dumb19200|direct connect at 19200 bps,br#19200:dv=/dev/tty1 serial0|dumbterminal:dv=/dev/tty0 serial1|tty1|dumbterminal:dv=/dev/tty1 tty|dumbterminal:br#19200:dv=/dev/tty # # The serial ports ttyp0...ttyp9,ttypa...ttypf do not usually exist # ttyp0|dumbterminal:br#19200:dv=/dev/ttyp0

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

ttyp1|dumbterminal:br#19200:dv=/dev/ttyp1 ttyp2|dumbterminal:br#19200:dv=/dev/ttyp2 ttyp3|dumbterminal:br#19200:dv=/dev/ttyp3 ttyp9|dumbterminal:br#19200:dv=/dev/ttyp9 ttypa|dumbterminal:br#19200:dv=/dev/ttypa ttypb|dumbterminal:br#19200:dv=/dev/ttypb ttypc|dumbterminal:br#19200:dv=/dev/ttypc ttypf|dumbterminal:br#19200:dv=/dev/ttypf cu Connect Unix. Opening a serial line may need some file config, cli below get error :( I guess need to get minicom/telix or some other similar program from the Linux world. cu -s9600 -l/dev/ttyp1 -s speed -l device line cu commands: ~%b ~%! ~.

send a break give shell end session, logout user.

NIC
ifconfig netstat -i lsdev | grep -i ether # # # # see Ethernet devices and drirver. entX = h/w card. enX = ethernet (DIX II framing) for IP etX = ethernet (IEEE 802.3) for SNA, don't bother :) # show capabilities of ent0 # show current settings # show all def val for Eth dev. # change to forced full 100 # change to auto negotiate for speed duplex # effective after reboot !!!

lsattr -R -l ent0 -a media_speed lsattr -EH -l ent0 -a media_speed lsattr -D -l ent0

chdev -P -l ent0 -a media_speed=100_Full_Duplex chdev -P -l ent0 -a media_speed=Auto_Negotiation

smitty mktcpip

# configure/change ip of interface, default route, netmask # permanently set ip option for interface # smitty just run mktcpip cmd:

/usr/sbin/mktcpip -h'HOSTNAME' -a'HOST.IP' -m'HOST.IP.NETMASK' -i'NIC' # eg en0, "standard network interface" -n'DNS.SERVER.IP' # may want to add more to /etc/resolv.conf -d'DNS.DOMAIN.NAME' # eg titaniumleg.com -g'DEF.GATEWAY.IP' -A'no' # Start now? no or yes # just omit it. eg: mktcpip -h'aix01' -a'10.215.11.101' -m'255.255.255.0' -i'en0' -n'10.215.2.1' -d'titaniumleg.com' g'10.215.11.1'

NETWORK SERVICES
lssrc -a startsrc stopsrc -g -s -a -D startsrc -g nis startsrc -s rcp.mountd startsrc -s xntpd # # # # # list all services and their status start network service stop network service group subsystem, g or s is largely how AIX define the service. # # Debug

# start NIS service group # rpc/mount service # start ntp daemon # init script starts it from /etc/rc.tcpip # start mail server to allow inbound mail. # essentially, do sendmail -bd, makes it a

startsrc -s sendmail -a -bd

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

# daemon listening on port 25 for mail services. startsrc -s iptrace -a stopsrc -s iptrace "/tmp/iptrc.bin" # start ip tracing facility, # -a = stor in file (binary). # stop tracing after problem is reproduced.

DNS
/etc/resolv.conf # main config file, like other Unix. accept up to 3 name servers change server after TimeOut (def of 5 sec), retry (def = 3), so 5+10+20+40=75 sec. eg: domain nameserver nameserver nameserver search search search namerslv -s hybridauto.com 10.210.2.11 10.210.2.12 165.87.201.244 hybridauto.com titaniumleg.com titaniumlegcorp.com

# run cmd to see settings are understood by system.

DNS resolution depends on file /etc/netsvc.conf hosts=local,nis,bind and env var NSORDER=local,bind AIX 4.3 accepts bind4 and bind8

NIS
chypdom -B titaniumleg.com domainname smitty yp smitty mkclient rmyp -c lssrc -s ypbind stopsrc -s ypbind startsrc -s ypbind # /etc/rc.nfs is where the ypbind is set to use specific server (if not broadbcast) startsrc -g nis stopsrc -g nis # start nis server daemon # # # # # # # # set the NIS domain for the machine it proabably edit /etc/rc.nfs to run cmd domainname show the NIS domain general YP NIS config configure machine as NIS client remove yp client config display active vs inoperative NIS nis client process

CD AIX does not have a /etc/nsswitch.conf, instead use /etc/netsvc.conf and /etc/irs.conf (Information Retrieval System, bind 8 code base, used in FreeBSD also). Also, changes to irs.conf doesn't seems to be effective till next reboot. At least that seems to be the case with automount entry, restarting autofs a/o secldapclntd didn't refresh it. May want to try these commands in /usr/sbin flush-secldapclntd restart-secldapclntd stop-secldapclntd start-secldapclntd ls-secldapclntd

eg of irs.conf

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

Okay, here a real sample of /etc/irs.conf from an AIX 5.3 machine:


hosts dns continue hosts nss_ldap continue hosts nis continue hosts local services nss_ldap continue services nis continue services local networks dns continue networks nss_ldap continue networks nis continue networks local netgroup nss_ldap continue netgroup nis continue netgroup local protocols nss_ldap continue protocols nis continue protocols local ### ### http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp? topic=/com.ibm.aix.doc/cmds/aixcmds1/autom ount.htm ### automount nis_ldap ##automount nis ##automount files ##automount nis_ldap nis files

eg of /etc/netsvc.conf
# bind Uses BIND/DNS services for resolving names # local Searches the local /etc/hosts file for resolving names # nis Uses NIS services for resolving names. NIS must be running if you specify this option # nis+ Uses NIS plus services for resolving names. NIS plus must be running if you specify this option # ldap Uses LDAP services for resolving names # ldap_nis Uses LDAP NIS services for resolving names # bind4 Uses BIND/DNS services for resolving only IPv4 addresses # bind6 Uses BIND/DNS services for resolving only IPv6 addresses # local4 Searches the local /etc/hosts file for resolving only IPv4 addresses # local6 Searches the local /etc/hosts file for resolving only IPv6 addresses # nis4 Uses NIS services for resolving only IPv4 addresses # nis6 Uses NIS services for resolving only IPv6 addresses # nis+4 Uses NIS plus services for resolving only IPv4 addresses # nis+6 Uses NIS plus services for resolving only IPv6 addresses # ldap4 Uses LDAP services for resolving only IPv4 addresses # ldap6 Uses LDAP services for resolving only IPv6 addresses # ldap_nis4 Uses NIS LDAP services for resolving only IPv4 addresses hosts = nis_ldap, nis, bind, local

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

NFS
nfso -a # show all nfs options and current value nfso -o varname[=val] # display/set nfs option. nfso -o nfs_use_reserved_ports=1 # AIX default does not use port <1024, which result in auth error. # http://www.faqs.org/faqs/aix-faq/part3/ # only needed for /net with certain solaris version? Manual NFS mount can be added to /etc/filesystems :: /nethome: dev vfs nodename mount options account /Import: dev vfs nodename mount options account = = = = = = "/vol/vol1/depot" nfs netapp false ro,fg,hard,intr,nosuid false /nethome = = = = = = "/vol/vol1/users" nfs netapp true rw,fg,soft,intr,nosuid false

mount -o vers=2,proto=tcp,wsize=8192,rsize=8192,llock,soft,intr netapp:/vol/vol1/users mount -o vers=2,proto=tcp,wsize=8192,rsize=32768,llock,soft,intr desktop:/mnt/cdrom /mnt/rcdrom mount -o ro -v cdrfs /dev/cd0 /cdrom

startsrc -g autofs stopsrc -g autofs startsrc -s automountd

# # # #

start autofs service group. stop autofs service group. autofs group has only 1 subsystem, so -s or -g is same start automount service, more reliable than -g autofs !!

automount is started in the /etc/rc.nfs script. An alternative is to use the Sun style script (aix supports them, but nothing added by default), eg in /etc/rc.d/rc2.d/S74autofs, have something like:

/usr/sbin/automount -M /home /# monitor /home (for user), # /- will give the /net/HOST access like sol (and other direct mount) # aix 5.1 no longer support the -M param

aix 5.1L ML 3, automount started in /etc/rc.nfs as:


/usr/sbin/automount -f /etc/auto_master -D ARCH=SC_AIX # # # # # auto_master had only "+auto_master" remember that /home may be a mounted fs, so may wan to use /nethome. /net will work okay without -M /- . automount will call the automountd process, massage the mount points, and exit. do NOT start automountd on the CLI manually, it will not interface with mount correctly. # export files, similar to HP-UX, Linux eg content of the file: /usr -ro,root=admin-desktop" # export everything # display active exports # manually /tmp w/o entry in exportfs # start mountd, etc # list authenticaltion methods # start nfs service now and at boot?

/etc/exports

exportfs -a exportfs -v exportfs -i /tmp startrc -g nfs lsauthent mknfs -B

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

PRINTING
Use smit to add printer, prints to windows print server easily (provided the windows print server has Unix printing services setup):
smitty, Print Spooling, (AIX Print Spooling, choose it if it pops up), Add a Print Queueus, type is remot, std processing : Name of Queue to add --> Use printer name maching remote queue name (ie win prt name) Hostname of remote server --> Windows print server name Name of queue on remote server --> Windows printer name. Type of print spooler on remote server --> System V CLI: /usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext -q 'QueueName' -h 'Hostname' -r 'RemoteQueueName' -t 'att' -C 'FALSE' -d 'description'

To see what printers are installed, use:


/usr/bin/lsallq # brief listing of printer name only /usr/lib/lpd/pio/etc/piolsvp -p # listing with queue server and description /bin/lpstat # query windows print server on printer status, but names are truncated

SYS CONFIG
GENERAL SA COMMANDS
oslevel oslevel oslevel oslevel oslevel -rq -r -l 4.3.3.0 -l 5200-02 -r -s # # # # # # # # # # # # # # list all known and recommended ML which ML (maint level) machine is at. list fileset missing to bring machine to specified level. aix 5L is weired wrt oslevel -l service pack, in addition to ML, not avail on all sys. ( -s is new flag starting ca 2006, aix 5.3 ML 3? not in base 5.3) ver info, also with val of -m at the end some sort of machine code, includes serial number of the machine: 000F2C9A4C00 embeds serial 00F2C9A4 (jc) 000750AC4C00 embeds serial 10-750AC (vs -u opt) serial number (of management frame). IBM,0110750AC embeds serial 10-750ac (targa, 4.3 ) first number = the LPAR partition number OS is running inside of.

uname -a uname -m uname -u uname -L errpt errpt -a errpt -A -D watch cmd -o logfile truss topas vmstat sar istat slibclean svmon

# generate ERRor rePorT. This is more detailed than syslog. # all entries, detailed view. Default is brief listing only. # Abreviated detailed view. # Collapse duplicate entries. # similar to truss cmd, but can't watch existing pid # exist for 5.x, in /bin # top/monitor clone

---NIM

Network Install Manager - Network installation of aix, equiv of solaris jumpstart - r-cmd to control remote machine

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

CONFIG FILES
/etc/passwd /etc/security/passwd /etc/security/login /etc/ftpaccess /etc/nologin /etc/filesystems # # # # # # similar to shadow file dictate shells that are valid shell for various process. if user shell not listed here, ftp will fail. set ftp access priviledges, allow/deny access, etc. tmp disable login, presence of file set this behaviour instead of /etc/fstab

# /etc/syslog.conf # # # # # # can start syslog simply as: /usr/sbin/syslogd kill -HUP reload config file, adding note to error level (it whines). ensure the two columns are separated by TAB, not spaces or syslogd will fail to log silently!! AIX 5.x works okay with spaces now.

# IBM don't seems to have any standard, there are no default settings. # *.info *.notice # *.warning # *.err *.crit # # # # # # /var/adm/syslog_info.log /var/adm/syslog_notice.log /var/adm/syslog_warning.log /var/adm/syslog_err.log /var/adm/syslog_crit.log rotate size 100k files 4

create files as follows: touch /var/adm/syslog_info.log /var/adm/syslog_crit.log touch /var/adm/syslog_notice.log touch /var/adm/syslog_warning.log /var/adm/syslog_err.log really just need crit and notice warning and notice are same, both just marginally smaller than info.

# /etc/filesystems /: dev vol mount check free vfs log type /home-old: dev vol mount check free vfs log /usr: dev vfs log mount check type vol free /var: dev vfs = /dev/hd9var = jfs2 = = = = = = = = /dev/hd2 jfs2 /dev/hd8 automatic false bootfs /usr false = = = = = = = = = = = = = = = /dev/hd4 "root" automatic false true jfs2 /dev/hd8 bootfs /dev/hd1 "/home" true true false jfs2 /dev/hd8

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

log mount check type vol free /tmp: dev vfs log mount check vol free /proc: dev vol mount check free vfs /opt: dev vol mount check free vfs log /lhome: dev vfs log mount options account /home_na: dev vfs nodename mount options account /mnt/import: dev vfs nodename mount options account /mnt/cdrom: dev vfs mount check options vol free = = = = = = = = = = = = =

= = = = = = = = = = = = =

/dev/hd8 automatic false bootfs /var false /dev/hd3 jfs2 /dev/hd8 automatic false /tmp false

/proc "/proc" true false false procfs /dev/hd10opt "/opt" true true false jfs2 /dev/hd8 = = = = = = = = = = = = = = = = = = = = = = = = = /dev/vol1 jfs2 /dev/loglv00 true rw false "/vol/vol1/users" nfs na_data true rw,fg,hard,intr,nosuid false "/vol/vol1/depot" nfs na_data true rw,fg,hard,intr,nosuid false "/dev/cd0" cdrfs false false ro "/mnt/cdrom" false

HARDWARE COMMANDS
lspci lsattr Hot swap PCI cards, or hot remove. Essentailly, issue command to identify, then power off a given pci slot, then reactivate it again. smit, devices, pci hot plug manager
http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

shutdown

-F -r -m shutdown -r +5 "msg to users" lsattr -D -R -E -l name -a attr # # # # # #

# # # #

shutdown right away, no delay time reboot maintenance mode +5 = 5 minutes later.

list attributes display def val display range of legal values display Effective vall (current settings) specify dev logical name specify attribute of NAME logical dev # show lot of hardware info, include mem # get specifically the memory attribute, in KB. # see number of processor on machine (may not be numbered in # find processor speed # list total number of CPU. # AIX 5.2 and above, CD #1. installed in /bin by bos.pmapi.

lsattr -El sys0 lsattr -El sys0 -a realmem lsdev -Cc processor sequence) lsattr -El proc0 pmcycles -m

A note about IBM processors. POWER4 and POWER5 processor are typically packed in a processor card as a Dual Chip Module (DCM). The processor card has a single physical "CPU" in the traditional sense of touchable chip, but internally it has two cores and is marketed as a 2-way processor. The CPU listed by the output of pmcycles -m is similar to the Intel Hyperthreadig tech whereby a processor can run more than one thread at a time, it is not a physicall processor per se, but available to the programmer. Thus, a fully populated 4-way processor P5-550 would have 2 DCM processor card (two 2-way processor cards), lsdev -Cc processor will show 4 processors, and pmcycles -m will show 8 CPU. REF: IBM redbook-p5-550.pdf
lscfg # # # # # # # list config ses are internal scsi disks scsi includes int and ext disks procX are CPUs fca = Fiber Channel HBA lot more detailed info, eg: use to search for fca see number and size of HD

lscfg -vp lscfg | grep disk lsslot -c pci -a lsdev

# list pci slot info # list devices

cfgmgr -S -v bootinfo -y -K -r -s hdisk0 bootinfo -b bootinfo -m -p -r ----

# # # # # # # # # # # # # # # #

rescan bus and install driver for new devices eg when new device made available over SAN scan serially (instead of parallel) verbose, print more status info Note that emc come with its wrapper script to do the work. 32 v 64-bit enabled NOTE: bootinfo is runnable by root only. current kernel mode show kernel native bits, NOTE: 32-bit can run 64 bit app anyway. real memory in system in KB disk size in MB last boot dev machine model code hw platform (type of bus, etc) show real memory in sys, in Kb

LPAR sysmtem From HMC (hardware manager console), cmds in /opt/hsc/bin query_cecs get_cec_state -m # list all online managed sys # find curret state of sys

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

get_op_panel -m get_cec_mtms -m

# get operator panel lcd code # frame type and serial number, buggy.

PACKAGE/SOFTWARE MANAGEMENT
lslpp -h bos.rte lslpp -L bos.rte lslpp -f bos.rte lslpp -l bos.net.nfs.client lppchk -v lslpp -l | grep vacpp installp flags a c g X d file p eg: installp -qa -d . -X all installp -rB -X all installp -c -g -X all smitty install_commit installp -qac -N all -d . installp -u [filesetname] installp -iq -d /dev/cd0 all installp -qA -d /dev/cd0 all # # # # # # apply updates reject updates commit updates same as above. install w/ commit on, no backup, no simple roll back. uninstall comitted lpp product # # # # # show fileset history (from package mgnt?) snapshot of main levele and statet of fileset see what files are installed by a given fileset. show fileset revision level chk see if any lpp product are broken, obsolete, missing

# show all fileset info about the ibm compiler

apply update (def action) commit recursively install prereq eXpand (local) FS is more space is needed. specify the location of the media file ( . for current dir). preview only, nothing will actually be done.

# display supplemental info abouut ML patch in cd # display APAR info

IBM Software iFOR licensing commands


i4cfg -list i4blt -r 6 -lp -lp -i -s -a -d -v -p -U -T # list license services status # # # # # # # # # # # license management for visual age. no param = help print report type 6. see help for more types. list licenses list licenses with extra info, such as time stamp prod license status add/enroll a produt delete license opt vendor info (for some custom lic, used by VA C++ opt product info update license specify number of user, cn license only

eg 14blt -a -f /usr/vac/c44aix_cn.lic -T 10 -R "registration_comment_avoid_space" # enroll a license. -T 10 inidcates number of licenses. i4blt -U -v "'IBM Software Solutions Toronto'" -p "'VisualAge C++ Professional' 6.0.n" -T 100 # Update license to allow 100 users. Only for _cn license type. # Be very careful about quotes! Name with spaces need additional # single quotes around them!!! Awful syntax and very cryptic error messge!! i4blt -d -n server_name -v "'vendor name with space'" -p "'product name' product_version" -t timestamp i4blt -d -v "'IBM Software Solutions Toronto'" -p "'VisualAge C++ Professional' 6.0.n" -t 1022291809 i4blt -d -v "'IBM Software Solutions Toronto'" -p "'C for AIX' 6.0.n" -t 1022291952 # delete a license. # -t is timestapm retrieved from output of i4blt -lp -i License files are located in /usr/vac/*.lic /usr/vacpp/*.lic

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

The files type are: C C++ cforaix_cn vacpp_cn _c _c _n _n

license file names = concurrent nodelock LUM license = concurrent network = simple nodelock

The First line of file is actually command for license enrollment.

Visual Age compiler license file installation requires the package bos.adt.libm For 5.1L, it is in CD 4/6. However, its install need to kick started from CD 1, by requesting the install of all all componets of bos.adt, which is not installed by default.

APPLYING ML
http://techsupport.services.ibm.com/server/mlfixes/43/ http://techsupport.services.ibm.com/server/mlfixes/43/11/00to11.html get aix ML (Maintenance Level patch) and instructions on installing it. inutoc ./usr/sys/inst.images/ installp -acgXd ./usr/sys/inst.images bos.rte.install smit update_all # cd /home_sc/sa/share/aix43.ml/433.noLevel_to_11 inutoc . installp -acgXd . bos.rte.install smit update_all oslevel -r # + reboot # this creates the .toc file # install the basic os patch ? # add the other patches

If getting APAR fixes with a series of .bff files, use (touch .toc, chmod 777 .toc) inutoc . and then smitty update_all on the dir to install all the patches. java 1.4 download, they came in .tar.gz format. strangely, it seems that I have to use tar xf from aix to correctly extract the archive. it become a backup/restore file which "smitty installp" as "Install Software" with path to the file as dir location will work. May actually need to specify the full name of the installp image filename in the path. tar off from solaris doesn't seems to work!!

SOFTWARE PATCHES
aka Program Temporary Fix
instfix instfix instfix instfix -i # -i | grep AIX_ML # -i -k IY78933 # -ivq | grep xlC.aix5.*rte show applied APAR fix fix done by ML patch see if a given IY APAR fix had been applied. | sort -u # list installed xlC runtime environment

/usr/lib/instl/sm_inst instfix_cmd -d '/lhome/root/vacpp7_rte8' -f 'IY78993' -c -N -X # install the specific IY78933 from the RunTimeEnv v8 for "xlC v7" # this can be done over NFS dir, provided .toc is created correctly # and stored on this NFS source. # The downloaded PTF file vacpp.70.aix.nov2005.ptf.tar.Z need to be extracted # which produce a series of .bff files in backup/restore format. /usr/lib/instl/sm_inst installp_cmd -a -Q -c -N -g -X -G \ -d '/nfshome/sa/share/aixX.smit/aix_vacpp_rte7_nov2005/extract' -f _all_latest # install the whole RunTimeEnv v8 for "xlC v7" /usr/lib/instl/sm_inst installp_cmd -a -c -N -g -X \ -d '/nfshome/sa/share/aixX.smit/aix_vacpp_rte7_nov2005/extract' -f _update_all # apply relevant updates from RunTimeEnv v8 for "xlC v7" # it will not display failure msg when optional debugger # components are not installed.

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

EXAMPLE: INSTALLING AND PATCHING IBM VISUAL AGE C++


copy cdrom image run smit use dir of cdrom/usr/sys/inst.images eg /nethome/sa/software/VisualAge_5.0.2_cd/usr/sys/inst.images /nethome/sa/software/VisualAge_5.0.2_cd/usr/sys/mvCD NOTE: use inst.images first, then mvCD. mvCD may have complain of wrong path, but it generally list more stuff and install more programs, even when some may fail. mvCD may be listing all software in the whole CD set, not just a given CD. mvCD would fail if content is network path and no CD media change is possible. actually, aix5l book suggest use of inst.images dir (build .toc before install if obtaining as tar is normal procedure.) use F7 or ESC,7 to toggle selection. can use keyword "all" to select all subpackages. but note that it will not currectly detect os level and then cause fialure notices. Applying patches : /nethome/sa/software/VisualAge_patch_to_5.0.2.7 it is like installing normal software, but the tar didn't have a .toc file. thru smit, there was an entry to list software in media, run it so that it created a .toc file. After that, install the patch as software (via smit update_all), which generate commands like: geninstall -I "a -cgNqwX -J" -Z File 2>&1 File: xlC.adt.include xlC.aix50.rte xlC.aix50.rte xlC.msg.en_US.rte xlC.rte geninstall -I "a -cgNqwX -J" -Z -d /nethome/sa/software/VisualAge_patch_March2003_runtimePTF -f

6.0.0.0 6.0.0.0 6.0.0.5 6.0.0.0 6.0.0.0 -d /nethome/sa/software/VisualAge_patch_March2003PTF -f File 2>&1

ADDING INTERNATIONAL LOCALE


smitty lang (System Environments,Manage Language Environment), go to "Add Additional Language Environments" Then there are two possibilities: - CULTURAL convention to install This add support for desired lang (already supported language can be found from "locale -a") - LANGUAGE translation to install This add system error message for many different software packages installed on the machine. Not typically needed for dev/test of intl lang support. Instead of putting CD into machine CD-ROM drive, one can specify network shared CD-ROM such as /net/tin-sun/cdrom, but it will NOT prompt to change CD, and any language locale pack selected not avail on network path will simply not be queue for install, so not even error message. If the CD has nothing about the related language, it will display error. Most International language locale start with CD #5. ---Can use Remove Lang Env to see list of installed lang translation locale. Sometime adding a language locale complain missing file set pre-req. do: cd directy to the dir with the bos.loc.com file, and install it manually. smitty installp on any of the CD doesn't show option to add this fileset! cd /share/aix5.2/disk1/usr/sys/inst.images

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

installp -acgXd . bos.loc.com lslpp -l | grep bos.loc.com bos.loc.com.CN 5.2.0.30 bos.loc.com.utf 5.2.0.50 [...] COMMITTED COMMITTED Common Locale Support Common Locale Support - UTF-8

May also need to put in CD #1 and use smitty installp, and add the necessary bos.iconv set appropriate to the desired language. --other locale/intl related cmd: chlang es_ES # change to use spanish from spain... update .profile, effective after re-login. # but I don't see the effects... chkbd lsfont lskbd

Ref: Understanding Locale from AIX online ref.

LOOSE ENDS
AIX dev env does not use LD_LIBRARY_PATH, but instead use LIBPATH
Places to get freeware for aix. http://silcon.silcon.com/~baspence/AIXtip/freeware.htm http://aixpdslib.seas.ucla.edu/ [recommended by esj] monitor # top like tool for real time monitor # t = top processes # a = toggle view mode # ? = help portmon

REFERENCE
rootvg.net AIX portal, lot of sutff! IBM Online documentation at http://publib.boulder.ibm.com/infocenter/pseries/ Service Guide for RS/6000 F80 (Ch 4 and 5 have 4 digits LED error code for boot time hardware/firmware problem). http://publib16.boulder.ibm.com/pseries/en_US/infocenter/base/hardware_docs/pdf/380568.pdf RS/6000 Diagnostic LEDs (BITS code, 3 digits used in older, small machines). BIST Error Code AIX Toolbox for Linux Download specific IBM fileset Specify OS version and "specific fixes", and it will bring a search page that allows retrieval of a specific version of a given fileset. eg bos.net.nfs.client 5.3.0.50.

AIX CD CATALOG
AIX does not have a "install everything" option. So, one often has to dig thru CDs to find the right package to add a desired feature. This file list what is in some of the CD. The vary by releases, so pretty long list. But easier to search here than keep on swapping CDs :) [Doc URL: http://www.cs.fiu.edu/~tho01/psg/aix.html] (cc) Tin Ho. See main page for copyright info.

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

Sys Admin Pocket Survival Guide - AIX

"LYS on the outside, LKS on the inside" "AUHAUH on the outside, LAPPLAPP on the inside"

---- Pending: /etc/filesystems sample cofig file. see aix/ subdir

http://users.cs.fiu.edu/~tho01/psg/aix.html[12/11/2011 12:33:01 PM]

You might also like