Beruflich Dokumente
Kultur Dokumente
-r
-q
-g
-l 5.2.0.0 #list filesets needing updates
-rl 5200-05 #what is "wrong" with this release version
lslpp -L bos.mp
#determine level of fileset X
lslpp -a -h bos.mp #determine history and level of fileset X
#determine what fileset a binary is part of
lslpp -w /usr/sbin/lsvpcfg
lslpp -w /usr/bin/java
lppchk -v
model/uname/serial num
prtconf
prtconf | grep "Serial Number"
prtconf | grep "System Model"
uname -M
en
order:
1.ln -sf /usr/lib/boot/unix_64 /unix
2.ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
3.bosboot -a
4.shutdown -Fr
5.bootinfo -K (should now show 64)
Documentation
no web
file:///usr/share/man/info/en_US/a_doc_lib/aixgen/topnav.htm
web
http://$SERVERNAME/doc_link/en_US/a_doc_lib/aixgen/topnav/topnav.htm
infoexplorer: info -h $TOPIC
size of disk
lscfg -v | grep disk
bootinfo -s (disk device)
ttyconf -l pcsim
lsdev -C -c tty -H
hostid exists, but use 'uname -m' - cpu-id
BOS: Basic OS
TMOUT=0
errpt == dmesg
setclock
oslevel == uname -v -r (swap x with y: 1 3 is 3.1)
tctl == mt ~= tapeutil
tapeutil -f /dev/rmt0 mount 49 #slot 49 to rmt0
tapeutil -f /dev/rmt0 umount 34 #from rmt0 to slot 34
tapeutil -f /dev/rmt0 inventory
/usr/sbin/sbdevice -vr rmt0 #rewind
/usr/sbin/sbdevice -ver rmt0 #rewind and eject
sbdevice -e /dev/rmt0
*OR* tcl -f /dev/rmt0 offline
*OR* tapeutil -f /dev/rmt0 unload
tcopy #does a tapedir and/or copy tape to tape
mkdev -c disk -s scsi -t osdisk -p scsi2 -a pv=yes
mkboot -c -d /dev/<diskname> # installboot on alternate disk
which_fileset CMD #needs bos.rte.install
istat #does inode status/info
/etc/filesystem == /etc/fstab
/etc/qconfig == /etc/printcap
mkps #add paging
chps #chg paging
rmps #rm paging
shutdown -m #maint or single user mode
enq == lpc
startsrc/stopsrc PRODUCT #rc scripts
bootinfo -K #32 or 64 bit kernel
bootinfo -r
OR
lsattr -E -l sys0 -F 'description value' -a 'realmem'
OR
lsattr -E -l sys0 -a realmem -F value
OR
lsattr -El mem0
#memory
lscfg -pv
lsattr -l sys0 -E
odmget -q "name = sys0 and attribute = autorestart" CuAt
diag -a #add or remove devices from system kernel and prom
cfgmgr
cfgmgr -i /dev/cd0 #load drivers for any new devices found, from the CD
lscfg
lscfg -l mem\*
lscfg -l mem\* -v
lscfg -vpl ent0
#get MAC
lsattr -Cc [disk | tape]
lslv -m hd5
#see who is the primary mirror for a lv
NEW_DISK=hdisk1
lspv
#see if it has a hex dev id
# if not, do a
chdev -l $NEW_DISK -a pv=yes
extendvg -f rootvg $NEW_DISK
#use mklvcopy if you don't want all LVs to be mirrored
mirrorvg -S rootvg $NEW_DISK
# done by mirrorvg "syncvg -v rootvg"
bosboot -a -d /dev/$NEW_DISK
bootlist -m normal hdisk0 $NEW_DISK
#make a VG
# big vg -B so you can more than 32 disks in a VG
mkvg -f -B -y new-vg hdiskx hdisky ...
#list install software
lslpp -h all | grep -i vrts
#determine level of fileset X
lslpp -L bos.mp
#determine history and level of fileset X
lslpp -a -h bos.mp
#determine what fileset a binary is part of
lslpp -w /usr/sbin/lsvpcfg
lslpp -w /usr/bin/java
#Commit all installed s/w
installp -c -g -X all
#Install
installp
installp
installp
installp
#install a package
installp -qa -d . printers.msg.en_US
#install a specific package version
installp -qa -d . printers.msg.en_US 5.2.0.0
#install a package and automatically load any prerequisite packages
installp -qag -d . printers.msg.en_US
#install "latest" ML (maintenance level) in curent dir
/usr/lib/instl/sm_inst installp_cmd -a -Q -d /tmp/ml -f _all_latest -c \
-N -g -X -G
#install "ALL" ML (maintenance level) in curent dir
/usr/lib/instl/sm_inst installp_cmd -a -d /tmp/ml -f _update_all -c \
-N -g -X
#missing packages? (ML level doesn't show what you expect)
# instfix -i | grep ML | grep not
# instfix -ivk 4330-11_AIX_ML | grep : | grep not
installp -a -Q -d /tmp/ml-XX -c -N -g -X all
#compare two systems
lslpp -Lc > /tmp/server1.out
lslpp -Lc > /tmp/server2.out
Display Configuration
Multiboot
Utilities
Select Language
press 5 to get
RS/6000 Firmware
Version WIL99308
(c) Copyright IBM Corp. 1997 All rights reserved.
------------------------------------------------------------------Multiboot
1
2
3
4
5
6
Select Software
Software Default
Install From
Select Boot Devices
OK Prompt
Multiboot Startup <OFF>
0=uniproc, 1=multiproc
led to the adapter, or when there is a problem with the connectivity to the chil
d device. The appearance of this message means that the problem is external to t
he adapter. So, cables and ports on switches and end devices should be checked,
re-seated, or replaced. To determine that the adapter is not at fault, follow th
ese steps:
1.
2.
3.
4.
1. Log in as root.
2. run "diag"
3. Press Enter on the first screen.
4. At the function Selection screen, highlight Advanced Diagnostics Routines
and press Enter.
5. At the Diagnostic Mode selection screen, highlight System Verification and
press Enter.
6. At the Advanced Diagnostic Selection screen, highlight the fcs#, press Ent
er and then press F7.
7. Follow the on-screen prompts to re-cable the adapter.
If a problem was found, then place a call with your local IBM Hardware represent
ative.
If no problem was found, then the problem is most likely external to the adapter
.
================================================================================
AIX Command Crib Sheet
OS LEVEL : AIX
DATE
: 29/01/2001
VERSION : 1.8
Latest version can be found at http://www.mort.level5.net/johnr/howto/aix.txt
---------------------------------------------------------------------------MISCELLANEOUS
---------------------------------------------------------------------------http://www.rs6000.ibm.com/cgi-bin/ds_form
oslevel
whence (program)
whereis (program)
what (program)
lslpp
lslpp
lslpp
lslpp
-L all
-L (program set name)
-f
-ha
alog -o -t boot
ar -v -t (archive file)
ar -v -x (archive file)
ar -v -t /usr/lib/libC-r.a
-c
-o
-l
-s
Displays
Displays
Displays
Displays
string information
object file headers
line numbers
the text section
snap -L /*
snap -ao /dev/rmt0
snap -ad (directory)
/usr/dt/bin/dtconfig -d
/usr/dt/bin/dtconfig -e
/var/dt/Xpid
-------------------------------------------------------------------------------TERMINALS
-------------------------------------------------------------------------------tty
termdef
adds getty line into /etc/inittab for tty0 and starts getty
disables the getty line and disables getty
lscons
chcons -a login=enable (device eg /dev/tty1)
-------------------------------------------------------------------------------NETWORK
-------------------------------------------------------------------------------tcpdump -ni en3 icmp
tcpdump -nei en3 icmp
tcpdump -nvvei en3 icmp
host (ip or hostname)
hostname
hostname (hostname)
Displays hostname
Sets the hostname until next reboot
-c if
(device
(device
(device
(device
name)
name) up
name) down
name) detach
netstat -i
netstat -ia
entstat -d (ethernet adapter eg en0)
arp -a
no -a
-------------------------------------------------------------------------------N.F.S.
-------------------------------------------------------------------------------exportfs
exportfs -a
exportfs -u (filesystem)
Un-exports a filesystem
mknfs
rmnfs
mknfsexp -d /directory
mknfsmnt
nfso -a
nfso -o option=value
nfso -o nfs_use_reserved_port=1
-------------------------------------------------------------------------------BACKUPS
-------------------------------------------------------------------------------MKSYSB
-----mkszfile -f
mkszfile -X
TAR ARCHIVE
----------tar -cvf (filename or device) ("files or directories to archive")
eg tar -cvf /dev/rmt0 "/usr/*"
TAR RESTORE
----------tar -tvf (filename or device)
Lists archive
AIX ARCHIVE
----------find (filesystem) -print | backup -iqvf (filename or device)
Backup by filename.
eg find /usr/ -print | backup -iqvf /dev/rmt0
backup -(backup level 0 to 9) -f (filename or device) ("filesystem")
Backup by inode.
eg backup -0 -f /dev/rmt0 "/usr"
AIX RESTORE
----------restore -qTvf (filename or device)
Lists archive
or flcopy
COPYING TAPES
------------dd if=/dev/rmt0 of=(filename)
dd if=(filename) of=/dev/rmt0
or tcopy
-------------------------------------------------------------------------------DEVICES
--------------------------------------------------------------------------------
lscfg
lscfg -v
lscfg -vl (device name)
bootinfo -b
bootinfo -k
bootinfo
bootinfo
bootinfo
bootinfo
bootinfo
-r
-s (disk device)
-T
-q disk-device
-e
answer
answer
< /dev/rmt0
export $LPDEST="pqname"
lsvirprt
lsdev -C
lists all customised devices ie installed
lsdev -P
lists all pre-defined devices ie supported
lsdev -(C or P) -c (class) -t (type) -s (subtype)
chdev -l (device) -a (attribute)=(new value)
chdev -l sys0 -a maxuproc=80
lsattr -EH -l (device) -D
lsattr -EH -l sys0 -a modelname
rmdev -l (device)
rmdev -dl (device)
rmdev -SRl (device)
rmdev -l pmc0
mkdev -l pmc0
-------------------------------------------------------------------------------TAPE DRIVES
-------------------------------------------------------------------------------rmt0.x where x = A + B + C
A = density
B = retension
C = rewind
tctl
tctl
tctl
tctl
tctl
-f
-f
-f
-f
-f
(tape
(tape
(tape
(tape
(tape
0 = high
0 = no
0 = no
device)
device)
device)
device)
device)
4 = low
2 = yes
1 = yes
fsf (No)
bsf (No)
rewind
offline
status
qchk -A
lpstat
lpstat -p(queue)
enq -U -P(queue)
enable (queue)
Enable a queue
enq -D -P(queue)
disable (queue)
Disable a queue
stopsrc -s sendmail
startsrc -s sendmail -a'-bd -q30m'
lssrc -s sendmail
refresh -s sendmail
printers
/usr/lib/lpd/pio/etc/piolsvp p
/usr/bin/lsallq
enq -a
-------------------------------------------------------------------------------FILE SYSTEMS
-------------------------------------------------------------------------------Physical Volumes (PV's)
----------------------lspv
lspv (pv)
lspv -l (pv)
lspv -p (pv)
Lists
Lists
Lists
Lists
chpv
chpv
chpv
chpv
-v
-v
-a
-a
r
a
y
n
(pv)
(pv)
(pv)
(pv)
all
the
the
the
(vg)
-l (vg)
-p (vg)
-o
Lists
Lists
Lists
Lists
Lists
varyonvg (vg)
varyonvg -f (vg)
varyonvg -s (vg)
all
the
all
all
all
volume groups
volume group details
logical volumes in the volume group
physical volumes in the volume group
varied on volume groups
varyoffvg (vg)
synclvodm (vg)
reducevg vg pv
ther system
exportvg (vg)
Note : Cannot export a VG if it has active paging space, so, turn off paging,
and reboot before exporting VG.
Exporting removes entries from filesystems file but does not remove
the mount points.
chvg -a y (vg)
extendlv lv05 10
# change the max num of PP a vol can have
chlv -x 1024 lv05
########
# chfs will automatically extend the LV as needed
########
chfs -a size=+200M /MTPT
Extend FS by 200 MB
chfs -a size=1000M /MTPT
Extend FS to be 1000MB
########
rmlv (lv)
rmfs (fs)
defrag -q (fs)
defragfs -r (fs)
defragfs (fs)
fsck (fs)
Verify a file system, the file system must be unmounted!
fsck (-y or -n) (fs) Pre-answer questions either yes or no !
fsck -p (fs)
Will restore primary superblock from backup copy if the
superblock is corrupt.
fsck -Dv (fs)
Verbose and Debug
Mirroring
--------mklv -y (lv) -c(copies 2 or 3) (vg) (No of PP's) (PV Name optional)
Creates a mirrored named logical volume.
mklvcopy -s n (lv) (copies 2 or 3) (pv)
Creates a copy of a logical volume onto another physical volume. The physical
volume MUST be in the same volume group as the orginal logical volume !
rmlvcopy (lv) (copies 1 or 2)
rmlvcopy (lv) (copies 1 or 2) (pv)
syncvg -p (pv)
syncvg -l (lv)
syncvg -v (vg)
displays bootlist
change bootlist
bootinfo -b
bootinfo -t
bootinfo -B hdiskX
bosboot -a -d (/dev/pv)
bootlist -m normal -o
Shows boot list
bootlist -m normal hdisk0 hdisk1
Sets the boot list
mkboot -c -d (/dev/pv)
savebase -d (/dev/pv)
-------------------------------------------------------------------------------SYSTEM DUMP
--------------------------------------------------------------------------------
sysdumpdev -l
sysdumpdev -e
sysdumpdev -L
sysdumpstart -p
sysdumpstart -s
(MCA machine can also dump if key is in service position and the reset
button is pressed)
sysdumpdev -p (dump device) -P
rmps (ps)
Note : Need to change the swapon entry in /sbin/rc.boot script if you are
changing the default paging space from /dev/hd6. You also need to
do a "bosboot -a -d /dev/hdiskx" before the reboot.
/etc/swapspaces
-------------------------------------------------------------------------------SCHEDULING
-------------------------------------------------------------------------------crontab -l
crontab
crontab
crontab
crontab
crontab
-e
-l > (filename)
(filename)
-r
-v
/var/adm/cron/cron.allow
/var/adm/cron/cron.deny
/var/adm/cron/crontab
at -l
atq
/var/adm/cron/at.allow
/var/adm/cron/at.deny
/var/adm/cron/atjobs
-------------------------------------------------------------------------------SECURITY
-------------------------------------------------------------------------------aixpert
groups
setgroups
is
is
is
is
-rwxrwxrwx
|||
|
Owner
(4
(4
(4
(4
SUID)
read)
read)
read)
(2
(2
(2
(2
-rwxrwxrwx
|||
|
Group
-rwSrwxrwx = SUID
SGID)
write)
write)
write)
+
+
+
+
(1
(1
(1
(1
SVTX)
execute) permissions for owner
execute) permissions for group
execute) permissions for others
-rwxrwxrwx
|||
|
Others
-rwxrwSrwx = SGID
drwxrwxrwt = SVTX
Do both !!!
passwd
pwdadm (username)
pwdck -t ALL
pwdck -p ALL
usrck -t ALL
grpck -t ALL
chsec -f /etc/security/lastlog -a unsuccessful_login_count=0 -s oracle #reset f
ailed logins
chuser account_locked=false oracle #unlock account
chuser (attributes) (user)
Change a user
chuser login=false (user)
Lock a user account
lsgroup
mkgroup
chgroup
rmgroup
ALL
(new group)
(attribute) (group)
(group)
-------------------------------------------------------------------------------USERS
-------------------------------------------------------------------------------passwd -f
passwd -s
chfn (username)
chsh (username) (shell)
env
printenv
id
id (user)
whoami
who am i
who
w
who -b
uptime
lslicense
chlicense -u (number)
lsuser ALL
lsuser (username)
Lists details for user
lsuser -a(attribute) (username or ALL) Lists user attributes
lsuser -a home ALL
mkuser -a(attributes) (newuser)
Change a user
Lock a user account
Unlock account
rmuser -p (user)
usrck -t ALL
-------------------------------------------------------------------------------REMOTE USERS
-------------------------------------------------------------------------------ruser -a -f (user)
ruser -a -p (host)
ruser -a -r (host)
ruser -d -f (user)
ruser -d -p (host)
ruser -d -r (host)
ruser -s -F
ruser -s -P
ruser -s -R
ruser -X -F
ruser -X -P
ruser -X -R
-------------------------------------------------------------------------------INITTAB
-------------------------------------------------------------------------------telinit S
telinit 2
telinit q
lsitab -a
lsitab (ident eg tty1)
mkitab ("details")
chitab ("details")
lsitab tty1
chitab "tty1:2:respawn:/usr/bin/getty /dev/tty1"
-------------------------------------------------------------------------------ODM
-------------------------------------------------------------------------------ERROR LOGGING
-------------------------------------------------------------------------------/usr/lib/errdemon -l
/usr/lib/errdemon
/usr/lib/errstop
errpt
errpt -a
errpt -j (identifier)
Note : The errclear command will delete all entries older than the numbers of
days specified in the days paramenter. To delete ALL entries used 0.
errlogger "message up to 230 chrs"
Enters an operator notifaction message into the errorlog.
-------------------------------------------------------------------------------PERFORMANCE MONITORING
-------------------------------------------------------------------------------topas (jtopas)
topas -P
vmstat
svmon
svmon -C command
svmon -P PID
nmon
-> m
vmo
vmo -a
vmo -h minfree
vmo -L minfree
vmo -r -o memory_affinity=0
Tune VM
procmon
GUI for processes
/usr/sbin/lparstat
LPAR stats, in bos.acct
/usr/bin/lparstat -i
/usr/bin/lparstat -H 100 600
perfpmr
ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr
perfpmr.sh 600
/usr/sbin/perf/diag_tool/pdt_config (set for 3)
/usr/sbin/perf/diag_tool/Driver_ daily
/usr/sbin/perf/diag_tool/pdt_report 3
trace
trcrpt
curt
splat
Trace object
Trace report
Trace file parser
Lock tracer (lockstat)
sar -u -P ALL 10 10
-------------------------------------------------------------------------------DOS DISKETTES
-------------------------------------------------------------------------------dosdir
dosdir (directory)
dosdel (dosfile)
dosformat
-------------------------------------------------------------------------------SENDMAIL
-------------------------------------------------------------------------------sendmail -bi
newaliases
sendmail -bp
mailq
sendmail -q
Restart sendmail
-------------------------------------------------------------------------------SP / PSSP
-------------------------------------------------------------------------------dsh (command)
Efence
Efence (node number)
Estart
spmon -q
spmon -d -G
spmon -L frame1/node3
spled
s1term -w (frame number) (node number) Opens serial terminal (read and write)
s1term (frame number) (node number)
Opens serial terminal (read only)
Example :s1term 1 1
splstdata -e
-d
-n
-h
-s
-b
-a
-i
================================================================================
#
#
# you can do, instead of this whole script:
#
#
mirrorvg rootvg $NEW_DISK
#
# in either case, if the NEW_DISK has no PVID
#
#
lspv #see if it has a hex dev id
#
# otherwise do a
#
#
chdev -l NEW_DISK -a pv=yes
#
# then add to rootdg
#
#
extendvg -f rootvg NEW_DISK
#
#
ORIG_DISK=hdisk0
NEW_DISK=hdisk1
# mirror to new disk
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
mklvcopy
hd5 2 $NEW_DISK
hd6 2 $NEW_DISK
hd8 2 $NEW_DISK
hd4 2 $NEW_DISK
hd2 2 $NEW_DISK
hd9var 2 $NEW_DISK
hd3 2 $NEW_DISK
hd1 2 $NEW_DISK
hd10opt 2 $NEW_DISK
locallv 2 $NEW_DISK
hd7 2 $NEW_DISK
syncvg -v rootvg
bosboot -ad $NEW_DISK
bosboot -ad $ORIG_DISK
bootlist -m normal $ORIG_DISK $NEW_DISK
================================================================================
#Using cplv to move a logical volume from one volume group to another
#For this example, we will move logical volume /dev/infprdlv (filesystem
/infoprod) to volume group newvg
#If needed, use smit to create the new volume group using the new disk
#If this is a new volume group, create jfslog
#get log list: lsvg -o | lsvg -l -i | grep log
mklv -t jfslog -y loglv02 -a'c' newvg 1 hdiskpower0
/usr/sbin/logform /dev/loglv02
# don't move logs (make new one - above)
# don't move paging (make new paging)
LOOP FOR EACH LV
umount /infoprod
# XX comes from PP field in "lsvg -l oldvg"
mklv -t copy -y'tinfprdlv' newvg XX hdiskpowerX
cplv -e tinfprdlv -f infprdlv
chlv -n oinfprdlv infprdlv
chlv -n infprdlv tinfprdlv
chfs -a dev=/dev/infprdlv /infoprod
chfs -a log=/dev/loglv02 /infoprod
mount /infoprod
lsvg -l newvg |grep infoprod
================================================================================
Available
Available
Available
Available
10-68-02
10-68-02
10-68-02
10-68-02
SRDF
hdisk21
hdisk22
hdiskpower0
hdiskpower1
hdiskpower2
Available
Available
Available
Available
Available
10-70-01
10-70-01
10-70-01
10-70-01
10-70-01
================================================================================
0516-1281 synclvodm: WARNING, lv control block of fn_trans_rl1
has been over written.
0516-622 synclvodm: Warning, cannot write lv control block data.
If you are using raw - this is OK as the LVs have their LVCB (logical volume con
trol block) in the first 512 bytes of the LV.
If not raw, then run "synclvodm".
If raw, *** DO NOT *** run "synclvodm".
================================================================================
Customer attempts to remove hdisk power devices and gets the following error mes
sage:
rmdev -dl hdiskpower0
#Method error (/etc/methods/ucfgpowerdisk):
lsdev -Cc disk | more
#all hdiskpower devices still here
powermt remove dev=hdiskpower0
#error ucfgpowerdisk
powermt remove dev=all
#prompt comes back right away
rmdev -dl fcs0 -R
rmdev -dl fcs1 -R
#error
rmdev -dl fsc2 -R
lsdev -Cc disk
#everything gone except powerpath disks
At this point, it appears that we will need to remove the disks from the ODM
for DISK in $(lsdev -Cc disk -Fname | grep power )
do
odmdelete -q name=${DISK} -o CuAt
odmdelete -q value=${DISK} -o CuAt
odmdelete -q name=${DISK} -o CuDv
odmdelete -q value3=${DISK} -o CuDvDr
odmdelete -q name=${DISK} -o CuDep
powermt config
# Check the system to see if it now displays correctly
powermt display
powermt display dev=all
lsdev -Cc disk
================================================================================
for DISK in $( lsdev -Cc disk -Fname | grep power)
do
echo $DISK
chdev -l $DISK -a pv=yes
done
================================================================================
MODEMS
either ttys
tty0, tty1,...
or port X in Devices -> Asynchronous Adapters
sa0,sa1,...
Create ttys on ports 0 to 7 on adapter sa3 :
lsdev -Cc adapter | grep sa
#get list of SA adapters
lsdev -Cc tty
#get list of all tty devices
lsattr -D -l tty4
#DEFAULT values
lsattr -E -l tty4
#EFFECTIVE values
lsattr -E -O -l tty4 #OUTPUT colon delimited EFFECTIVE values
for i in 0 1 2 3 4 5 6 7
do
mkdev -c tty -t tty -s rs232 -p sa3 -w ${i} -a speed=38400 \
-a term=vt100 -a login=enable
done
pdisable tty1
chdev -l tty1 -a speed=38400
/usr/lbin/tty/mon-cxma #test modem
/etc/inittab
tty3:2:respawn:/usr/sbin/getty
tty4:2:respawn:/usr/sbin/getty
tty5:2:respawn:/usr/sbin/getty
tty6:2:respawn:/usr/sbin/getty
/dev/tty3
/dev/tty4
/dev/tty5
/dev/tty6
pdisable
pdisable
pdisable
pdisable
tty3
tty4
tty5
tty6
38400
38400
38400
38400
direct
direct
direct
direct
tty3
tty4
tty5
tty6
================================================================================
rpm -ihv --ignoreos pci.df1080f9-1-91x4.aix.rpm
rpm -ihv --ignoreos lsls.rpm
rpm -q lsls.rpm
================================================================================
Part1 - Part2 - Part3 - Part4 - Part5 - MultiPage
comp.unix.aix Frequently Asked Questions (Part 1 of 5)
evolved to discuss predominantly AIX 3.x, 4.x, and the RS/6000. The
newsgroups comp.sys.ibm.pc.rt and comp.sys.ibm.ps2.hardware cover the
RT, mostly hardware and AOS 4.3, and on PS/2 hardware respectively.
Mark Whetzel posts FAQ lists about RTs in the rt and *.answers groups.
There are few to non-existent discussions on AIX/370 and AIX/ESA.
If you post questions to comp.unix.aix, please be sure to indicate:
- the machine type and brief configuration, e.g. Model 540, 64 MB RAM,
48 MB swap space (this is actually bad), 1.2 GB XYZ hard drive, etc.
Note: There are now five classes of RS/6000s - the original, RS or
POWER, RSC (POWER-Single Chip), RS/2 or POWER2, PowerPC and Power3.
- the exact AIX version number, i.e. AIX 3.1 is NOT sufficient, whereas
AIX 3.1.5 or AIX 3.1 with the 3005 update is. With 3.2 you should
mention any significant ptfs using the U4xxxxx numbers. With 4.r.m,
please mention version (4), release (r), modification (m) and
maintenance level, also if aplicable, any significant APAR numbers.
I am doing this on my own time. PLEASE DO NOT ASK ME QUESTIONS THAT
THAT SHOULD BE ASKED OF IBM. If you suspect you have software defect problems
call (800) 237-5511. If you have hardware problems call (800) IBM-SERV.
If you are outside the United States, contact your local IBM representative.
PLEASE DO NOT ASK ME QUESTIONS THAT SHOULD BE POSTED TO comp.unix.aix.
I don't have the time to diagnose individual AIX problems, and I
probably don't know the answer either. ;-) Many experienced and
knowlegable people read the newsgroup. Post your question there.
-----------------------------Table of contents:
1.0
1.000
1.001
1.002
1.003
1.004
1.005
1.006
1.007
1.008
1.009
General concepts
The AIX operating system - what is it?
I know neither Unix nor AIX - where do I find more information?
What is the Object Database?
How do I get rid of the verbose error messages?
Which release of AIX do I have?
What hardware do I have? What is availible? WITS?
Is IBM "dropping" AIX? AIX 3 discontinued.
Is IBM "dropping" AIX? AIX 4.1/4.2 discontinued.
e-Server pSeries (Is IBM "dropping" RS/6000 ?)
Monterey / AIX 5L
1.1
1.100
1.101
1.102
1.103
1.104
1.105
1.108
1.109
1.110
1.111
1.112
1.113
1.114
1.115
1.116
1.117
1.118
1.119
1.120
1.121
1.122
1.123
1.124
1.125
1.126
1.127
1.128
1.129
1.130
1.131
1.132
1.133
1.134
1.135
1.136
1.137
1.138
1.139
1.140
1.141
1.142
1.143
1.144
1.145
1.146
1.147
1.148
1.149
1.150
1.151
1.152
1.153
1.154
1.155
1.2
1.200
1.201
1.202
1.203
1.204
1.205
1.206
1.207
1.208
1.209
1.210
1.211
1.212
1.3
1.300
1.301
1.302
1.303
1.304
1.305
1.306
1.4
1.400
1.401
1.402
1.403
1.404
1.405
1.406
1.407
1.408
1.409
1.410
1.411
1.412
1.5
Video, Graphics, X11
1.500 Which release of X11 do I have?
1.501 How to prevent ctrl-alt-backspace from killing the X session
1.502 Who has a termcap/terminfo source for aixterm or the HFT console?
1.503 How can I look at PostScript files? Why is "dpsexec" so lousy?
1.504 unix:0 vs `hostname`:0
1.505 VT100 key bindings for aixterm
1.506 Is there a screen saver that does not use excessive CPU?
1.507 Where are the colors, availible for an X session, listed.
1.508 Why does my app hang the X server but not an X station?
1.509 How do I switch the control and caps lock key bindings?
1.510 Missing fonts?
1.511 What's the termcap entry for an IBM 3151 look like?
1.512 Errors starting X11 application binaries from aixpdslib.
1.513 .XShm*, .sm* (Shared memory) Link errors building Xwindows
applications.
1.514 How do I set my DISPLAY when I login to another machine?
1.515 Why doesn't Netscape work?
1.6
1.600
1.601
1.602
1.603
1.604
1.605
1.606
1.607
1.608
1.609
1.610
1.611
1.612
1.613
1.614
1.615
1.616
1.617
1.618
1.619
1.620
1.621
1.622
1.623
1.624
1.625
1.626
1.627
1.7
1.700
1.701
1.702
1.703
1.704
1.705
1.706
1.707
1.708
1.709
1.710
LVM
Free LVM lecture slides
How do I shrink /usr? (formerly 1.106)
How do I make a filesystem larger than 2Gb? (formerly 1.107)
Chlv warning, is the first 4k of a LV safe? (formerly 1.139)
What's the limit on Physical Partitions Per Volume Group?
Why am I having trouble adding another disk to my VG?
What are the limits on a file, filesystem?
Hints for Segate 9 GB and other disks larger than 4 GB? (see 1.704)
How do I fix Volume Group Locked?
How do I remove a volume group with no disks?
What are the theoretical limits within the LVM?
1.8
1.800
1.801
1.802
1.803
AIX 4.X
How do I control how hostnames are resolved?
dtlogin ignores /etc/profile?
Where's the C compiler?
Why doesn't Netscape work?
1.9
1.900
1.901
1.902
1.903
1.904
1.905
1.906
1.907
1.908
1.909
1.910
1.911
1.912
1.913
Miscellaneous
SCSI-1 and SCSI-2 "interoperability" got you confused?
How to get your keyboard back after unplugging it from the 6000
How do I set up pcsim, the DOS emulator?
How do I transfer files between AIX and DOS disks?
Where is the crypt program?
How do I play audio CDs?
How can I get the mouse back after unplugging it?
Where can I get source code to the operating system binary xxxxx?
What's the difference between the POWER and POWERPC architectures?
Will there be date rollover problems in the year 2000?
How can I build an "installp format" file?
Is there a generic SCSI driver for AIX?
Viruses or virus scanning on AIX?
How do I determine the clock frequency of a RS/6000 by
software ?
1.914 How do I create a ramdisk ?
1.915 Can I run Linux on an RS/6000 ?
2.00
2.01
2.02
2.03
2.04
2.05
2.06
C/C++
I cannot make alloca work
How do I compile my BSD programs?
Isn't the linker different from what I am used to?
How do I statically link my program?
How do I make my own shared library?
Linking my program fails with strange errors. Why?
2.07
2.08
2.09
2.10
2.11
2.12
2.13
2.14
2.15
2.16
2.17
2.19
2.20
2.21
2.22
2.23
2.24
2.25
2.26
2.27
2.28
2.29
2.30
2.31
2.32
4.23
4.24
4.26
4.27
4.28
4.29
4.30
4.31
4.32
4.33
4.34
5.00
5.01
5.02
5.03
5.04
5.05
5.06
5.07
5.08
5.09
5.10
5.11
6.00
6.01
6.02
6.03
6.04
6.05
6.06
6.07
6.08
6.09
6.10
6.11
8.00
8.03
8.04
8.05
8.06
8.06
8.07
8.08
8.09
8.10
Program listings
How do I set up postscript accounting?
How can I find out the machine type?
Updating to 3.2.5
How do I do remote backup?
How do I do remote backup? (cont.)
How to configure dialup SLIP
Disabling software flow control; using RTS/CTS.
How can I hack libc.a to alter how hostnames are resolved?
How do I make an export list from a library archive?
9.00 Contributors
and Intel architecture machines is AIX 1.3; for PS/2s only, 1.2.1. For
the RS/6000, there are five major levels, 3.1, 3.2, 4.1, 4.2, 4.3, and
various intermediate levels. IBM has dropped support for 3.1, 3.2, 4.1
and 4.2
Y2K compliancy issues have been addressed by PTF's on 3.2, and 4.*.
For those who don't have a copy of /usr/lpp/bos/README or bsd, I'll
sumarize: IBM tried to follow IEEE, POSIX 1003.1, ANSI C, FIPS and
then X/Open Issue 3. Beyond that, AIX is a combination of System V
and BSD.
$ cat no-such-file
cat: Cannot open no-such-file.
By default LC_MESSAGES is the same as your environment LANG. Setting
LANG does also work, but should be avoided since it changes
app-defaults lookup etc. See locale(): LC_ALL
Date
Time
User Name
---------- -------- --------12/31/69
11/12/92
11/12/92
11/12/92
18:00:00
20:09:35
23:18:21
23:18:20
root
root
root
root
08/28/93
08/28/93
15:34:13 root
15:34:11 root
For AIX 3.2, you may come across discussions on 3.2.0, 3.2.1, 3.2.2,
3.2.3 extended, 3.2.4 and 3.2.5. There is no absolute way to tell which
of these you are running since the newer releases are simply 3.2.0 with
some sets of PTFs added. See above example listing. These selective
fixes could mean there are literally thousands of slightly different
variations of 3.2 in use. Please see section 6 to request some useful
faxes to help with this number game.
AIX 3.2.4 and later attempts to resolve this confusion. The OS is
broken down into subsystems so that updates can be applied to an entire
subsystem. lslpp also sports a new option; use 'lslpp -m bos.obj' to
show what level and update the system is running. You can also use the
new oslevel command. Unless you have a pressing need (such as
applications unsupported on > 3.2.3), it is recommended that you update
to this level. Also see 1.128.
"Download" button once the top page loads, then look for "The Large
AIX Freeware and Shareware Archive" link.]
What SMIT actually does is build up commands with all required options
to perform the functions requested and execute them. The commands
called and the output they produce are stored in the files smit.script
and smit.log in your home directory. Looking in smit.script may teach
you more about system administration.
This is normal behavior, the swapper looks to ps like it has the entire
paging space plus real memory allocated.
are going to use it for utility programs and other data that does not
change much, it may still be useful. If you need to change the data,
you can copy the directory from the floppy into another directory, make
your modifications, and remake the filesystem using this procedure.
and
/usr/lpp/bos/deinstl*
/usr/lpp/bos/inst_U4*
/usr/lpp/bosadt/deinstl*
/usr/lpp/bosadt/inst_U4*
You may repeat this for all additional COMMITted products (e.g.,
bostext1, bosnet, xlc) you have on your system.
This problem of lingering install
If you have installed PTF U411711
U413366, U413425) the deadwood in
No single PTF currently available
#
*.err;kern.debug;auth.notice;user.none
/dev/console
*.err;kern.debug;daemon,auth.notice;mail.crit;user.none /var/adm/messages
lpr.debug
/var/adm/lpd-errs
*.alert;kern.err;daemon.err;user.none
*.alert;user.none
*.emerg;user.none
operator
root
*
@siempoc
refresh -s syslogd
Subject: 1.116: How can I log information about ftp accesses to a file?
From: elr@trintex.uucp (Ed Ravin)
From: map@hal.maths.monash.edu.au (Michael Page)
1) In /etc/syslog.conf, add the line:
daemon.debug
/tmp/daemon.log
2) # touch /tmp/daemon.log
# refresh -s syslogd
3) Modify your inetd.conf so that ftpd is called with the "-l" flag.
You may also want the "-d" flag. This can be done with 'smit inetdconf'.
All the syslog messages from various system daemons should now appear in
the file "/tmp/daemon.log".
Subject: 1.117: How do I find a file name from the inode number?
From:
/G=Bill/S=Mansfield/O=P00S38E/OU1=notes/DD.HPNOTES=Bill_Mansfield/mcd/us#a#MCD@m
hs-mcdusa.attmail.com
(Bill Mansfield)
ncheck -i nnnn /mntpoint
bosboot -d /dev/fd0 -a
mkdispdskt
Subject: 1.121: How can I tell what virtual printer a print queue is using?
From: yoder@austin.ibm.com (Stuart R. Yoder)
Use the command 'lsvirprt'. Don't use any parameters and it will
run in an interactive mode that will give you a menu of all virtual
printers on the system with the queue and device for each one.
smit chgtty
and add the keyword 'clocal' in following lines:
STTY attributes for RUN TIME
STTY attributes for LOGIN
Subject: 1.123: How do I set the tty name associated with a physical port?
From: accapadi@mathew.austin.ibm.com (Matt Accapadi)
Let's say you wanted to make a tty on the s1 port and call it rs0000
and a tty on the s2 port and call it rs0001.
You could run:
mkdev -c tty -s rs232 -t tty -l rs0000 -p sa0 -w s1
and
mkdev -c tty -s rs232 -t tty -l rs0001 -p sa1 -w s2
# creates rs0000
# creates rs0001
***
***
1) Receive the PMP3250 tape from your AIX support center the PTF number
is U493250.
2) Create a filesystem with 240 MB of space (60 PP's) and mount it as
/dev/pmp3250 - /pub/pmp3250
3) Insert the tape (blocksize is 512) and install PTF U422467
# installp -BXacgq -d /dev/rmt0 bos.obj 3.2.0.0.U422467
4) Use the following script to load the tape in the new filesystem
# cd /pub/pmp3250
# mktape2disk.sh 0 447
and make sure they all worked together. But the initial selective fix
design still had a few problems.
o None of the fixes were cumulative. If you got a fix for Korn shell,
you may not receive all of the fixes for Korn shell. This left the
possibility of rediscovering other problems that were already fixed.
o Since we chose to fix everything possible that was reported as a
problem, instead of deferring them to the next release, the number
of available fixes became quite large.
o The number of additional fixes required by any given fix could also
be quite large. Since the installation program ran once for each
fix, the size and complexity of the fix packages grew, and
installation time lengthens greatly.
While developing the AIX 3.2.4 upgrade, we undertook a large effort to
resolve the selective fix concerns, and dramatically increase the
quality of AIX 3.2. The base operating system and most of the optional
program products were split into subsystems. A subsystem is a group of
logically related files. The division was made such that changes to a
given subsystem were less likely to affect other subsystems. In total
there are approximately 500 subsystems, but in practice, files have been
modified in only about half of them. The advantages of the new
packaging strategy are:
o Each subsystem package is cumulative, containing all of the fixes
and enhancements to date for that subsystem.
o The cumulative subsystem package is tested as an entity.
o The number of fix packages is greatly reduced because the number of
subsystems is far fewer than the number of fixes and enhancements.
o The number of other fixes required by any given fix is also greatly
reduced because a subsystem package has requisites only on other
subsystem packages.
o The reduced number of fix packages greatly reduced installation time.
Some customers also told us that they liked the maintenance level
strategy that we used in AIX 3.1. They liked being able to install all
of the known fixes, and they liked knowing what "level" of AIX they had.
To meet these requirements, we produced a Preventive Maintenance Package
(PMP). The PMP is simply a collection of the latest cumulative
subsystem packages tied together in such a way that it can be installed
by selecting a single fix. We also added flags to the lslpp command and
added a new command, oslevel, to show which PMP is installed. Now we
had both! The good attributes of selective fix along with the good
attributes of maintenance levels.
A few Q&As:
Q. Why is the fix I just received 130 megabytes!@#? I already have the
AIX 3.2.4 update installed!
A. Your fix may be part of the AIX 3.2.5 update. AIX 3.2.5 is another
PMP that contains all of the fixes to date, as well as enhancements
to support the PowerPC model 250, and the new high-end RS/2 models
590 and 990, as well as support for new disk and tape drives, graphics
adapters and more.
Subject: 1.139: How can I resolve DEV_WAIT status for a local print queue?
From: chuah@sam.po.my (Chuah Teik Chye)
Try "qadm -k && qadm -U"
Subject: 1.142: How can I get PTF (fixes) via ftp? What is fixdist?
Get a copy of IBM's fixdist package. This X-windows (and curses) program
can help you find and transfer PTFs from IBM to your machine. It is
availible
from <ftp://aix.boulder.ibm.com/aix/tools/fixdist/> and further instructions
are displayed after you login. It is worth noting here that the files
fixdist retrieves are often quite large and therefore not recommended
for those with slow connections.
Ciaran Deignan <C.Deignan@frec.bull.com> says that Bull offers AIX
PTFs at <http://www-opensup.bull.com/>. The basic download facility
requires that you have the right PTF number. The "Consult" facility
allows you to search for PTFs that apply to a given fileset (bos.rte.tty, for
example). The "search" facility allows a PTF to be selected on a wide
range of criteria.
Apple has their own fixdist site with all the fixes that has been
approved on the Apple Network Servers. Apple users should NOT use
the fixes available from IBM and their mirrors, but only from:
<ftp://fixdist.support.apple.com/> (130.43.6.8).
x
|
|
|
record LENGTH --+
x
x
x
x
x
x
x ...
|
|-------- filename ------|
|
+-- filename length
Note that the inode number may begin at any position on the line.
Note also that each number represents two bytes, so the address
of the LENGTH field will be `{ADDRESS} + (#hops * 2) + 1'
11) Starting with the first word of the inode number, count in OCTAL
until you reach the inode number of the file to be restored,
assuming each word is 2 bytes.
12) "0{ADDRESS}B={BYTES}"
(where ADDRESS is the address of the record LENGTH field found
in step #10, and BYTES is the number of bytes [octal] counted
in step #11)
13) If the value found in the LENGTH field in step #10 is greater than
255, also type the following:
"0{ADDRESS-1}B=0"
(where ADDRESS-1 is one less than the ADDRESS recorded in step #10)
This is necessary to clear out the first byte of the word.
14) "q"
(quit fsdb)
15) "fsck {Mountpoint}" or "fsck /dev/{LVname}"
This command will return errors for each recovered file asking if
you wish to REMOVE the file. Answer "n" to all questions.
For each file that is listed, record the associated INODE number.
16) "fsdb /{Mountpoint}" or "fsdb /dev/{LVname}"
17) {BLOCK}i.ln=1
(where BLOCK is the block number recoded in step #15)
This will change the link count for the inode associated with
the recovered file. Repeat this step for each file listed in
step #15.
18) "q"
(quit fsdb)
19) "fsck {Mountpoint}" or "fsck /dev/{LVname}"
The REMOVE prompts should no longer appear. Answer "y" to
all questions pertaining to fixing the block map, inode map,
and/or superblock.
20) If the desired directory or file returns, send money to the author
of this document.
<http://www-frec.bull.com/>.
Subject: 1.153 Why does init not reap its zombie child processes?
If you have lots of zombie (defunct) processes with parent process id 1,
the init process is probably waiting for some bad /etc/inittab
configuration line to finish. Check the inittab file for entries that
specify the wait keyword for processes that do not terminate. These
lines should probably specify "once" or "respawn" instead.
Subject: 1.155 Why doesn't the df -k output reflect the space I added
to an LV?
You need to use the chfs command or the smit chfs menu to tell the file
system to use the new space. By the way, in most cases it is better to
just increase the size of the file system, it will increase the
underlying LV automatically.
Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)
Last Update April 20 2007 @ 02:42 AM
================================================================================
Document options
Set printer orientation to landscape mode
Print this page
Email this page
E-mail this page
Congratulations!
developerWorks wins Jolt Hall of Fame award
Rate this page
Help us improve this content
Level: Intermediate
Shiv Dutta, Technical Consultant, IBM
Brad Cobb (bcobb@us.ibm.com), AIX Collaboration Center, IBM
30 Oct 2003
Updated 11 Apr 2006
Perhaps no other aspect of AIX generates as much confusion as AIX
updates. AIX users constantly struggle with questions, such as: What's a
program temporary fix (PTF)? What's an authorized program analysis report
(APAR)? Am I running the latest Maintenance Level (ML) or Technology Level
(TL)? What is the latest ML or TL? By understanding the answers to these
questions, you learn how to discover, install, and use AIX updates.
More dW content related to: aix compare software lists between systems lslpp
Introduction
When this article was first published in July 2003, it generated a tremendous
response. AIX users from all over the world were pleased to have many of
their questions answered regarding AIX updates. Based upon feedback from
readers, we learned that there are many more unanswered questions that
weren't covered in the original article. Version 2 of this article, first
published in 2003 and updated in 2005, addressed more of these unanswered
questions. It also included all of the original questions so you would have a
single reference document.
You can determine which fileset updates are missing by using the command:
oslevel -rl 5300-04
How would I know which fileset(s) and which APARs (fixes) are included in the
above maintenance package?
Clicking on the Package information tab on the Web page discussed in the
previous answer will show this information.
How do I download a particular APAR and how do I know which filesets are
effected by it?
Go to Quick links for AIX fixes Web page. Under the Specific fixes
category:
*
*
*
*
*
*
*
*
*
*
*
*
*
filesets
filesets
filesets
filesets
for
for
for
for
5300-01_AIX_ML
5300-02_AIX_ML
5300-03_AIX_ML
5300-04_AIX_ML
were
were
were
were
found.
found.
found.
found.
oslevel s
5300-03-CSP
How can I determine which fileset updates are missing from a particular AIX
level?
Run the following command to determine which fileset updates are missing
from a level:
oslevel -rl 5300-04
How do I determine if a particular fix is installed on my system?
The following command checks to see if the fix IY24043 is installed.
instfix -ik IY24043
All filesets for IY24043 were found.
If all filesets were not installed, the system displays a message to that
effect.
How do I verify that the filesets have the required prerequisites and are
completely installed?
The output from the command lppchk -v shows if the filesets have the
required prerequisites and are completely installed. If there is no output
from this command, the filesets are completely installed. Otherwise, the
filesets that need to be installed or corrected are displayed.
What does AIX 5300-03 consist of?
The AIX 5300-03 Recommended Maintenance package is a set of hardware and
AIX 5L enhancements and AIX 5L fixes for AIX 5.3.0. This maintenance package
is intended for customers that already have AIX 5.3.0 installed and want a
later set of preventive maintenance.
What does AIX 5300-04 consist of?
AIX 5300-04 refers to AIX 5L Version 5.3 TL4. It has a set of hardware
enhancements and AIX 5L fixes. It does not have any AIX 5L enhancements. This
package is intended for customers that already have AIX 5.3.0 installed and
want to move to 5300-04.
Other than the Download option, are there other ways to get a maintenance
package?
Yes, there are two other ways:
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
smit list_media_fixes
Note:
AIX 5L Version 5.3 does not support a uniprocessor kernel.
How can I change from one kernel mode to another?
During the installation process, one of the kernels, appropriate for the AIX
version and the hardware in operation, is enabled by default. Let us use the
method from the previous question and assume the 32-bit kernel is enabled.
Let us also assume that you want to boot it up in the 64-bit kernel mode.
This can be done by executing the following commands in sequence:
ln -sf /usr/lib/boot/unix_64
ln -sf /usr/lib/boot/unix_64
/unix
/usr/lib/boot/unix
Note:
In AIX 5.2, the 32-bit kernel is installed by default. In AIX 5.3, the 64-bit
kernel is installed on 64-bit hardware and the 32-bit kernel is installed on
32-bit hardware by default.
Hardware
How would I know if my machine is capable of running AIX 5L Version 5.3?
AIX 5L Version 5.3 runs on all currently supported CHRP (Common Hardware
Reference Platform)-based POWER hardware.
How would I know if my machine is CHRP-based?
Run the prtconf command. If it's a CHRP machine, the string chrp appears on
the Model Architecture line.
How would I know if my System p machine (hardware) is 32-bit or 64-bit?
To display if the hardware is 32-bit or 64-bit, type:
bootinfo -y
How much real memory does my machine have?
To display real memory in kilobytes (KB), type one of the following:
bootinfo -r
lsattr -El sys0 -a realmem
Can my machine run the 64-bit kernel?
64-bit hardware is required to run the 64-bit kernel.
What are the values of attributes for devices in my system?
To list the current values of the attributes for the tape device, rmt0, type:
lsattr -l rmt0 -E
To list the default values of the attributes for the tape device, rmt0, type:
lsattr -l rmt0 -D
To list the possible values of the login attribute for the TTY device, tty0,
type:
lsattr -l tty0 -a login -R
To display system level attributes, type:
lsattr -E -l sys0
How many processors does my system have?
To display the number of processors on your system, type:
lscfg | grep proc
How many hard disks does my system have and which ones are in use?
To display the number of hard disks on your system, type:
lspv
How do I list information about a specific physical volume?
To find details about hdisk1, for example, run the following command:
lspv hdisk1
How do I find out the chip type, system name, node name, model number, and so
forth?
The uname command provides details about your system.
uname -p
Displays the chip type of the system. For example, PowerPC.
uname -r
Displays the release number of the operating system.
uname -s
Displays the system name. For example, AIX.
uname -n
Displays the name of the node.
uname -a
Displays the system name, nodename, version, machine ID.
uname -M
Displays the system model name. For example, IBM, 9114-275.
uname -v
Displays the operating system version.
uname -m
Displays the machine ID number of the hardware running the
system.
uname -u
Displays the system ID number.
AIX
What version, release, and maintenance level of AIX is running on my system?
Type one of the following:
oslevel -r
lslpp -h bos.rte
How can I determine which fileset updates are missing from a particular AIX
level?
To determine which fileset updates are missing from 5300-04, for example, run
the following command:
oslevel -rl 5300-04
What SP (Service Pack) is installed on my system?
To see which SP is currently installed on the system, run the oslevel -s
command. Sample output for an AIX 5L Version 5.3 system, with TL4, and SP2
installed would be:
oslevel s
5300-04-02
The following command will create, within volume group testvg, a jfs file
system of 10MB with mounting point /fs1:
crfs -v jfs [-d(lv) | -g testvg] -a size=10M -m /fs1
The following command will create, within volume group testvg, a jfs2 file
system of 10MB with mounting point /fs2 and having read only permissions:
crfs -v jfs2 [-d(lv) | -g testvg] -a size=10M -p ro -m /fs2
mount
How do I remove a file system?
Type the following command to remove the /test file system:
rmfs /test
How can I defragment a file system?
The defragfs command can be used to improve or report the status of
contiguous space within a file system. For example, to defragment the file
system /home, use the following command:
defragfs /home
Which fileset contains a particular binary?
To show bos.acct contains /usr/bin/vmstat, type:
lslpp -w /usr/bin/vmstat
Or to show bos.perf.tools contains /usr/bin/svmon, type:
which_fileset svmon
How do I display information about installed filesets on my system?
Type the following:
lslpp -l
How do I display all logical volumes that are part of a volume group (for
example, rootvg)?
You can display all logical volumes that are part of rootvg by typing the
following command:
lsvg -l rootvg
How do I list information about logical volumes?
Run the following command to display information about the logical volume
lv1:
lslv lv1
How do I remove a logical volume?
You can remove the logical volume lv7 by running the following command:
rmlv lv7
The rmlv command removes only the logical volume, but does not remove other
entities, such as file systems or paging spaces that were using the logical
volume.
How do I mirror a logical volume?
1. mklvcopy LogicalVolumeName Numberofcopies
2. syncvg VolumeGroupName
How do I remove a copy of a logical volume?
You can use the rmlvcopy command to remove copies of logical partitions of a
logical volume. To reduce the number of copies of each logical partition
belonging to logical volume testlv, enter:
rmlvcopy testlv 2
Each logical partition in the logical volume now has at most two physical
partitions.
Queries about volume groups
VolumeGroupName
How do I find out what the maximum supported logical track group (LTG) size
of my hard disk?
You can use the lquerypv command with the -M flag. The output gives the LTG
size in KB. For instance, the LTG size for hdisk0 in the following example is
256 KB.
/usr/sbin/lquerypv -M hdisk0
256
You can also run the lspv command on the hard disk and look at the value for
MAX REQUEST.
What does syncvg command do?
The syncvg command is used to synchronize stale physical partitions. It
accepts names of logical volumes, physical volumes, or volume groups as
parameters.
For example, to synchronize the physical partitions located on physical
volumes hdisk6 and hdisk7, use:
syncvg -p hdisk4 hdisk5
v717lg01:
LV NAME
TYPE
LPs PPs PVs LV STATE
l717lg01
???
260 260 1
open/syncd
loglv00
???
1
1
1
open/syncd
[root@MYSYS] > lslv l717lg01
0516-306 lslv: Unable to find l717lg01 in the Device
Configuration Database.
[root@MYSYS] > synclvodm -Pv v717lg01
synclvodm: Physical volume data updated.
synclvodm: Logical volume l717lg01 updated.
synclvodm: Logical volume loglv00 updated.
[root@MYSYS] > lslv l717lg01
LOGICAL VOLUME:
l717lg01
VOLUME GROUP:
LV IDENTIFIER:
000933561562957c.1
PERMISSION:
VG STATE:
active/complete
LV STATE:
TYPE:
jfs
WRITE VERIFY:
MAX LPs:
512
PP SIZE:
COPIES:
1
SCHED POLICY:
LPs:
260
PPs:
STALE PPs:
0
BB POLICY:
INTER-POLICY:
maximum
RELOCATABLE:
INTRA-POLICY:
center
UPPER BOUND:
MOUNT POINT:
/mdorlg001
LABEL:
MIRROR WRITE CONSISTENCY: on
EACH LP COPY ON A SEPARATE PV ?: yes
[root@MYSYS ] > lsvg -l v717lg01
v717lg01:
LV NAME
TYPE
LPs PPs PVs LV STATE
l717lg01
jfs
260 260 1
open/syncd
loglv00
jfslog
1
1
1
open/syncd
MOUNT POINT
/mdorlg001
N/A
v717lg01
read/write
opened/syncd
off
16 megabyte(s)
parallel
260
relocatable
yes
16
/mdorlg001
MOUNT POINT
/mdorlg001
N/A
================================================================================
svmon
svmon -P <pid>
Further:
use can user svmon command to monitor memory usage as follows;
(A) #svmon -P -v -t 10 | more
(B) #svmon -U -v -t 10 | more
smit install requires "inutoc ." first. It'll autogenerate a .toc for you
I believe, but if you later add more .bff's to the same directory, then
the inutoc . becomes important. It is of course, a table of contents.
dump -ov /dir/xcoff-file
topas, -P is useful # similar to top
When creating really big filesystems, this is very helpful:
chlv -x 6552 lv08
Word on the net is that this is required for filesystems over 512M.
esmf04m-root> crfs -v jfs -gptmpvg -a size=884998144 -m/ptmp2
-A `locale yesstr | awk -F: '{print $1}'` -prw -t'' `locale yesstr |
awk -F: '{print $1}'`'' -a frag= 4096 -a nbpi= 131072 -a ag= 64
Based on the parameters chosen, the new /ptmp2 JFS file system
is limited to a maximum size of 2147483648 (512 byte blocks)
New File System size is 884998144
esmf04m-root>
If you give a bad combination of parameters, the command will list
possibilities. I got something like this from smit, then seasoned
to taste.
If you need files larger than 2 gigabytes in size, this is better.
It should allow files up to 64 gigabytes:
crfs -v jfs -a bf=true -g'ptmpvg' -a size='884998144' -m'/ptmp2' -A''` |
| locale yesstr | awk -F: '{print $1}'`'' -p'rw' -t''`locale yesstr | aw
|
| k -F: '{print $1}'`'' -a nbpi='131072' -a ag='64'
Show version of SSP (IBM SP switch) software:
lslpp -al ssp.basic
llctl -g reconfig - make loadleveler reread its config files
oslevel (sometimes lies)
oslevel -r (seems to do better)
lsdev -Cc adapter
pstat -a looks useful
vmo is for VM tuning
On 1000BaseT, you really want this:
chdev -P -l ent2 -a media_speed=Auto_Negotiation
Setting jumbo frames on en2 looks like:
ifconfig en2 down detach
chdev -l ent2 -a jumbo_frames=yes
chdev -l en2 -a mtu=9000
chdev -l en2 -a state=up
Search for the meaning of AIX errors:
http://publib16.boulder.ibm.com/pseries/en_US/infocenter/base/eisearch.htm
nfso -a shows AIX NFS tuning parameters; good to check on if you're
getting badcalls in nfsstat. Most people don't bother to tweaks these
though.
nfsstat -m shows great info about full set of NFS mount options
Turn on path mtu discovery
no -o tcp_pmtu_discover=1
no -o udp_pmtu_discover=1
TCP support is handled by the OS. UDP support requires cooperation
between OS and application.
nfsstat -c shows rpc stats
To check for software problems:
lppchk -v
lppchk -c
lppchk -l
List subsystem (my word) status:
lssrc -a
mkssys
rmssys
chssys
auditpr
refresh
startsrc
stopsrc
traceson
tracesoff
This starts sendmail:
startsrc -s sendmail -a "-bd -q30m"
This makes inetd reread its config file. Not sure if it kills and
restarts or just HUP's or what:
refresh -s inetd
lsps is used to list the characteristics of paging space.
Turning off ip forwarding:
/usr/sbin/no -o ipforwarding=0
Detailed info about a specific error:
errpt -a -jE85C5C4C
BTW, Rajiv Bendale tells me that errors are stored in NVRAM on AIX,
so you don't have to put time into replicating an error as often.
Some or all of these will list more than one number. Trust the first,
not the second.
lslpp -l ppe.poe
...should list the version of poe installed on the system
Check on compiler versions:
lslpp -l vac.C
lslpp -l vacpp.cmp.core
Check on loadleveler version:
lslpp -l LoadL.full
If you want to check the bootlist do bootlist -o -m normal if you want to
update bootlist do bootlist -m normal hdisk* hdisk* cd* rmt*
prtconf
Run the ssadiag against the drive and the adapter and it will tell you if it
fails or not. Then if its a hot plugable it can be replaced online.
You can get patches from:
http://www-912.ibm.com/eserver/support/fixes
You'll need to click through a bit of red tape before getting to where
you actually can list corequisites and start a download.
BTW, "Add to my download list" does not work in konqueror, but it does
work in mozilla.
Backup to tape:
env - /usr/bin/mksysb '-m' '-i' '-X' /dev/rmt0
The "env -" is because some sort of environment variable can confuse
Why don't you try using iptrace and ipreport to see the behavior of your
telnet sessions ??
Purportedly orks with JFS 1 and 2:
To split off a mirrored copy of the /home/xyz file system to a new mount
point named /jfsstaticcopy, type the following:
chfs -a splitcopy=/jfsstaticcopy /home/xyz
You can control which mirrored copy is used as the backup by using the
copy attribute. The second mirrored copy is the default if a copy is
not specified by the user. For example:
chfs -a splitcopy=/jfsstaticcopy -a copy=1 /home/xyz
At this point, a read-only copy of the file system is available in
/jfsstaticcopy. Any changes made to the original file system after the
copy is split off are not reflected in the backup copy.
To reintegrate the JFS split image as a mirrored copy at the /testcopy
mount point, use the following command:
rmfs /testcopy
The rmfs command removes the file system copy from its split-off state
and allows it to be reintegrated as a mirrored copy.
Working around a loader domain problem:
esmf04m-strombrg> /usr/local/bin/gribmap
exec(): 0509-036 Cannot load program /usr/local/bin/gribmap because of
the following errors:
0509-030 Insufficient permission to create loader domain
/usr/lib/libiconv.a
0509-026 System error: The file access permissions do not allow
the specified action.
esmf04m-strombrg> LIBPATH=$TMPDIR/gribmap-ld /usr/local/bin/gribmap
gribmap v1.4 for GrADS Version 1.8SL11
Apparently you can also link your application with -L$TMPDIR/loaderdomain
or so, but you'd need a unique one for each set of shared libraries.
This one apparently must be the first -L in the link line.
Please see also:
http://dcs.nac.uci.edu/~strombrg/AIX-shared-libs.html
/usr/bin/uname -M
Anyway, set the timezone variable TZ in /etc/environment like this:
TZ=MST7
...takes effect after everyone logs out and back in. This is just an
example, not something for California.
"svmon" will give u this output which give u the information regarding
ur memory.
size
inuse
free
pin
virtual
memory
pg space
pin
in use
1310711
2097152
work
103782
438570
1298235
585219
pers
0
10130
12476
103782
clnt
0
849535
lpage
0
0
711466
acledit
Scott (of IBM, onsite hardware tech) stuff:
lsdev -Cc adapter
"defined" means at one time the piece of hardware was on system - as
opposed to "available". A card which is being newly added should not
temporarily pass through "defined" state. Hardware should be in the
"available" state.
/////
lsslot -c pci
p1-i1 is the first slot on the back left
/////
diag
diadiagnostic routines
problem determination
sfp: phones home (to IBM) over modem
previously reported problem
/////
task selection
hot plug task
pci or scsi
identify function will blink light, so you can make sure the hardware
and software are on the same page.
u1.1 drawer address, bottom left
/////
EIA numbers on right and left of rack, goes to lowest of the numbers
adjacent to the equipment in question. EG, something in the rack might
be 3 EIA numbers high - the software should identify the hardware by
the lowest number of the 3.
/////
hotplug in os removes voltage from slot, slot light should blink yellow,
same as for identify.
/////
we have older "hotswap cassettes" - which means lots of screws.
Newer ones snap together. It also can take a bit of wrestling to get
the card in and out of the old cassettes (shades of Sun's IPX's :)
/////
yellow llight continues blinking after card inserted, until software is
told to let the slot have voltage again.
/////
advanced diagnostics, search for thing to test visually
/////
cfgmgr
takes awhile to run, checks all devices on machine
no output, but then lsdev -Cc adapter again should change afterward
/////
ps -ef | grep Worm
splstdata -a
should not say not_configured
use rc.switch to make it configured
ps -ef pipe | Worm again, should show up now
Eunfence 49 - 49 is 04m
/////
spmon -d
"d" for diagnostic
like front panel leds
"host responds" and "switch responds" should say yes for all css adapters
/////
errpt (no args)
/////
Scott says that sometimes an SP2 system will refuse to acknowledge the
new adapter, in which case you have to lie to the ODM to make the system
see the card. He suggested that maybe we did not need to do that this
time, because we have the latest pssp (ssp.*) software on the system.
/////
We also had to Eunfence the node whose card was replaced.
Rajiv tells me that it does not matter which host is Eprimary, as long as
one of the nodes is, and there aren't things fenced off that shouldn't be.
mount -v cdrfs -o ro /dev/cd0 /mnt
Mount iso9660 filesystem
More on cfgmgr, from aix-l:
you can execute cfgmgr on line without trouble
normally cfgmgr have 3 steps named phases :
phase 1 during boot
phase 2 during normal boot (after phase1)
phase 3 durinf service boot (after phase1)
if you run cfgmgr without flags (-p or -f) cfgmgr executes phase 2 only by
default
in fact cfgmgr and cfgmgr -p2 are the sames commands
flag -v for verbose
AIX 5.2 has builtin CIFS client?
mount -v cifs -n winserver/myuser/mypassword /home /mnt
Can also "smitty cifs_fs"
This is supposed to be included in lpp bos.cifs_fs
Apparently this was added in AIX 5.2
please check if your cd device is being used by some process by running:
fuser -c /dev/cd0
you can also check if cdromd is up and running by:
lssrc -a | grep cd
if cdromd is running, then try with the following commands:
cdumount
cdeject
here is some commands to manipulate the ODM directly (I don't suggest you
do so, at least you know exactly what you are doing).
were
were
were
were
were
found.
found.
found.
found.
found.
lslv -m hd5
bosboot -ad /dev/ipldevice
shutdown -Fr
bootinfo -K (should now be 64)
To change the kernel back to 32-bit:
From 64-bit to 32-bit:
ln -sf /usr/lib/boot/unix_mp /unix
ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
lslv -m hd5
bosboot -ad /dev/ipldevice
shutdown -Fr
bootinfo -K (should now be 32)If you are running AIX 5.1
Switching From 32 to 64 Bit Mode
To switch from 32-bit mode to 64-bit mode run the following commands,
in the given order:
1.ln -sf /usr/lib/boot/unix_64 /unix
2.ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
3.bosboot -ad /dev/ipldevice
4.shutdown -Fr
5.bootinfo -K (should now show 64)
Switching From 64 To 32-Bit Mode
To switch from 64-bit mode to 32-bit mode run the following commands,
in the given order:
1.ln -sf /usr/lib/boot/unix_mp /unix
2.ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
3.bosboot -ad /dev/ipldevice
4.shutdown -Fr
5.bootinfo -K (should now show 32)
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_Moulay Rachid BOUSSETA
To see if you're running with a 32 bit or 64 bit kernel, run:
bootinfo -K
...or...
prtconf -k
EG:
esmf04m-root> PATH=/usr/bin:/usr/sbin prtconf -k
Kernel Type: 64-bit
esmf04m-root> bootinfo -K
64
bootinfo -s hdiskxxx
lspv hdiskXX
-b
-k
-r
-s (disk device)
-T
-y
-K
monitors. Once you have configure this then you should activate the daemon
by issuing:
startsrc -s aixmibd
Please remember to uncomment the line that starts aixmibd in /etc/rc.tcpip
file.
On AIX patches:
1) An APAR (Authorized Program Analysis Report) is a bunch of software
patches that solves many problems while a PTF (is the same as Fix and
means Program Temporary Fix) is a patch that solves one specific problem.
You will download Maintenance Levels (ML) as APARs from IBM Software Web
Site.
2) You should install the latest Maintenance Level for the AIX version you
have installed (usually a big bunch of software up to 650 MB that needs
almost 1GB space to be decompressed and installed). As AIX 5L is new
technology from IBM they're patching many problems and generating ML very
often. You can download from
http://www-1.ibm.com/servers/eserver/support/pseries/aixfixes.html
3) First, you have to know which Fix or PTF to install, then download it
from the above web link, then copy to a location in the server (usually
PTF's are copied to /usr/sys/inst.images directory as well as there's
enough space (what i do is to create a new FS of some 2 GB dize and mount
it over /usr/sys/inst.images, after installing the APAR or PTF i just
delete the FS without deleting the mount point). Then uncompress or unzip,
untar, whatever, and using the fastpath
smitty update_all in AIX you
can install or preview the installation of any patches. I recommend using
preview option before real installation and also recommend installing
patches in APPLIED status, that is, both either original or old version
and newest version of the software are installed, so you can REJECT the
installation of any patch.
4) You can remove any single fileset with the fastpath
smitty remove
If an ESMF node mostly falls off the net (strobe shows only about 5
ports open), then:
1) Go down to the ESMF HMC
2) Log in
3) Locate the right window to use
4) Log in to the trouble machine
5) kill and restart srcmstr
6) startsrc -s inetd
7) startsrc -s sshd
8) startsrc -s automountd
9) /etc/nfs.clean
10) /etc/rc.nfs
There may be other things that need to be started up as well, but this
has been sufficient so far.
Following the documentation if you issue the following command you will
activate HMT or Hardware MultiThreading
# bosdebug -H on
Memory debugger
Memory sizes
Network memory sizes
Kernel debugger
Real Time Kernel
HMT
off
0
0
off
off
on
20752
21426
27888
22730
24280
active
active
active
active
active
nfso -a -c
#list all tunable values
nfso -o nfs_use_reserved_ports=1
chnfs -b 1024 #ps -ef | grep biod
#chnfs -n 1024 #ps -ef | grep nfsd
chnfs -n 3891 #ps -ef | grep nfsd
Find where gzip lives, package-wise:
which_fileset gzip
Get the machine model:
esmf04m-strombrg> /usr/bin/uname -M
IBM,7039-651
esmf04m-strombrg>
lsconf
Looks a lot like prtconf?
You can check microcode version by issuing the following command
lsmcode
if this does not work, then
lscfg -vp | grep -i alterable
You can download Fixes and microcodes not only for your Server nut for any
peripheral devices from
techsupport.services.ibm.com
1. Type no -o tcp_keepinit=3750 The initial timeout for TCP/IP will change
from 75 seconds to 31.25 minutes. The time (3750) is in 1/2 seconds.
2. Type no -o tcp_keepidle=86400 The connection will be kept alive
for 12 hours.
The above two items will not be active once a reboot is done. If this
solves your problem you can add the statements to your /etc/rc.tcpip file.
filemon Command
Monitors the performance of the file system, and reports the I/O activity on
behalf of logical files, virtual memory segments, logical volumes, and
physical
volumes.
lsfs
...can be used to check what kind of filesystem a filesystem is
portmir
Apparently can be used to snoop on a tty/pty on AIX? A bit like screen
or VNC, but without the forethought requirement.
Restoring from a mksysb tape:
You can either boot from your mksysb Medium (band Streamer or cdrom) and
restore.
change your bootlist:
if you have a Band Streamer, so you can boot from AIX Installation Medium
and choose point 3 (Maintenance mode) and restore from media.
Determing what needs to be upgraded to advance to a higher os level:
you can do an "instfix -i | grep ML" to list which maintenance level is
incomplete and then show what filesets are required i.e. if AIX 5.2 ML02 is
incomplete do "instfix -ivk 5200-01_AIX_ML | grep ":" | grep not"
Nice page with AIX OpenSSH bff's, a script for creating bff's, a script
for setting up LBX for use with ssh, and more.
http://www.zip.com.au/~dtucker/openssh/
An example mksysb backup:
# mksysb /dev/rmt0
Creating tape boot image ...
Creating list of files to back up .
Backing up 68614 files..............................
17379 of 68614 files backed up (25%)..............................
25331 of 68614 files backed up (36%)..............................
25341 of 68614 files backed up (36%)..............................
55359 of 68614 files backed up (80%).................
68614 of 68614 files backed up (100%)
0512-038 mksysb: Backup Completed Successfully.
# echo $PATH
/usr/ucb:/bin:/usr/bin:/etc:/usr/lpp/ssp/bin:/usr/lib/instl:/usr/sbin:/usr/local
/bin
#
Note the PATH! The backup failed when I had a larger PATH.
IBM's document describing AIX to Solaris admins:
http://www.redbooks.ibm.com/abstracts/sg246584.html?Open
Changing the boot device:
Boot from aix cd's into maint shell and run the bosboot -ad /dev/hdisk0
command.
Or if the hd5 boot device is mirrored on hdisk0 and hdisk1 all you need
to do is boot into sms menu and ensure both disks are selected in the
boot order.
To access sms hit 1 before it does a speaker test.
/////
You can boot it up into what used to be called SMS mode .. i.e. hit F1 at
the 'keyboard' prompt ... You can change the boot device from there and
then make sure that you rerun your bosboot once you have booted up.
Couldn't be simpler
manctsr/ >lsvg rootvg -p
rootvg:
PV=5FNAME
PV STATE
TOTAL PPs FREE PPs
FREE DISTRIBUTION
hdisk0
active
542
245
28..00..00..108..109
hdisk1
active
542
245
28..00..00..108..109
manctsr/ >lsvg rootvg -l
rootvg:
LV NAME
TYPE
LPs PPs PVs LV STATE
MOUNT POINT
hd5
boot
1
2
2
closed/syncd N/A
hd6
paging
64
128 2
open/syncd
N/A
hd8
jfslog
1
2
2
open/syncd
N/A
hd4
jfs
1
2
2
open/syncd
/
hd2
jfs
27
54
2
open/syncd
/usr
hd9var
jfs
3
6
2
open/syncd
/var
hd3
jfs
5
10
2
open/syncd
/tmp
hd1
jfs
1
2
2
open/syncd
/home
apachelv
jfs
5
10
2
open/syncd
/apache
cv4=5Fhome
jfs
172 344 2
open/syncd
/export/cv4=5Fhome
cv4=5Fdec
jfs
15
30
2
open/syncd /export/cv4=5Fd=
ec
lv00
jfs
open/syncd
/mn/script
# lsvg rootvg -l
rootvg:
LV NAME
hd5
hd6
hd8
hd4
hd2
hd9var
hd3
hd1
hd10opt
log1
paging01
hd14
TYPE
boot
paging
jfslog
jfs
jfs
jfs
jfs
jfs
jfs
jfslog
paging
jfs
LPs
1
40
1
1
71
1
2
4
2
1
9
4
PPs
2
80
2
2
142
2
4
8
4
2
18
8
PVs
2
2
2
2
2
2
2
2
2
2
2
2
LV STATE
closed/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
open/syncd
closed/syncd
open/syncd
closed/syncd
MOUNT POINT
N/A
N/A
N/A
/
/usr
/var
/tmp
/home
/opt
N/A
N/A
N/A
PSSP has it's own 5 CD set (PSSP-3.5) and has to be ordered. Thanks
Don't panic! DISK_ERR4 (in errpt) is just a bad block relocation and
is a somewhat
"normal" occurrence. You only need to be concerned about these errors
if you notice them increasing in number on the same disk. So - you need
to track it but not necessarily replace it.
What kernel level (lslpp -l 'bos.[um]p*')
The hardware must be CHRP (Common Hardware Reference Platform) in order for
5.2 or greater to be supported.
You can determine that by issuing "bootinfo -p".
Nice article on AIX backups:
http://www.ahinc.com/aix/backup.htm
A fix for some kinds of tape backup problems:
please post the output of the following command
lsattr -El rmt0
we are looking for the value "ret error", if this is set to true then i'd
recommend changing it to false by issuing a smitty devices->Tape
devices->Change Tape Devices
How to create mksysb to a remote tape drive.
.
**** Note mksysb will not be bootable ***
.
Lets say tape drive is on systemA and you need to create
mksysb of system
You should be able to do rsh from systemB to systemA
Create the script remote_mksysb on systemB with following lines.
.
#!/usr/bin/ksh
rm -f /tmp/pipe
mknod /tmp/pipe p
mksysb /tmp/pipe &
dd if=/tmp/pipe | rsh systemA "dd of=/dev/rmt0 bs=1024 conv=sync"
rm /tmp/pipe
Generating a list of system calls known to the kernel:
dd if=/proc/$$/sysent of=/tmp/out
(check the end)
Reading a tape
mksysb
tctl rewind
tctl fsf 3
restore -Tqvf /dev/rmt0.1|pg
Savevg
tctl rewind
tctl fsf 5
restore -Tqvf /dev/rmt0.1|pg
I think that all these following commands mean the same thing :
# bootinfo -y
32
# prtconf -c
CPU Type: 32-bit
# bootinfo -K
32
On alt_disk_install:
We use it mainly to reduce downtime while upgrading the systems and also
to have a quick back out path. You can have the new built image install
on the alt disks. Switch boot device to the new partition and your newly
upgraded system up and running. If your system has any problems you
cannot fix with adjustments, you can switch back to the old partition
and bring out the old software.
Outage time is little over a reboot worth of time.
First, try to start the switch adapter daemon (worm) with rc.switch.
Good luck - these SP switch problems are notoriously hard to fix.
Enabling quotas on a JFS filesystem (and perhaps others) :
Edit /etc/filesystems and edit in quota=userquota on the relevant filesystem.
esmf04m-root> chfs -a "quota = userquota" /home
esmf04m-root> quotaon /home
esmf04m-root> quotacheck /home
If a program proves too large to compile with the default options due
pci
Description
PCI-X capable,
PCI-X capable,
PCI-X capable,
PCI-X capable,
PCI-X capable,
PCI-X capable,
64
32
32
64
64
64
bit,
bit,
bit,
bit,
bit,
bit,
133MHz slot
66MHz slot
66MHz slot
133MHz slot
133MHz slot
133MHz slot
Device(s)
Empty
Empty
pci9 lai0
Empty
Empty
Empty
Beginning with AIX 5.2, snapshot support helps you protect the
consistency of your mirrored volume groups from potential disk failure.
Using the snapshot feature, you can split off a mirrored disk or disks
to use as a reliable (from the standpoint of the LVM metadata)
point-in-time backup of a volume group, and, when needed, reliably
reintegrate the split disks into the volume group. In the following
procedure, you first split off a mirrored disk from a volume group and
then you merge the split-off disk into the original volume group. To
further ensure the reliability of your snapshot, file systems must be
unmounted and applications that use raw logical volumes must be in a
known state (a state from which the application can recover if you need
to use the backup).
A volume group cannot be split if any one of the following is true:
A disk is already missing.
The last non-stale partition would be on the split-off volume group.
Any stale partitions exist in the volume group, unless you use the force
flag (-f) with the splitvg command.
Furthermore, the snapshot feature (specifically, the splitvg command)
cannot be used in enhanced or classic concurrent mode. The split-off
volume group cannot be made concurrent or enhanced concurrent and there
are limitations to the changes allowed for both the split-off and the
original volume group. For details, read the chvg command description in
AIX 5L Version 5.2 Commands Reference.
Ensure that the volume group is fully mirrored and that the mirror
exists on a disk or set of disks that contains only this set of mirrors.
To enable snapshot support, split off the original volume group (origVG)
to another disk or set of disks, using the following command:
splitvg origVG
At this point, you now have a reliable point-in-time backup of the
original volume group. Be aware, however, that you cannot change the
allocation on the split-off volume group.
Reactivate the split-off disk and merge it into the original volume
group using the following command:
joinvg origVG
At this point, the split-off volume group is now reintegrated with the
original volume group.
Configuring ntp
1) Stop the xntpd daemon
The xntpd daemon is managed by the System Resource Controller (SRC).
To verify that the xntpd daemon is active : lssrc -s xntpd : status
should be "active"
To stop the xntpd subsystem : stopsrc -s xntpd
Note : xntpd is automatically started in /etc/rc.tcpip. To verify this :
cat /etc/rc.tcpip | grep xntpd.
2) Modify the /etc/ntp.conf file
Put the following lines in the /etc/ntp.conf file :
server <IP address or FQDN of timeserver> prefer
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
# passwd
Changing password for "root"
root's New password:
new password again:
19.
To write everything from the buffer to the hard disk and reboot
the system, type the following:
sync;sync;sync;reboot
turning off diagnostic lights:
/usr/lpp/diagnostics/bin/usysfault -s normal
Memory DIMM:
Size........................256
Memory DIMM:
Size........................256
Memory DIMM:
Size........................256
Clipped from a message on AIX-L - outlines the procedure for replacing
a bad disk in a logical volume:
u must procee in tyhos order:
1- unmirror the rootvg (unmirror rootvg hdisk1)
2- extrcat hdisk1 from rootvg (reducevg rootvg hdisk1) hidsk1 should not
have any other data, if yes, move them first
3- rmdev -dl hdisk1
4- put the new pv
5- cvrmgrl
6- extendvg rootvg "the new pv"
7-mirrorvg rootvg hdsikxxx
/////
And another:
Use this redbook, page 182, section 6.5.1.
http://www.redbooks.ibm.com/abstracts/SG245496.html?Open
On -some- IBM (PowerPC) machines, you boot to singleuser by hitting F5
during the boot
Where to get firmware for pSeries machines:
http://techsupport.services.ibm.com/server/mdownload
"I believe the p in p-Series stands for Performance.
While the i in i-Series stands for Integrated."
"I believe the p in pSeries stands for Power as in the power 5 chip
architecture the hardware uses."
OK, from the (0)> prompt enter either ? or h - these subcommands list
all the available subcommands you can key into the kdb at the (0)>
prompt. Unfortunately, unless you know what you are looking for its
hard to understand the output.
The common commands to use are stat and staus - which will show the
status of the system and dump, vmlog and vmstat will show any memory
errors that may have caused the dump.
You really need an indepth knowledge of how the system works to
decipher most of the output and Im afraid theres no easy way to do it.
This link has a list of all the kdb subcommands
http://www16.boulder.ibm.com/pseries/en_US/aixprggd/kdb/kdb_cmd.htm#kdb_cmd
Regards,
Paul (on AIX-L)
bindprocessor is for binding a process to a specific CPU
esmf04m-root> sysdumpdev -l
primary
secondary
copy directory
forced copy flag
always allow dump
dump compression
Wed Oct 26 13:43:31
/dev/lv00
/dev/sysdumpnull
/var/adm/ras
TRUE
TRUE
OFF
http://www.douzhe.com/docs/jh/9/97757.html
...but I think there may be a bit of a mistake on how to do backups to
a remote tape drive... dd -should- work for that, but IME, it doesn't.
AIX supports large pages with 32-bit and 64-bit kernels. Applications,
either 32-bit or 64-bit,
can take advantage of large pages. The extended common object file format
(XCOFF or
XCOFF64), the object file format for AIX, provides a flag to identify
binaries if they are set (or
cleared) to use large pages (or turn the large pages flag) through ldedit10.
The flag can also
be turned on at load time (ld)10 with the following commands:
ld command: ld -blpdata -o a.out
ldedit command: ldedit -blpdata a.out (or -bnolpdata a.out)
An AIX upgrade procedure:
I just went through this with my company, and wrote some directions as
to what we should do; I will share this document with you.
******NOTE******
Some of this is specific to my company, but you may find it useful
anyhow
****************
You should do a complete configuration management scheme/snapshot of
your system:
1) execute df -Ik
2) execute lsvg, lsvg -p for each vg, and lsvg -l for each vg
3) execute lspv
4) execute bootlist -m normal -o and bootlist -m service -o
5) execute bootinfo -y and bootinfo -k
6) execute lspv -a
7) execute lsvg -M rootvg
8) execute lsconf
You want to document everything from above so that you can have this to
re-create your system should there be any mistakes or unfortunate
events.
This just helps you to know exactly what your system looks like, before
you make any changes.
Go to this site and you will get exactly what you need:
http://www-03.ibm.com/servers/eserver/support/unixservers/aixfixes.html
Choose the -> AIX 5.3 link and choose follow the prompts to get you the
correct maintenance level(s).
Please let me know if this is of any help.
Thanks.
LeRoy S. Phillips 'Phil'
UNIX System Administrator (AIX/SAP)
From a message on IBM-AIX-L:
I get these stupid messages all the time and I just filter them and send
them to junk.
I've tried making the sysdumpdev bigger, but it comes back and wants it
to be just a little bigger than I made it.
IBM does recommend that you use a second sysdumpdev.
////////////////////////////////////
SYSTEM DUMP
////////////////////////////////////
IBM recommends:
Don't mirror the system dump device
Don't use compression on the dump device
Don't use a secondary dump device unless it is on a separate device,
separate cable and separate i/o card.
sysdumpdev -l
sysdumpdev -e
sysdumpdev -L
sysdumpdev -c
when the next
sysdumpdev -p
permanently
sysdumpdev -P
dump device a
sysdumpstart -p
sysdumpstart -s
(MCA machine can also dump if key is in service position and the reset
button is pressed)
Analyze dump file :echo "stat status t -m" | crash /var/adm/ras/vmcore.0
$ errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
F89FB899 0822150005 P O dumpcheck
The copy directory is too small
This message is the result of a dump device check. You can fix this by
increasing the size of your dump device. If you are using the default
dump device (/dev/hd6) then increase your paging size or go to smit dump
and "select System Dump Compression". Myself, I don't like to use the
default dump device so I create a sysdumplv and make sure I have enough
space. To check space needed go to smit dump and select "Show Estimated
Dump Size" this will give you an idea about the size needed.
The copy directory is whatever sysdumpdev says it is.
Run sysdumpdev and you will get something like
#sysdumpdev
primary
/dev/hd6
secondary
/dev/sysdumpnull
copy directory
/var/adm/ras
forced copy flag
TRUE
always allow dump
FALSE
dump compression
ON
# sysdumpdev -e
0453-041 Estimated dump size in bytes: 57881395
Divide this number by 1024. This is the free space that is needed in
your copy directory. Compare it to a df -k or divide this number by
512. This is the free space that is needed in your copy directory.
Compare it to a df.
================================================================================
scraidmgr -A -cyes -l'scraid0' -r '5' -b '16' -n '350033' -e '1A 1B 1C 1D 1E 1F'
-q '16' -f 'no' -g 'yes'
================================================================================
HMC Commands
lshmc n (lists dynamic IP addresses served by HMC)
lssyscfg r sys F name,ipaddr (lists managed system attributes)
lssysconn r sys (lists attributes of managed systems)
lssysconn r all (lists all known managed systems with attributes)
rmsysconn o remove ip <ipaddr from lssysconn list> (removes a managed system fro
m the HMC)
mkvterm m {msys} p {lpar} (opens a command line vterm from an ssh session)
rmvterm m {msys} p {lpar} (closes an open vterm for a partition)
Activate a partition
chsysstate m managedsysname r lpar o on n partitionname f profilename b normal
chsysstate m managedsysname r lpar o on n partitionname f profilename b sms
Shutdown a partition
chsysstate m managedsysname r lpar o {shutdown/ossshutdown} n partitionname [-im
med][-restart]
VIO Server Commands
lsdev virtual (list all virtual devices on VIO server partitions)
lsmap all (lists mapping between physical and logical devices)
oem_setup_env (change to OEM [AIX] environment on VIO server)
Create Shared Ethernet Adapter (SEA) on VIO Server
mkvdev sea{physical adapt} vadapter {virtual eth adapt} default {dflt virtual ad
apt} defaultid {dflt vlan ID}
SEA Failover
ent0 GigE adapter
ent1 Virt Eth VLAN1 (Defined with a priority in the partition profile)
ent2 Virt Eth VLAN 99 (Control)
mkvdev sea ent0 vadapter ent1 default ent1 defaultid 1 attr ha_mode=auto ctl_cha
n=ent2 (Creates ent3 as the Shared Ethernet Adapter)
Create Virtual Storage Device Mapping
mkvdev vdev {LV or hdisk} vadapter {vhost adapt} dev {virt dev name}
Sharing a Single SAN LUN from Two VIO Servers to a Single VIO Client LPAR
hdisk = SAN LUN (on vioa server)
hdisk4 = SAN LUN (on viob, same LUN as vioa)
chdev dev hdisk3 attr reserve_policy=no_reserve (from vioa to prevent a
reserve on the disk)
chdev dev hdisk4 attr reserve_policy=no_reserve (from viob to prevent a
reserve on the disk)
mkvdev vdev hdisk3 vadapter vhost0 dev hdisk3_v (from vioa)
mkvdev vdev hdisk4 vadapter vhost0 dev hdisk4_v (from viob)
VIO Client would see a single LUN with two paths.
spath l hdiskx (where hdiskx is the newly discovered disk)
This will show two paths, one down vscsi0 and the other down vscsi1.
AIX Performance TidBits and Starter Set of Tuneables
Current starter set of recommended AIX 5.3 Performance Parameters. Please
ensure you test these first before implementing in production as your mileage
may vary.
Network
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 rfc_1323=1
NB Network settings also need to be applied to the adapters
nfso p o nfs_socketsize=600000
nfso p o nfs_tcp_socketsize=600000
Memory Settings
vmo p o minperm%=5
vmo p o maxperm%=80
vmo p o maxclient%=80
Let
vmo
vmo
vmo
vmo
IO Settings
Let minpgahead and J2_minPageReadAhead default
ioo p o j2_maxPageReadAhead=128
ioo p o maxpgahead=16
ioo p o j2_maxRandomWrite=32
ioo p o maxrandwrt=32
ioo p o j2_nBufferPerPagerDevice=1024
ioo p o pv_min_pbug=1024
ioo p o numfsbufs=2048
If doing lots of raw I/O you may want to change lvm_bufcnt
Default is 9
ioo p o lvm_bufcnt=12
Others left to default that you may want to tweak include:
ioo p o numclust=1
ioo p o j2_nRandomCluster=0
ioo p o j2_nPagesPerWriteBehindCluster=32
Useful Commands
vmstat v or l or s lvmo
vmo o iostat (many new flags)
ioo o svmon
schedo o filemon
lvmstat fileplace
Useful Links
1. Lparmon www.alphaworks.ibm.com/tech/lparmon
2. Nmon www.ibm.com/collaboration/wiki/display/WikiPtype/nmon
3. Nmon Analyser
www-941.ibm.com/collaboration/wiki/display/WikiPtype/nmonanalyser
4. vmo, ioo, vmstat, lvmo and other AIX commands
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.doc/doc/
base/commandsreference.htm
================================================================================
/usr/sbin/tunrestore
Contains the tunrestore command.
/tunables
Contains tunable files.
/etc/tunables/nextboot
Contains the values to be applied during the next boot.
/etc/tunables/lastboot
Contains the values of all tunables after the last boot.
/etc/tunables/lastboot.log
Contains messages, warnings and errors emitted by tunrestore
during the last boot.
================================================================================
What speed is my CPU? ( for OS < 5.x)
This document applies to AIX Versions 4.x.
Procedure
While there is not a direct command to determine processor speed in AIX, the
best place to start is with the uname command. Executing uname -m produces
output of the following form:
xxyyyyyymmss
The meanings of the placeholders are as follows:
xx = 00
yyyyyy = Unique CPU ID
mm = Model ID <- these are the numbers to use to determine CPU
speed
ss = 00 (Submodel)
By cross-referencing the mm values from the uname -m output with the table
below, you can easily determine the processor speed.
Model ID
Machine Type
Processor Speed
Architecture
02
7015-930
25
Power
10
7013-530
25
Power
10
7016-730
25
Power
11
7013-540
30
Power
14
7013-540
30
Power
18
7013-53H
33
Power
1C
7013-550
41.6
Power
20
7015-930
25
Power
2E
7015-950
41
Power
30
7013-520
20
Power
31
7012-320
20
Power
34
7013-52H
25
Power
35
7012-32H
25
Power
37
7012-340
33
Power
38
7012-350
41
Power
41
7011-220
33
RSC
43
7008-M20
33
Power
43
7008-M2A
33
Power
46
7011-250
66
PowerPC
47
7011-230
45
RSC
48
7009-C10
80
PowerPC
4C
See Note 1.
57
7012-390
67
Power2
57
7030-3BT
67
Power2
57
9076-SP2 Thin
67
Power2
58
7012-380
59
Power2
58
7030-3AT
59
Power2
59
7012-39H
67
Power2
59
9076-SP2 Thin w/L2
67
Power2
5C
7013-560
50
Power
63
7015-970
50
Power
63
7015-97B
50
Power
64
7015-980
62.5
Power
64
7015-98B
62.5
Power
66
7013-580
62.5
Power
67
7013-570
50
Power
67
7015-R10
50
Power
70
7013-590
66
Power2
70
9076-SP2 Wide
66
Power2
71
7013-58H
55
Power2
72
7013-59H
66
Power2
72
7015-R20
66
Power2
72
9076-SP2 Wide
66
Power2
75
7012-370
62
Power
75
7012-375
62
Power
75
9076-SP1 Thin
62
Power
76
7012-360
50
Power
76
7012-365
50
Power
77
7012-350
41
Power
77
7012-355
41
Power
77
7013-55L
41.6
Power
79
7013-591
77
Power2
79
9076-SP2 Wide
77
Power2
80
7015-990
71.5
Power2
81
7015-R24
71.5
Power2
89
7013-595
135
P2SC
89
9076-SP2 Wide
135
P2SC
94
7012-397
160
P2SC
94
9076-SP2 Thin
160
P2SC
A0
7013-J30
75
PowerPC
A1
7013-J40
112
PowerPC
A3
7015-R30
See Note 2.
PowerPC
A4
7015-R40
See Note 2.
PowerPC
A4
7015-R50
See Note 2.
PowerPC
A4
9076-SP2 High
See Note 2.
PowerPC
A6
7012-G30
See Note 2.
PowerPC
A7
7012-G40
See Note 2.
PowerPC
C0
7024-E20
See Note 3.
PowerPC
C0
7024-E30
See Note 3.
PowerPC
C4
7025-F30
See Note 3.
PowerPC
F0
7007-N40
50
ThinkPad
NOTES:
Systems where uname -m outputs a model ID of 4C:
In general, the only way to determine the processor speed of a machine with a
model ID of 4C is to reboot into System Management Services and choose the
system configuration options. However, in some cases the information gained
from the uname -M command can be helpful.
uname -M
Machine Type
Processor Speed
Processor Architecture
IBM,7017-S70
7017-S70
125
RS64
IBM,7017-S7A
7017-S7A
262
RD64-II
IBM,7017-S80
7017-S80
450
RS-III
IBM,7025-F40
7025-F40
166/233
PowerPC
IBM,7025-F50
7025-F50
See Note 4.
PowerPC
IBM,7026-H10
7026-H10
166/233
PowerPC
IBM,7026-H50
7026-H50
See Note 4.
PowerPC
IBM,7026-H70
7026-H70
340
RS64-II
IBM,Model 7042/7043
(ED)
7043-140
166/200/233/332
PowerPC
IBM,Model 7042/7043
(ED)
7043-150
375
PowerPC
IBM,Model 7042/7043
(ED)
7043-240
166/233
PowerPC
IBM,7043-260
7043-260
200
Power3
IBM,7248
7248-100
100
PowerPersonal
IBM,7248
7248-120
120
PowerPersonal
IBM,7248
7248-132
132
PowerPersonal
IBM,9076-270
9076-SP Silver Node See Note 4.
PowerPC
J-Series, R-Series, and G-Series systems:
You can determine the processor speed in an MCA SMP system from the FRU
number of the CPU card by using the following command:
lscfg -vl cpucard0 | grep FRU
This will produce the following output:
FRU Number..................C1D
FRU Number
Processor Type
Processor Speed
E1D
PowerPC 601
75
C1D
PowerPC 601
75
C4D
PowerPC 604
112
E4D
PowerPC 604
112
X4D
PowerPC 604e
200
E-Series and F-30 systems:
For the E-series and F-30 systems, use the following process to determine CPU
speed. Execute:
lscfg -vp | more
Look for the following stanza:
procF0
CPU Card
Part Number.................093H5280
EC Level....................00E76527
Serial Number...............17700008
FRU Number..................093H2431
Displayable Message.........CPU Card
Device Specific.(PL)........
Device Specific.(ZA)........PS=166,PB=066,PCI=033,NP=001,CL=02,PBH
Z=64467000,PM=2.5,L2=1024
Device Specific.(RM)........10031997 140951 VIC97276
ROS Level and ID............03071997 135048
In the section Device Specific.(ZA), the section PS= (boldface here) is the
processor speed in MHz.
F-50 and H-50 systems and SP Silver Node:
The following commands can be used to determine the processor speed of an
F-50 system. Execute:
lscfg -vp | more
Look for the following stanza:
Orca M5 CPU:
Part Number.................08L1010
EC Level....................E78405
Serial Number...............L209034579
FRU Number..................93H8945
Manufacture ID..............IBM980
Version.....................RS6K
Displayable Message.........OrcaM5 CPU DD1.3
Product Specific.(ZC).......PS=0013c9eb00,PB=0009e4f580,SB=0004f27
ac0,NP=02,PF=461,PV=05,KV=01,CL=1
In the line containing Product Specific.(ZC) , the entry PS= (boldface here)
is the processor speed in hexadecimal notation. To convert this to an actual
speed, use the following conversions:
h 0009E4F580 = 166 MHz
h 0013C9EB00 = 332 MHz
The value PF= (also boldface here) indicates the processor configuration.
h 251 = 1 way 166 MHz
h 261 = 2 way 166 MHz
h 451 = 1 way 332 MHz
h 461 = 2 way 332 MHz
================================================================================
AIX 5.1 and above:
This sets the number of 256MB segments used for data by rsserver to 8
segments or 2GB. For machines with less memory, you can set this value lower
as appropriate (e.g. change the 8 to 4 for a maximum of 1GB data). It can be
set higher but this can have system-wide side effects that are tricky to
diagnose, it's better to reduce the size of data you're bringing into your
cubes.
ldedit -bmaxdata:0x80000000 rsserver
To confirm the MAXDATA setting:
dump -o rsserver
Look on the last line for the number below MAXDATA. The setting of 0x00000000
implies the default 256MB limit.
You can confirm the *exact* amount of data being used by rsserver by using
svmon:
svmon -P <rsserver pid> -i 10
================================================================================
Revert a VXVM disk back to LVM control: chpv -C powerpath6
================================================================================
Multi-pathing data collection
SDD (all versions of AIX)
Issue the following commands and capture the output. This data is not found in a
snap.
Preferably provide the output of these commands during the failure.
datapath query adapter
datapath query device
lsvpcfg
MPIO (available on AIX 5.2 and above)
Issue the following commands and capture the output. This data is not included i
n a
snap.
pcmpath query adapter
pcmpath query device
pcmpath query essmap
================================================================================
How do you tell if a route is in the ODM or not (besides rebooting to
see if it comes back)?
-vs-
AIX 5.2
procflags [-r] [pid]
proccred [pid]
procmap [-F] [pid]
procldd [-F] [pid]
procstack [-F] [pid]
procfiles [- n F] [pid]
Not available
================================================================================
slibclean - remove inactive memory libraries
================================================================================
VIO
as padmin (or setup root w/ a password on VIO server, do a "oem_setup_env, passw
d")
/usr/ios/cli/ioscli lspv -size
/usr/ios/cli/ioscli lsmap -all
/usr/ios/cli/ioscli lsmap -all -net
/usr/ios/cli/ioscli lsdev -type disk
/usr/ios/cli/ioscli lspv -field name pvid vg -fmt :
/usr/ios/cli/ioscli lspv -field name pvid -fmt :
/usr/ios/cli/ioscli license
oem_setup_env
root> backupios -file /mnt_mksysb/LVIO_jan_16 -mksysb
================================================================================
If scp/ssh doesnt work on other node, put the path for them in /etc/envionrment
Make a src for ssh
usr/bin/mkssys -s sshd -p /usr/local/sbin/sshd -a '-D' -u 0 -S -n 15 -f 9 -R G
local
================================================================================
================================================================================