LAST CHANGE : 07.01.2010 OS LEVEL AIX: 4.3.3 + 5.1 + 5.2 + 5.3 + 6.1 ############## # useful links ############## http://www.rootvg.net http://publib.boulder.ibm.com/cgi-bin/ds_form http://publib16.boulder.ibm.com/pseries/en_US/infocenter/base/errorsearch.htm http://www.aixtips.com/AIXtip/ http://www.rootunix.org/AIX/ http://www.rootvg.net/ledlist.htm http://www.ibm.com/developerworks/aix/ http://www.ibm.com/developerworks/forums/forum.jspa?forumID=747 http://www.perzl.org/aix/ ############### # AIX 6 Support ############### AIX V6.1 exclusively supports 64-bit Common Hardware Reference Platform (CHRP) machines with selected processors: PowerPC 970 POWER4 POWER5 POWER6 To see if you have a supported machine, log into the machine as the root user, and run the following command: 1. prtconf | grep "Processor Type" AIX V6.1 does not support the following processor architectures: RS64 POWER3 604 ####################### # commandline or smitty ####################### Wer sich nicht sicher ist, unter intern: http://uriel/austausch/betrieb/os/aix/doc/all_fast_path.txt extern: http://www.hdkutz.de/os/aix/all_fast_path.txt sind alle smitty-menues (Menue smitty Befehl) aufgelistet. Beispiel: Processes process Aufruf smitty process Durch den smitty werden Kommandos teilweise automatisch vervollstaendigt, so das ein Fehler kaum mehr moeglich ist. Parameter werden angegeben. ############################# # determine Maintenance Level ############################# instfix -i | grep AIX_ML oslevel will report the base OS level - i.e. we are at 4.3.3.04 and oslevel returns 4.3.3.0. instfix -ik 4330-04_AIX_ML *checks* that all filesets are installed for ML 04 on AIX 4.3.3 and returns a success / failure message and instfix -ic | pg will list the fields keyword name, fileset name, required level, installed level, status, and short abstract for each fileset installed - the status field allows you to identify which filesets are downlevel by showing a < in this field. See the man pages for this command ... However, to my knowledge there is no command that reports both oslevel and ML level in one. This will show you all the filesets missing for that Maintenance Level: instfix -ivk 4330-08_AIX_ML | grep : | grep not Nachschauen welche APARs im Verzeichnis enthalten sind: instfix -Td . To install all fixes on the disk, enter: # instfix -T -d . | instfix -d . -f- Once installed, you can determine if all fileset updates for the 4330-07 level are installed using the following command. The 'oslevel' command will still indicate AIX 4.3.3.0. instfix -ik 4330-08_AIX_ML If the output indicates that not all filesets are found, you can determine which filesets are not updated using the command: instfix -qick 4330-08_AIX_ML | grep ":-:" To check for filesets BELOW a given maintenance level: instfix -qick 4330-08_AIX_ML | grep ":-:" To check for filesets ABOVE a certain maintenance level: instfix -qick 4330-08_AIX_ML | grep ":+:" To check for filesets AT a certain maintenance level: instfix -qick 4330-08_AIX_ML | grep ":=:" To check for filesets AT a certain maintenance level: instfix -qick 5200-02_AIX_ML|grep ":-:" To check for filesets AT a certain maintenance level: instfix -qick 5200-03_AIX_ML|grep ":-:" To check for filesets AT a certain maintenance level: instfix -qick 5300-10_AIX_ML|grep ":-:" ############################## # view fix installed on system ############################## instfix -ik IX78215 -v root@cws [~]# instfix -ik IX78215 -v IX78215 Abstract: trace allocates too much memory Fileset bos.sysmgt.trace:4.3.1.1 is applied on the system. All filesets for IX78215 were found. ############################ # view filesets in directory ############################ # instfix -T -d . IY14691 WRONG 2 DECLARATION OF SVC_REGISTER IN RPC/SVC.H IY30887 SDK 1.3.1 32-bit PTF 1 IY31033 SDK 1.3.1 32-bit PTF 0 : ca131w-20020404 IY31312 CANNOT 2 COMPILE RPC WRAPPERS IN 64BIT ON AIX 5 IY31879 SYS/SHM.H 2 HEADER SHOULD NOT DEFINE _ALL_SOURCE IY32007 STR() 2 OF OSTRSTREAM FREEZES IY32852 JULY 2 2002 C++ RUNTIME PTF IY33524 IY33524 SYMBOLS 18 SYMBOLS EXPORTED FROM OLD RTE NOT EXPORTED EXP. FROM ... ################# # efix management ################# # wenn man nicht weiss wie der label eines efixes ist - entpacken mit gnu-tar - ecfile anschauen # list all emgr -l ID STATE LABEL INSTALL TIME ABSTRACT === ===== ========== ================== ====================================== 1 S IY64691ML4 12/15/04 14:23:08 chvg -B causes corruption 2 S aio 12/15/04 14:23:30 Efix for AIO hang problem. 3 S 52IS63366 12/20/04 13:52:36 efix for dlsym problem on 52I # list detail of fix emgr -L 84597 # install emgr -e IYxxx # show locks emgr -P # uninstall emgr -r -L LABELNAME ###### # suma ###### # download TL suma -x -a DLTarget=/export/fixes/530TL07 -a Action=Download -a RqType=TL -a RqName=5300-07 # download specific fixes suma -x -w -a Action=Preview -a RqType=APAR -a RqName=IY70298 Task ID 1 created. The download list contains one or more fixes known to cause a regression: U809929 # download fixes suma -x -w -a Action=Download 1 The download list contains one or more fixes known to cause a regression: U809929 Extending the /usr filesystem by 1196427 blocks. Filesystem size changed to 10223616 Download SUCCEEDED: /usr/sys/inst.images/installp/ppc/Java131.ext.commapi.1.3.1.2.bff Download SUCCEEDED: /usr/sys/inst.images/installp/ppc/ICU4C.rte.5.3.0.60.bff Download SUCCEEDED: /usr/sys/inst.images/installp/ppc/Java131.adt.includes.1.3.1.5.bff # unschedule task suma -u 1 # delete task suma -d 1 ######### # oslevel ######### # oslevel -r -q Known Recommended Maintenance Levels ------------------------------------ 4330-08 4330-07 4330-06 4330-05 4330-04 4330-03 4330-02 4330-01 4320-02 #################### # ML52_02 downloaden #################### http://techsupport.services.ibm.com/server/aix.fdc?toggle=DNLDLATEST ########################## # compare_report nur > 5.1 ########################## https://techsupport.services.ibm.com/server/aix.techTips?refNo=0274 get LatestFixData51 # /usr/sbin/compare_report -s -r /tmp/LatestFixData51 -l # ls -l /tmp/lower* -rw-r--r-- 1 root system 0 Feb 20 17:28 /tmp/lowerthanlatest1.r pt -rw-r--r-- 1 root system 0 Feb 20 17:28 /tmp/lowerthanmaint.rpt ab 5.2 smitty compare_report #################### # compare 2 machines #################### # lslpp -qLc >/tmp/lslpp_machine1.out copy this to the machine you want to compare # lslpp -qLc >/tmp/lslpp_machine2.out /usr/sbin/compare_report -b /tmp/lslpp_machine1.out -o /tmp/lslpp_machine2.out -l -h -m -n If all reports (-l, -h, -m, and -n) are requested for this type of comparison, the following reports will be generated respectively: o baselower.rpt (generated with -l) o basehigher.rpt (generated with -h) o baseonly.rpt (generated with -m) o otheronly.rpt (generated with -n) #################################### # update script fuer ml oder patches #################################### AIX 5 regatta1:/> file /usr/sbin/install_all_updates /usr/sbin/install_all_updates: shell script - ksh (Korn shell) regatta1:/> install_all_updates -? Usage: install_all_updates: Updates installed software to latest levels. install_all_updates -d [-picrnsxvNSYVD] -p = Preview only. -i = Update install utilities only. -r = Also update rpms if possible. -s = Skip recommended maintenance verification. -N = Skip updating install utilities first. -D = Script debug output. Installp specific option flags: -c = Commit updates. -n = Do not automaticly install requisites. -x = Do not expand automaticly. -v = Verify installation. -S = Suppress multi-volume processing. -V = Verbose output. # check install_all_updates -pYcd. # do install_all_updates -Ycd. ############################# # update rpm packages toolbox ############################# updtvpkg #################################### # restore particular file from mksysb ##################################### AIX 3 tctl -f /dev/rmt0 fsf 3 < moves tape forward from the mksysb files> tar -xvf /dev/rmt0 /etc/passwd < extracts the file > AIX 4 tctl -f /dev/rmt0 rewind restore -s4 -xqvf /dev/rmt0.1 ./var/spool/cron/crontabs/root Tapeinhalt mksysb anschauen # restore -s4 -Tvqf /dev/rmt0.1 | tee filename oder # restore -s4 -Tvqf /dev/rmt0 > file what command will eject tape from tapedrive ? tctl -f /dev/rmt0 rewoffl mt -t device_file offl (will actually eject for a 4mm drive, will only take offline for a DLT) Determining a tape format It happens some time that you have an unlabeled backup tape which you don't know using which command this tape been created. This is a very easy way rather than attempting to read the tape directly with various backup command. Read a small portion of the tape using the "dd" command, then using the "file" command to attempt to determine the format of the archive. For example : # dd if=/dev/rmt0 of=/tmp/tape.data count=4 4 + 0 records in. 4 + 0 records out. # file /tmp/tape.data /tmp/tape.data: tar archive ####################################### # doing remote mksysb without tapedrive ####################################### The mksysb script (which is also the savevg script BTW) needs to talk to a tape device. But you can edit a copy of the script, or just butcher it, to achieve what you want. If you want a bootable tape, you will have to emulate the script exactly - that is, create the four files needed and get them to the tape somehow. The first three files go on the tape with bs=512, the fourth, the backup itself, with bs=1024. Techniques like rsh remote "chdev -l rmt0 -a block_size=512" dd if=file1 bs=512 conv=sync | rsh remote "dd of=/dev/rmt0.1 bs=512 conv=sync" (repeat for file 2 and file 3; note 0.1 for norewind tape device) rsh remote "chdev -l rmt0 -a block_size=1024" The above command often rewind the tape, so to avoid overwriting the first three files, skip past them after setting bs=1024. rsh remote "mt -f /dev/rmt0 rewind&&mt -f /dev/rmt0.1 fsf 3" Examine mksysb to see exactly how backup is fed - I don't have access just now, so I've put ... . Make f the last option on backup, follow with space and - to direct backup output to stdout, then pipe to rsh: find ... | backup -{other options from mksysb}f - | rsh remote "dd of=/dev/rmt0.1 bs=1024 conv=sync" ######################## # doing mksysb over pipe ######################## 1. mknod /tmp/.mksysb.pipe p 2. dd if=/tmp/.mksysb.pipe | ssh servername dd of=/mksysb/filename & mksysb -e /tmp/.mksysb.pipe ############################ # exclude files from mksysb ############################ In the /etc/exclude.rootvg file, insert the names of the filesystems that you do not want backed up. Example: b508 spaldst /home/spaldst >cd /etc b508 spaldst /etc >ls -l exclude.rootvg -rw-r--r-- 1 root system 54 Sep 13 07:36 exclude.rootvg b508 spaldst /etc >cat exclude.rootvg /mkcd/mksysb_image /mkcd/cd_fs /mkcd/cd_images /cdrom http://www-03.ibm.com/support/techdocs/atsmastr.nsf/84279f6ed9ffde6f86256ccf0065 3ad3/b75a2f3717807e9d86256fcd004ec329?OpenDocument http://www.dvddemystified.com/dvdfaq.html#4.3 Maxell DVD-RAM 4.7GB single sided, rewriteable media Part number 636070 Script to write mksysb to DVD echo '************************************************************' echo 'backup the rootVG volume group to DVD-RAM(daily copy)' now=`date` echo mksysb backup to DVD-RAM started on $now /usr/sbin/mkcd -U -d /dev/cd0 -P -V rootvg now=`date` echo mksysb nightly onsite backup to DVD-RAM completed on $now echo '************************************************************' ############################### # copy mksysb from tape to disk ############################### tctl -f /dev/rmt0 rewind tctl -f /dev/rmt0.1 fsf 3 dd if=/dev/rmt0.1 of=/mksysb/clone.image bs= ############## # listvgbackup ############## # listvgbackup -l -f /mksys/maschine/mksys-maschine-050317 VOLUME GROUP: rootvg BACKUP DATE/TIME: Thu Mar 17 23:30:03 NFT 2005 UNAME INFO: AIX maschine 3 4 0045C95A4C00 BACKUP OSLEVEL: 4.3.3.75 MAINTENANCE LEVEL: BACKUP SIZE (MB): SHRINK SIZE (MB): VG DATA ONLY: no # listvgbackup -l -f /mksys/maschine/mksys-maschine-041130 VOLUME GROUP: rootvg BACKUP DATE/TIME: Tue Nov 30 17:05:32 MEZ 2004 UNAME INFO: AIX maschine 2 5 0055CCFA4C00 BACKUP OSLEVEL: 5.2.0.40 MAINTENANCE LEVEL: 5200-03 BACKUP SIZE (MB): 29952 SHRINK SIZE (MB): 16886 VG DATA ONLY: no rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 1 1 closed/syncd N/A hd6 paging 9 9 1 open/syncd N/A hd8 jfs2log 1 1 1 open/syncd N/A hd4 jfs2 1 1 1 open/syncd / hd2 jfs2 88 88 1 open/syncd /usr hd9var jfs2 33 33 1 open/syncd /var hd3 jfs2 32 32 1 open/syncd /tmp hd1 jfs2 1 1 1 open/syncd /home hd10opt jfs2 1 1 1 open/syncd /opt app01LV jfs2 32 64 2 open/syncd /usr/app/oracle paging00 paging 7 7 1 open/syncd N/A local01LV jfs2 10 10 1 open/syncd /usr/local audit01LV jfs2 2 2 1 open/syncd /audit hd7 dump 119 119 1 open/syncd N/A hd77 dump 119 119 1 open/syncd N/A app02LV jfs2 80 160 2 open/syncd /usr/app/oracle/product/8.1.7 app03LV jfs2 144 288 2 open/syncd /usr/app/oracle/product/9.2.0 ##################### # doing remote backup ##################### Backup to a remote tape drive # rdump -fsystemwithdrive:/dev/rmt0 /data_to_backup OR # tar -cvBf - . | rsh hostname dd of=/dev/rmt0 ibs=20 OR TO BACKUP # find ./home/username -print | backup -iqvf- | rsh remote_hostname dd ibs=1024 obs=1024 of=/dev/rmt1 # find ./ -print | backup -iqvf- | ssh idefix dd ibs=1024 obs=1024 of=/dev/rmt0 TO RESTORE cd "the appropriate directory for file that begin ./home/username" rsh remote_hostname "dd if=/dev/rmt1 bs=1024" | restore -xqvf - # ssh remote copy to another machine with backup/restore # find ./ -print | backup -iqvf- | ssh idefix "cd to_be_restore && restore -xqvf -" ####################### # backing up raw-device ####################### Backing Up Raw Devices Use the dd command to back up raw devices. You should not overwrite the first 4KB block of a raw device, as the AIX Logical Volume Manager uses it. It is faster to back up with a block size of larger than 4KB. A good block size to use when backing up to tape is 256KB. The following is a sample script that can be used to back up/restore a raw device to tape: 1. To back up the raw device to tape: dd if=/dev/ of=/dev/rmt0.1 bs=256k 2. To restore the raw device from tape: dd if=/dev/rmt0.1 of=/dev/ count=63 seek=1 skip=1 bs=4k mt -f /dev/rmt0.1 bsf 1 dd if=/dev/rmt0.1 of=/dev/ seek=1 skip=1 bs=256k ########################## # mksysb from disk to tape ########################## You could create a bootable tape with the mksysb image etc. on it, by using the commands: 1. bosboot -ad /dev/rmtx.1 2. mkinsttape /dev/rmtx.1 3. Use the tctl command to insert an EOF mark 4. Use dd to transfer the rootvg files from the disk file to tape. or in detail: http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixins/aixinsgd/creating_bootable_tapes.htm#ksxNj2a6ttay ############ # restore vg ############ VG-Infos wurden vorher mit Script austausch/betrieb/os/aix/scripte/vg_recovery gesichert. Die Dateien liegen dann unter /usr/local/vgdata/ Diese Infos koennen dann ueber restvg -q -f /usr/local/vgdata/vg01 zurueckgeholt werden. Da /usr/local in einem mksysb enthalten ist werden somit saemtliche Infos bezueglich der anderen VG's mit aufgenommen. Creating information file for volume group ipasvgp05.. Creating list of files to back up Backing up 10 filesBacking up to /usr/local/vgdata/ipasvgp05 Cluster 51200 bytes (100 blocks). Volume 1 on /usr/local/vgdata/ipasvgp05 a c 265 ./ata/vgdata.files38786 a 265 ./tmp/vgdata/vgdata.files a 3758 ./tmp/vgdata/ipasvgp05/filesystems a 0 . a 4786 ./tmp/vgdata/ipasvgp05/ipasvgp05.data a 18 ./tmp/vgdata/ipasvgp05/logipasvgp05.map a 2700 ./tmp/vgdata/ipasvgp05/lvipasinfopool.map a 36 ./tmp/vgdata/ipasvgp05/testlv01.map a 36 ./tmp/vgdata/ipasvgp05/testlv02.map a 36 ./tmp/vgdata/ipasvgp05/testlv03.map total size: 11900 Done at Tue Oct 8 10:52:41 MSZ 2002; 100 blocks on 1 volume(s) 0512-038 savevg: Backup Completed Successfully. To restore the volume group image saved in /usr/local/vgdata/ipasvgp05 file onto the disks specified in the vgname.data file contained within the backup image, enter: restvg -f/usr/local/vgdata/ipasvgp05 Creating information file for volume group ipasvgp04. C reating list ofk up Backing up 8 filesBacking up to /usr/local/vgdata/ipasvgp04 Cluster 51200 bytes (100 blocks). Volume 1 on /usr/local/vgdata/ipasvgp04 a 191 ./tmp/vgdata/vgdata.files39186 a 191 ./tmp/vgdata/vgdata.files a / 3758 ./tmp/vgdasvgp04/filesystems a 0 . a 2936 ./tmp/vgdata/ipasvgp04/ipasvgp04.data a 18 ./tmp/vgdata/ipasvgp04/logipasvgp04.map a 90 ./tmp/vgdata/ipasvgp04/lvsironp01.map a 90 ./tmp/vgdata/ipasvgp04/lvsironp11.map total size: 7274 Done at Tue Oct 8 10:52:56 MSZ 2002; 100 blocks on 1 volume(s) 0512-038 savevg: Backup Completed Successfully. To restore the volume group image saved in /usr/local/vgdata/ipasvgp04 file onto the disks specified in the vgname.data file contained within the backup image, enter: restvg -f/usr/local/vgdata/ipasvgp04 Creating information file for volume group ipasvgp03.. Creating list of files to back up Backing up 9 filesBacking up to /usr/local/vgdata/ipasvgp03 Cluster 51200 bytes (100 blocks). Volume 1 on /usr/local/vgdata/ipasvgp03 a 226 ./tmp/vgdata/vgdata.files34008 a 226 ./tmp/vgdata/vgdata.files a 3758 ./tmp/vgdata/ipasvgp03/filesystems a 0 . a 4764 ./tmp/vgdata/ipasvgp03/ipasvgp03.data a 17 ./tmp/vgdata/ipasvgp03/logipasvgp03.map a 6101 ./tmp/vgdata/ipasvgp03/lvipasp11.map a 3528 ./tmp/vgdata/ipasvgp03/lvipasp12.map a 1476 ./tmp/vgdata/ipasvgp03/lvipasp13.map total size: 20096 Done at Tue Oct 8 10:53:44 MSZ 2002; 100 blocks on 1 volume(s) 0512-038 savevg: Backup Completed Successfully. To restore the volumye group image s/usr/local/vgdata/ipasvgp03 file onto the di sks specified in the vgname.data file contained within the backup image, enter: restvg -f/usr/local/vgdata/ipasvgp03 Creating information file for volume group ipasvgp02.. Creating list of files to back up Backing up 9 filesBacking up to /usr/local/vgdata/ipasvgp02 Cluster 51200 bytes (100 blocks). Volume 1 on /usr/local/vgdata/ipasvgp02 a 226 ./tmp/vgdata/vgdata.files38848 a 226 ./tmp/vgdata/vgdata.files a 3758 ./tmp/vgdata/ipasvgp02/filesystems a 0 . a 4743 ./tmp/vgdata/ipasvgp02/ipasvgp02.data a 17 ./tmp/vgdata/ipasvgp02/logipasvgp02.map a 5967 ./tmp/vgdata/ipasvgp02/lvipasp01.map a 3332 ./tmp/vgdata/ipasvgp02/lvipasp02.map a 1394 ./tmp/vgdata/ipasvgp02/lvipasp03.map total size: 19663 Done at Tue Oct 8 10:54:30 MSZ 2002; 100 blocks on 1 volume(s) 0512-038 savevg: Backup C5ompleted Succes. To restore the volume group image saved in /usr/local/vgdata/ipasvgp02 file onto the disks specified in the vgname.data file contained within the backup image, enter: restvg -f/usr/local/vgdata/ipasvgp02 Creating information file for volume group ipasvgp01. Creating list of files to back up .. Backing up 8 filesBacking up to /usr/local/vgdata/ipasvgp01 Cluster 51200 bytes (100 blocks). Volume 1 on /usr/local/vgdata/ipasvgp01 a 190 ./tmp/vgdata/vgdata.files34022 a 190 ./tmp/vgdata/vgdata.files a 3758 ./tmp/vgdata/ipasvgp01/filesystems a 0 . a 2905 ./tmp/vgdata/ipasvgp01/ipasvgp01.data a 17 ./tmp/vgdata/ipasvgp01/logipasvgp01.map a 833 ./tmp/vgdata/ipasvgp01/lvoraclep01.map a 102 ./tmp/vgdata/ipasvgp01/lvuc4p01.map total size: 7995 Done at Tue Oct 8 10:55:09 MSZ 2002; 100 blocks on 1 volume(s) 0512-038 savevg: Backup Completed Successfully. To restore the volume group image saved in /usr/local/vgdata/ipasvgp01 file onto the disks specified in the vgname.data file contained within the backup image, enter: restvg -f/usr/local/vgdata/ipasvgp01 xipasp01#pwd /usr/local/vgdata xipasp01#ll total 520 -rw-r--r-- 1 root system 51200 Oct 08 10:55 ipasvgp01 -rw-r--r-- 1 root system 51200 Oct 08 10:54 ipasvgp02 -rw-r--r-- 1 root system 51200 Oct 08 10:53 ipasvgp03 -rw-r--r-- 1 root system 51200 Oct 08 10:52 ipasvgp04 -rw-r--r-- 1 root system 51200 Oct 08 10:52 ipasvgp05 ###################### # remote copy with tar ###################### cd basedir ; tar cvf - dirtocopy | (ssh -q user@floyd "cd basedir ; tar xfBF -") cd basedir ; tar cvf - dirtocopy | (ssh -q user@floyd "cd basedir ; tar xvf -") ##################### # local copy with tar ##################### tar -cf - . | (cd destdir; tar vpxf -) ######################## # copy with ssh and cpio ######################## find basedir -depth -print | cpio -oc | \ ssh2 -q remote@floyd "cd basedir && cpio -icmlMudv" # l --> create links # m --> modifikation-time files bleibt erhalten # M --> modifikation-time dirs bleibt erhalten # d --> create dirs # u --> An older filer replaces newer # v --> verbose bash-2.03$ find . -depth -print |cpio -oc | /usr/local/bin/ssh -q root@verleihnix-filer.intern.rzag.net "cd /var/log/twelogbackup && cpio -icmlMudv" ########################## # tar without inbound gzip ########################## gzip -dc xyz.tar.gz | tar xvf - ################ # tar with xargs ################ ls | /usr/bin/xargs /opt/freeware/bin/tar -czvf /oracle/E03/tmp/logarch.tar.gz ######### # ramdisk ######### mkramdisk 40000 ls -l /dev | grep ram mkfs -V jfs /dev/ramdiskx mkdir /ramdiskx mount -V jfs -o nointegrity /dev/ramdiskx /ramdiskx where x is the logical RAM disk number. To remove a RAM disk, use the rmramdisk command. RAM disks are also removed when the machine is rebooted. ####################### # mksysb auf filesystem ####################### aixinstall0:/# /usr/bin/mksysb '-e' '-i' /mksysb/aixinstall2.20010516.obj -e --> exclude.rootvg Inhalte werden nicht mitgesichert ################ # mksysb auf dvd ################ /usr/sbin/mkcd -L -d '/dev/cd0' -M '/mksbcd/backup_image' -C '/mksbcd/cd_fs' -I '/mksbcd/cd_images' -V 'rootvg' ############################# # mkcd nur bootimage erzeugen ############################# # cd /var/adm/ras # ls ./bosinst.data ./images.data | backup -ivqf /tmp/520ML04.img # mkcd -m /tmp/520ML04.img -S -V app01VG Initializing mkcd log: /var/adm/ras/mkcd.log... Verifying command parameters... Creating temporary file system: /mkcd/cd_fs... Populating the CD or DVD file system... 0512-323 mkcd: The following files are required for the creation of the CD or DVD image and are not available on the source system: /usr/lib/drivers/pci/qfcdd devices.pci.77101223.rte /usr/lib/drivers/pci/qfcddpin devices.pci.77101223.rte /usr/lib/drivers/qfscsidd devices.pci.77101223.rte /usr/lib/drivers/qfscsiddpin devices.pci.77101223.rte /usr/lib/drivers/usb/usbfd devices.usbif.080400.rte /usr/lib/drivers/usb/usbcd devices.usbif.08025002.rte /usr/lib/drivers/usb/usbcdpin devices.usbif.08025002.rte /usr/lib/methods/cfgcdrom_usb devices.usbif.08025002.rte /usr/lib/methods/cfgfd_usb devices.usbif.080400.rte /usr/lib/methods/cfgqfc devices.pci.77101223.rte /usr/lib/methods/cfgqfscsi devices.pci.77101223.rte The files can be installed from the listed filesets. 0512-321 mkcd: Error populating the CD or DVD file system using the /usr/lpp/bosinst/cdfs.optional.list proto file. ####################### # restore informationen ####################### It is 'backup' format. You can list with 'restore' like : restore -Tqvf /dev/rmtxx ################## # test mksysb-tape ################## AIX V4: The mksysb tape has 4 images on it: ------------------------------------------------------------ boot image | install image | empty TOC | system backup image ------------------------------------------------------------ To test the first 3 images, use the following commands. All this does is checks for tape media errors. If you want to be absolutely sure, boot the tape. # The first 3 images are always written in 512 byte blocks # chdev -l rmt0 -a block_size=512 dd if=/dev/rmt0.1 of=/dev/null dd if=/dev/rmt0.1 of=/dev/null dd if=/dev/rmt0.1 of=/dev/null To test the 4th image, use the commands: # The system backup image is written at whatever block size the # tape device was set to when the mksysb was made. You might # assume 512 and skip the commands up through 'chdev' and the # optional 'ibs' parameter to dd in the subsequent section. If # you do and the block size is not 512, you'll get an I/O error. # tctl rewind restore -xqvf /dev/rmt0.1 -s2 ./tapeblksz chdev -l rmt0 -a block_size=$(awk '{ print $1 }' tapeblksz) dd if=/dev/rmt0 [ibs=$(awk '{ print $1 }' tapeblksz)] | restore -Tqf- >/dev/null ######### # tar ######### AIX-tar /usr/bin/tar -L tar.include -cvf /backup/backup.tar gnu-tar /usr/local/bin/tar -czvf /dev/rmt0 --files-from ./files.2000 wobei files.2000 die Namen der zu sichernden Dateien enthaelt standard-tar find /data -name "200012*" -print > /tmp/tar.include tar -czvf /backup/backup.tgz -I /tmp/tar.include gtar -czvf /backup/backup.tgz -T /tmp/tar.include ############################################### # translation from characterset to characterset ############################################### iconv -f ISO8859-2 -t IBM-852 original > translated ############################## # determine big fs oder normal ############################## Try lsfs -q file-system-name. For example, lsfs -q /home Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/hd1 -- /home jfs 409600 -- yes no (lv size: 409600, fs size: 409600, frag size: 4096, nbpi: 4096, compress: no, bf: false, ag: 4) The attribute "bf" seems to indicate whether large file is enabled or not. "ag" is related to allocation group. ######################### # vi command completition ######################### AFAIR it must be \ (antislash) to do filename completion in vi mode. I like much vi editor for all its capabilities (buffers...), but I personnaly find that the emacs mode is much more user friendly for line editing in ksh. One of its greatest interest is almost undocumented : you may have aliases to use the arrow keys for line editing. Try these five lines in your .kshrc (or whatever filename your ENV variable contains) : set -o emacs alias __A=^P # cursor up alias __B=^N # cursor down alias __C=^F # cursor right alias __D=^B # cursor left The first __ (double _) replaces the ^[ sent by the vt100 mode function keys in 7bits mode. The followings are CONTROL-letter characters (one char only) that you insert in vi with CTRL-V+CTRL-letter. After that log again and you may use the arrow keys to navigate in the commands history and through the lines. You may never wanna come back to vi mode... ######################## # ksh command completion ######################## ksh can do this too: esc + \ --> completes the command esc + = --> gives a list of options with full path ############### # topas auf aix ############### topas im Paket perfagent topas -P # aehnlich top topas -C # Cross Partion - ueber alle Partions topas -L # Partion view topas -W # Workloadmanger ################# # monitor auf aix ################# monitor -Toplog -log /var/adm/monitor_colon05.log #################### # manuell cd mounten #################### crfs -v cdrfs -p ro -d'cd0' -m'/cdrom' ##################### # default TERM setzen ##################### In the /etc/profile I added TERM_DEFAULT=vt200. ########################## # reject maintenance level ########################## when you install the maintenance level, use smitty update_all for the COMMIT software updates? line, select no This will APPLY the updates (make a backup of the old level) If for some reason the new stuff doesnt work, you can revert back to the old level using: smitty reject ########################### # install maintenance level ########################### smitty update_all Einzelne Fixes installieren smitty update_by_fix Fixe auflisten smitty install_list_problems ################## # login verhindern ################## touch /etc/nologin ######################### # failed logins ermitteln ######################### /usr/sbin/acct/fwtmp < /etc/security/failedlogin | more oder who /etc/security/failedlogin sudo bash -c "/usr/sbin/acct/fwtmp < /etc/security/failedlogin" ################## # wtmp verkleinern ################## # /usr/lib/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp.tmp # tail -1000 /tmp/wtmp.tmp > /tmp/wtmp.tmp1 # /usr/lib/acct/fwtmp -ci < /tmp/wtmp.tmp1 >/var/adm/wtmp # wtmp lesen # /usr/sbin/acct/fwtmp /tmp/bla && mail -s login_failure someuser@somehost.com extendvg rootvg hdisk1 0516-008 extendvg: LVM system call returned an unknown error code (-271). 0516-792 extendvg: Unable to extend volume group. root@KAH82:/>extendvg -f rootvg hdisk1 0516-008 extendvg: LVM system call returned an unknown error code (-271). 0516-792 extendvg: Unable to extend volume group. Loesung: odmget -q "name = 'rootvg' and attribute = 'pv' " CuAt CuAt: name = "rootvg" attribute = "pv" value = "00573ada8010ae5b0000000000000000" type = "R" generic = "" rep = "sl" nls_index = 0 CuAt: name = "rootvg" attribute = "pv" value = "00573ada760235200000000000000000" type = "R" generic = "" rep = "sl" nls_index = 0 AIX ist der Meinung - da gibt es 2 Disks! kutz@KAH82 /home/kutz> sudo redefinevg -d hdisk0 rootvg Password: kutz@KAH82 /home/kutz> sudo synclvodm -Pv rootvg synclvodm: Physical volume data updated. synclvodm: Logical volume hd5 updated. synclvodm: Logical volume hd6 updated. synclvodm: Logical volume hd8 updated. synclvodm: Logical volume hd4 updated. synclvodm: Logical volume hd2 updated. synclvodm: Logical volume hd9var updated. synclvodm: Logical volume hd3 updated. synclvodm: Logical volume hd1 updated. synclvodm: Logical volume lv01 updated. kutz@KAH82 /home/kutz> odmget -q "name = 'rootvg' and attribute = 'pv' " CuAt CuAt: name = "rootvg" attribute = "pv" value = "00573ada8010ae5b0000000000000000" type = "R" generic = "" rep = "sl" nls_index = 0 Anschliessend gehen extendvg und mirrorvg durch! ###### # cpio ###### To copy a directory and all of its subdirectories, enter: mkdir /home/jim/newdir find . -print | cpio -pdl /home/jim/newdir or find . | backup -iqvf - | (cd /;restore -iqvf -) ################# # filesystem copy ################# find . -xdev -print | backup -iqf - | (cd new_directory; restore -xf -) ################################ # reexport nfs /cdrom filesystem ################################ /usr/sbin/chnfsexp -d '/cdrom' -t 'ro' '-B' ############### # rm nfs-export ############### /usr/sbin/rmnfsexp -d '/export/fixes' '-B' ###################### # increase nfs daemons ###################### stopsrc -s nfsd chnfs -n for nfsd chnfs -b for biod This will make the change instantly and for each subsequent re-boot startsrc -s nfsd ###################### # nfs export directory ###################### aixinstall0:/# /usr/sbin/mknfsexp -d '/export/conf' -t 'rw' -c 'aixinstall1,aixinstall2,aixinstall3,aixinstall4,aixinstall5' -r 'aixinstall1,aixinstall2,aixinstall3,aixinstall4,aixinstall5' '-B' /export/conf root=aixinstall1:aixinstall2:aixinstall3:aixinstall4:aixinstall5,access=aixinstall1:aixinstall2:aixinstall3:aixinstall4:aixinstall5 Exported /export/conf change kurzschlus:/#chnfsexp -d '/export/nim/scripts/aixinstall1.script' -c 'aixinstall1' -r 'aixinstall1' -B /export/nim/scripts/aixinstall1.script ro,root=aixinstall1,access=aixinstall1 exportfs: 1831-187 re-exported /export/nim/scripts/aixinstall1.script ############################# # mount nfs from linux to aix ############################# Have you got "nfs_use_reserved_ports" set to 1 on AIX (use "nfso -a")? If not set it with "nfso -o nfs_use_reserved_ports=1". If this does the trick, add it to e.g. /etc/rc.tcpip to make it permanant. Linux by default requires any NFS mount to use a so called reserved port below 1024 and AIX 4.3 does by default use ports above 1024. You can use the nfso command to restrict AIX to the reserved port range as follows: nfso -o nfs_use_reserved_ports=1 This comes from some AIX FAQ somewhere. check name resolution !!! # nfso -a portcheck= 0 udpchecksum= 1 nfs_socketsize= 60000 nfs_tcp_socketsize= 60000 nfs_setattr_error= 0 nfs_gather_threshold= 4096 nfs_repeat_messages= 0 nfs_udp_duplicate_cache_size= 0 nfs_tcp_duplicate_cache_size= 0 nfs_server_base_priority= 0 nfs_dynamic_retrans= 1 nfs_iopace_pages= 0 nfs_max_connections= 0 nfs_max_threads= 8 nfs_use_reserved_ports= 0 nfs_device_specific_bufs= 1 nfs_server_clread= 1 nfs_rfc1323= 0 nfs_max_write_size= 0 nfs_max_read_size= 0 nfs_allow_all_signals= 0 nfs_v2_pdts= 1 nfs_v3_pdts= 1 nfs_v2_vm_bufs= 1000 nfs_v3_vm_bufs= 1000 #################################### # umount dir from crashed nfs-server #################################### umount -f DirectoryToBeUnmounted ################ # mount diskette ################ mount -r -V jfs /dev/fd0 /your_mount_point ######################### # remove exported nfs-dir ######################### /usr/sbin/rmnfsexp -d '/spdata/sys1/install/aix433' '-B' ############################## # restore vg saved with savevg ############################## I have the backup of mksysb and save VG. I'd would to scratch install my system. I can successfully install the rootvg, but how can I restore VG. 'lspv' to make sure which PVs you want to restore your vg to. then, 'restvg -qf /dev/rmt0 -s hdiskN' if your new PVs are exactly the same as the old one, you don't need the '-s' ###### # find ###### Finden von Dateien in einem bestimmten Zeitraum. Here's an example. Replace 12, 14 and 20 with 2, 3, 4 and 5. $ date Thu Dec 28 19:30:38 MST 2000 $ find src/ -name '*.c' -type f \( -mtime 12 -o -mtime 14 -o -mtime 20 \) -ls 911362 4 Frw-rw-r-- 1 veblen 1000 3505 Dec 17 01:42 src/read/read.c 913410 1 Frw-rw-r-- 1 veblen 1000 683 Dec 8 20:59 src/read/_archive/read.c 911366 4 Frw-r--r-- 1 veblen 1000 3775 Dec 17 02:49 src/read/fsh.c 2083 2 Frw-r--r-- 1 veblen 1000 1396 Dec 14 21:54 src/tcase_recv.c 2086 2 Frw-r--r-- 1 veblen 1000 1363 Dec 14 21:54 src/tcase_send.c 2085 1 Frw-r--r-- 1 veblen 1000 965 Dec 14 19:31 src/sigaction.c Finden von Dateien die im letzten Jahr veraendert wurden (gestartet am 28.02.2001) und bilde Summe der Bytes ueber awk btr034:/backup/logs/web #>find . -type f \( -mtime 59 -o -mtime 424 \) -ls|awk '{ s += $7 } END {print "sum is",s, "average is", s/NR }' sum is 948425019 average is 3.37518e+06 Q: I want to find all files in the / filesystem. But not the files in /prod/anotherfilesystem and /var etc. /prod is a directory, not a fs. /var is a fs too. A: find / -xdev Q: I want to list all files in one dir, but not the files in subdirs. A: find /dir -type f ####################### # fiberchannel settings ####################### # show settings of an attribute # lsattr -El fcs0 bus_intr_lvl 323 Bus interrupt level False bus_io_addr 0xdf800 Bus I/O address False bus_mem_addr 0xe8081000 Bus memory address False init_link al INIT Link flags True intr_priority 3 Interrupt priority False lg_term_dma 0x800000 Long term DMA True max_xfer_size 0x200000 Maximum Transfer Size True num_cmd_elems 200 Maximum number of COMMANDS to queue to the adapter True pref_alpa 0x1 Preferred AL_PA True sw_fc_class 2 FC Class for Fabric True # lsattr -El fcs0 -R -a max_xfer_size 0x100000 0x200000 0x400000 0x800000 0x1000000 # change direct (vol must be offline) # chdev -l fcs0 -a max_xfer_size=0x200000 # nur odm change # chdev -l fcs0 -P -a max_xfer_size=0x100000 (default) # chdev -l fcs0 -P -a max_xfer_size=0x200000 # 2GB # chdev -l fcs0 -P -a max_xfer_size=0x400000 # 4GB # chdev -l fcs0 -P -a max_xfer_size=0x800000 # 8GB # chdev -l fcs0 -P -a max_xfer_size=0x1000000 # 10GB # chdev -l fcs0 -P -a lg_term_dma=0x800000 (0x800000) # lsattr -El fcs0 -R -a num_cmd_elems 20...2048 (+1) DS4k Clariion # chdev -l fcs0 -P -a num_cmd_elems=400 #(default 200) DS8k # chdev -l fcs0 -P -a num_cmd_elems=1024 #(default 200) # lsattr -El fscsi0 attach switch How this adapter is CONNECTED False dyntrk no Dynamic Tracking of FC Devices True fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True scsi_id 0x10900 Adapter SCSI ID False sw_fc_class 3 FC Class for Fabric True # chdev -l fscsi0 -P -a fc_err_recov=fast_fail (default delayed_fail) # lsattr -El fcnet0 enable_farp yes Use Fiber Channel Address Resolution Protocol True num_q_bufs 75 Maximum Number of HOST buffers to queue to adapter True sw_fc_class 3 FC Class for Fabric True ################################ # disk settings for fiberchannel ################################ # lsattr -El vpath0 active_hdisk hdisk4/75235512325/fscsi2 Active hdisk False active_hdisk hdisk2/75235512325/fscsi0 Active hdisk False active_hdisk hdisk3/75235512325/fscsi0 Active hdisk False active_hdisk hdisk5/75235512325/fscsi2 Active hdisk False policy df Scheduling Policy True pvid 00025eb562b8fd8d0000000000000000 Physical volume identifier False qdepth_enable yes Queue Depth Control True serial_number 75235512325 LUN serial number False unique_id 210C37523551232507210790003IBMfcp Device Unique Identification False ############################# # network statistics loeschen ############################# # netstat -Zi ####################### # flags bei netstat -nr ####################### U Up. H The route is to a host rather than to a network. G The route is to a gateway. D The route was created dynamically by a redirect. M The route has been modified by a redirect. L The link-level address is present in the route entry. c Access to this route creates a cloned route. This field only applies to AIX Version 4.2.1 or later. W The route is a cloned route. This field only applies to AIX Version 4.2.1 or later. (1) Protocol specific routing flag #1. (2) Protocol specific routing flag #2. (3) Protocol specific routing flag #3. (b) The route represents a broadcast address. (e) Has a binding cache entry. (l) The route represents a local address. (m) The route represents a multicast address. (P) Pinned route. (R) Host or net unreachable. (S) Manually added. (u) Route usable. ################################ # netstat routing table ausgeben ################################ # netstat -C Routing tables Destination Gateway Flags Refs Use If Cost Config_Cost Route Tree for Protocol Family 2 (Internet): 10.50.5/24 aix_52_test U 10 709388 en0 0 0 aix_52_test loopback UGHS 2 7 lo0 0 0 127/8 loopback U 8 286 lo0 0 0 Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 0 0 #################################### # netmask einstellungen herausfinden #################################### lsattr -El en0 -a netmask -F value root@cws [~]# lsattr -El en0 -a netmask -F value 255.255.255.0 ##################### # interface erstellen ##################### smitty mkinet1en oder NETADDR=10.50.11.22 NETMASK=255.255.255.0 BROAD=10.50.11.255 chdev -l en2 -a netaddr='10.50.11.22' -a netmask='255.255.255.0' -a broadcast='10.50.11.255' oder mkdev -c if -s EN -t en -a netaddr='10.50.11.22' -a netmask='255.255.255.0' -w 'en2' -a state='up' -a arp='on' -a broadcast='10.50.11.255' ################################ #alias definieren fuer Interface ################################ ifconfig en0 alias Check ifconfig en0 or netstat -i after addition/removal to make sure that it has been created/removed. chdev -l en1 -a alias4=172.28.64.129,255.255.255.0 ##################################### # check welche aliases sind definiert ##################################### for i in `ifconfig -a|grep -w inet | grep -v 127.0.0.1|awk '{print $2}'` do host $i done ############### #alias loeschen ############### ifconfig en0 delete 20.9.167.45 - this is to remove the alias chdev -l en1 -a delalias4=172.28.64.129,255.255.255.0 ############################# # interface andere ip-adresse ############################# ifconfig en0 down chdev -l en0 -a netaddr='10.0.0.1' ifconfig en0 up oder chdev -l en0 -a state=down chdev -l en0 -a state=detach chdev -l en0 -a netaddr='10.0.0.1' chdev -l en0 -a state=up oder ohne aenderung am interface aber mit aenderung in der ODM chdev -l en0 -P -a netaddr='10.0.0.1' ############################################# # interface andere geschwindigkeit einstellen ############################################# ifconfig en? down detach chdev -l en? -a media_speed=100_Full_Duplex 10_Half_Duplex 10_Full_Duplex 100_Half_Duplex 100_Full_Duplex Auto_Negotiation ifconfig en? up REBOOT REQUIRED? NO OR Take the adapter down and detach it: ifconfig en0 detach chdev -a media_speed=100_Full_Duplex ent0 @ This point you can ifconfig it up, but you will have to put in all the information ( IP,SM ) for it come up right. ifconfig en0 netmask < if not base on segment > up I prefer to do a smitty chinet, select en0, and make sure the information is correct to bring it up. ################# # vipa interfaces ################# virtuelle interfaces welches ueber mehrere andere netzbeine gelegt wird. Beispiel: en0=192.168.1.x en1=192.168.2.x vi0=192.168.3.x http://www16.boulder.ibm.com/pseries/en_US/aixbman/commadmn/tcp_vipa.htm mkdev -c if -s VI -t vi -a netaddr='172.31.109.101' -a netmask='255.255.255.0' -w 'vi0' -a state='up' # mit zuweisung interfaces mkdev -c if -s VI -t vi -a netaddr='172.31.109.101' -a netmask='255.255.255.0' -w 'vi0' -a state='up' -a interface_names='en0,en2' lsdev -HCc if -F 'name class subclass type status description' ################## # config interface ################## INTERFACE=en0 INTERFACE=en1 IP= BC= # gigabit chdev -l $INTERFACE -a netaddr=$IP chdev -l $INTERFACE -a netmask=255.255.255.0 chdev -l $INTERFACE -a broadcast=$BC chdev -l $INTERFACE -a tcp_nodelay=1 chdev -l $INTERFACE -a tcp_recvspace=655350 chdev -l $INTERFACE -a tcp_sendspace=655350 chdev -l $INTERFACE -a state=up ####################### # restore static routes ####################### If you lose any routes ( static ) they can be restored by doing a: mkdev -l inet0 ################################################################### # routen die beim anlegen des interfaces automatisch erzeugt werden ################################################################### route add -net 10.42.1/24 10.42.1.10 route add 10.42.1.10 loopback ###################################### # routingtable flushen und neu anlegen ###################################### route -f mkdev -l inet0 ######################## # defaultroute eintragen ######################## /usr/sbin/chdev -l inet0 -a route=net,-hopcount,1,-netmask,255.255.255.0,0,172.31.64.1 /usr/sbin/chdev -l inet0 -a route=net,-hopcount,1,-netmask,255.255.255.0,0,10.42.1.1 ####################### # defaultroute loeschen ####################### /etc/route -n -f; odmdelete -o CuAt -q "name=inet0 and attribute=route";savebase ##################### # netzroute eintragen ##################### chdev -l inet0 -a route=net,-hopcount,1,-netmask,255.255.255.0,172.31.16.0,172.31.64.1 ################################### # route von einer maschine kopieren ################################### lsattr -El inet0 | grep route | awk '{ print $2 }' > /tmp/routes move /tmp/routes to the target system and run this command : for RR in $(cat /tmp/routes) do chdev -l inet0 -a route=$RR done ##################### # hostroute erstellen ##################### chdev -l inet0 -a route=,-hopcount,,,, Beispiel: Einrichten einer Hostroute von 164.61.197.27 uerb Default-Gateway der MGI chdev -l inet0 -a route=host,-hopcount,1,,164.61.197.27,193.168.131.20 chdev -l inet0 -a route=host,-hopcount,1,,172.26.241.12,172.31.64.1 #################### # hostroute loeschen #################### chdev -l inet0 -a delroute=host,,172.26.129.23,172.28.64.19 Beispiel: # chdev -l inet0 -a delroute=host,,172.26.129.23,172.28.64.19 inet0 changed ################ # route loeschen ################ chdev -l inet0 -a delroute=net,-netmask,255.255.255.0,172.26.129.23,172.28.64.19 chdev -l inet0 -a delroute=net,-netmask,255.255.0.0,172.26.0.0,172.31.64.18 ##################### # route informationen ##################### odmget -q attribute=route CuAt And if you change it in the odm, you have to do a bosboot. So just change it with chinet/smit. ########################## # mac-adresse herausfinden ########################## entstat |grep Hardware Address Hardware Address: 00:06:29:c3:49:07 oder entstat ent0|grep "Hardware Address"|tr -d ":" oder entstat -d ent1|grep ardw|awk '{print $3}'|sed '1,$s/://g' #################### # display open ports #################### netstat -af inet ############################################### # display tcp sockets in Listen and udp in wait ############################################### lsof -i | egrep "COMMAND|LISTEN|UDP" lsof -i @ lsof -i : ################################ # eintraege in inittab erstellen ################################ Shutdown commands can be put into /etc/rc.shutdown. For startup I do the following to tell AIX about an /etc/rc.local script: /etc/rc.shutdown MUST be executable! mkitab -i rcnfs "rclocal:2:wait:/etc/rc.local >/dev/console 2>&1" ################# # shutdown script ################# /etc/rc.shutdown is the place to put things for shutdown: ! su - dba <<-EOF ! export ORACLE_HOME=$orahome ! export ORACLE_SID=$sid ! export PATH=$ORACLE_HOME/bin:$PATH ! svrmgrl < lparstat -i Node Name : kerp-sas001 Partition Name : SAS Partition Number : 2 Type : Dedicated-SMT Mode : Capped Entitled Capacity : 2.00 Partition Group-ID : 32770 Shared Pool ID : - Online Virtual CPUs : 2 Maximum Virtual CPUs : 2 Minimum Virtual CPUs : 1 Online Memory : 7936 MB Maximum Memory : 8192 MB Minimum Memory : 128 MB Variable Capacity Weight : - Minimum Capacity : 1.00 Maximum Capacity : 2.00 Capacity Increment : 1.00 Maximum Physical CPUs in system : 2 Active Physical CPUs in system : 2 Active CPUs in Pool : - Unallocated Capacity : - Physical CPU Percentage : 100.00% Unallocated Weight : - ######################### # cpu runs at which speed ######################### # /usr/bin/pmcycles This machine runs at 1201 MHz ####### # pwdck ####### check /etc/passwd list problems: pwdck -n -l ALL repair problems: pwdck -p -l ALL ############################ # password fuer user anlegen ############################ mkuser and pwdadm -c will get you part of the way to where you're going. ed - /etc/security/passwd </dev/kmem ####################### # dump-device erstellen ####################### erstelllen mit mklv -t sysdump -y setzen mit sysdumpdev -P -p /dev/hd7 Check it if this command run and did change: sysdumpdev -l # sysdumpdev auf /dev/sysdumpnull stellen sysdumpdev -P -p /dev/sysdumpnull sysdumpdev -P -s /dev/sysdumpnull # zurueckstellen auf hd-devices sysdumpdev -P -p /dev/hd7 sysdumpdev -P -s /dev/hd77 ########################### # paging-device verkleinern ########################### - make new ps mkps -a -n -s 30 rootvg hdisk0 - change actual ps chps -a n hd6 - Change the paging space entry in the /sbin/rc.boot file from: swapon /dev/hd6 to swapon /dev/paging00 (created bei mkps command) - list actual dump-settings sysdumpdev -l - change ps to new ps sysdumpdev -P -p /dev/paging00 - bosboot erstellen bosboot -d /dev/hdisk0 -a - reboot shutdown -Fr - alten pagingspace loeschen rmps hd6 - neuen ps erstellen mklv -t paging -y hd6 rootvg 30 - dump settings umstellen sysdumpdev -P -p /dev/hd6 - Change the paging space entry in the /sbin/rc.boot file from: swapon /dev/paging00 to swapon /dev/hd6 (created bei mklv command) - bosboot bosboot -d /dev/hdisk0 -a - activate hd6 as ps chps -a y hd6 - deactivate paging00 chps -a n paging00 - reboot shutdown -Fr - temp ps paging00 loeschen rmps paging00 ############## # dump analyse ############## "Problem Solving and Troubleshooting in AIX5L" RedBook (SG24-5496-01) Section 4.7 has some kdb basics. ################################################ # Moving the hd6 Paging Space within the Same VG ################################################ migratepv [ -i ] [ -l LogicalVolume ] SourcePhysicalVolume DestinationPhysicalVolume migratepv -l hd6 hdisk0 hdisk1 ########### # migratelp ########### 1. To move the first logical partitions of logical volume lv00 to hdisk1, type: migratelp lv00/1 hdisk1 2. To move second mirror copy of the third logical partitions of logical volume hd2 to hdisk5, type: migratelp hd2/3/2 hdisk5 3. To move third mirror copy of the 25th logical partitions of logical volume testlv to 100th partition of hdisk7, type: migratelp testlv/25/3 hdisk7/100 ################################### # number of licensed user ermitteln ################################### # lslicense Maximum number of fixed licenses is 30. Floating licensing is disabled. ############################ # einstellungen der maschine ############################ # lsattr -El sys0 keylock normal State of system keylock at boot time False maxbuf 20 Maximum number of pages in block I/O BUFFER CACHE True maxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS True maxuproc 256 Maximum number of PROCESSES allowed per user True autorestart false Automatically REBOOT system after a crash True iostat false Continuously maintain DISK I/O history True realmem 262144 Amount of usable physical memory in Kbytes False conslogin enable System Console Login False fwversion IBM,L99071 Firmware version and revision levels False maxpout 0 HIGH water mark for pending write I/Os per file True minpout 0 LOW water mark for pending write I/Os per file True fullcore false Enable full CORE dump True pre430core false Use pre-430 style CORE dump True rtasversion 1 Open Firmware RTAS version False modelname IBM,9076-WCN Machine name False systemid IBM,010078023 Hardware system identifier False boottype disk N/A False SW_dist_intr false Enable SW distribution of interrupts True cpuguard disable CPU Guard True ####################### # einstellungen adapter ####################### # lsattr -El en1 mtu 1500 Maximum IP Packet Size for This Device True remmtu 576 Maximum IP Packet Size for REMOTE Networks True netaddr 192.168.10.239 Internet Address True state up Current Interface Status True arp on Address Resolution Protocol (ARP) True netmask 255.255.255.0 Subnet Mask True security none Security Level True authority Authorized Users True broadcast 192.168.10.255 Broadcast Address True netaddr6 N/A True alias6 N/A True prefixlen N/A True alias4 N/A True rfc1323 N/A True tcp_nodelay N/A True tcp_sendspace N/A True tcp_recvspace N/A True tcp_mssdflt N/A True # lsattr -El ent1 busio 0x7fffc00 Bus I/O address False busintr 6 Bus interrupt level False intr_priority 3 Interrupt priority False tx_que_size 8192 TRANSMIT queue size True rx_que_size 256 RECEIVE queue size True rxbuf_pool_size 384 RECEIVE buffer pool size True media_speed Auto_Negotiation Media Speed True use_alt_addr no Enable ALTERNATE ETHERNET address True alt_addr 0x000000000000 ALTERNATE ETHERNET address True ip_gap 96 Inter-Packet Gap True ################ # mtu veraendern ################ chdev -l en1 -a mtu=new-value ##################### # adapter unconfigure m#################### # rmdev -l atm0 atm0 Defined # rmdev -d -l atm0 atm0 deleted ########################### # adapter aus odm entfernen ########################### # rmdev -d -l atm0 atm0 deleted #################### # adapter aktivieren #################### # mkdev -l 'ssa0' ssa0 Available ############################# # timeout setzen bei sessions ############################# You should check if environment variable TMOUT is set either in .profile or /etc/environment. TMOUT=3600 readonly TMOUT export TMOUT #################################### # bootfaehige cd unter aix erstellen #################################### smitty mkcdgeneric oder 1. To generate a bootable system backup to the CD-R device named /dev/cd1, enter: mkcd -d /dev/cd1 2. To generate a non-bootable volume group backup of the volume group myvg to /dev/cd1, enter: mkcd -d /dev/cd1 -v myvg Note: All savevg backup images are non-bootable. 3. To generate a generic system backup with the previously created mksysb and with /mydata/mksysb and /dev/cd0 as the package source location, and to write to /dev/cd1, enter: mkcd -d /dev/cd1 -G -m /mydata/mksysb -p /dev/cd0 mkcd -d /dev/cd1 -G -m /mksysb/mksysbname.obj -p /export/lpp_source/aix433/aix433_minimage Optional List for Devices to be installed: /usr/lpp/bosinst/cdfs.optional.list Note: The functionality required to create Rock Ridge format CD images and to write the CD image to the CD-R device is not part of the mkcd command. You must supply additional code to mkcd to do these tasks. The code will be called via shell scripts and then linked to /usr/sbin/mkrr_fs (for creating the Rock Ridge format image) and /usr/sbin/burn_cd (for writing to the CD-R device). Both links are called from the mkcd command. Some sample shell scripts are included for different vendor-specific routines. You can find these scripts in /usr/samples/oem_cdwriters. ####### # sdiff ####### vergleicht 2 Dateien gegenueber sdiff lslpp_machine1.out lslpp_machine2.out|grep -v "\|" # ohne gleiche inhalte sdiff lslpp_machine1.out lslpp_machine2.out|grep "|" # nur gleiche inhalte sdiff lslpp_machine1.out lslpp_machine2.out|grep ">" # filtert nur rechts sdiff lslpp_machine1.out lslpp_machine2.out|grep "<" # filtert nur links # erzeugen lslpp -qL >/tmp/lslpp_machine1.out lslpp -qL >/tmp/lslpp_machine2.out ############################### # herausfinden file --> fileset ############################### elod@root# lslpp -w /usr/sbin/mkcd File Fileset Type ----------------------------------------------------------- /usr/sbin/mkcd bos.sysmgt.sysbr File ########################### # alle files eines filesets ########################### lslpp -f packagename ############################# # when was software installed ############################# lslpp -h ############################ # when was machine installed ############################ lslpp -h bos.rte Fileset Level Action Status Date Time ---------------------------------------------------------------------------- Path: /usr/lib/objrepos bos.rte 5.2.0.0 COMMIT COMPLETE 04/22/05 11:18:18 5.2.0.40 COMMIT COMPLETE 12/06/04 16:23:45 5.2.0.50 COMMIT COMPLETE 04/22/05 15:11:49 Path: /etc/objrepos bos.rte 5.2.0.0 COMMIT COMPLETE 04/22/05 11:18:18 ################ # check filesets ################ lppchk -v lppchk -m3 -v --> liefert mehr infos ######################### # check prereq of fileset ######################### lslpp -p bos.net.tcp.client ################################# # check when system was installed ################################# lslpp -h bos.rte ############################################# # alle packages mit superseede level anzeigen ############################################# lslpp -L '-a' all ########### # bffcreate ########### /usr/lib/instl/sm_inst bffcreate_cmd -d 'QUELLE' -f'all' -t'ZIEL' '-X' Example: /usr/lib/instl/sm_inst bffcreate_cmd -d '/export/nim/customize/zusaetzliche_packages/5.2.0.0' -f'all' -t'/export/nim/customize/zusaetzliche_packages/5.2.0.0/bff' '-X' oder per gencopy gencopy -b "-qvX" -d . -t /tmp/inst.images -f File 2>&1 wobei File Inhalt: all oder nur 1 Medium auf Platte kopieren: gencopy -b "-qvSX" -d /dev/cd0 -t /export/nim/lpp_source/520all_res -f File 2>& 1 File: all ######################## # check for locale codes ######################## locale -a" will show you all the locales you have installed $ /tmp> /usr/lib/nls/lsmle -c ISO8859-1 C (POSIX) [C] ... ISO8859-15 German (Austria) [de_AT.8859-15] UTF-8 German (Austria) [DE_AT] ISO8859-1 German (Switzerland) [de_CH] ISO8859-15 German (Switzerland) [de_CH.8859-15] UTF-8 German (Switzerland) [DE_CH] IBM-1252 German [de_DE.IBM-1252] ISO8859-1 German [de_DE] ISO8859-15 German [de_DE.8859-15] UTF-8 German [DE_DE] ISO8859-15 German (Luxembourg) [de_LU.8859-15] UTF-8 German (Luxembourg) [DE_LU] ... ########################### # socksserver auf aix 4.3.3 ########################### export SOCKS5C_CONF=/etc/socks5c.conf and create your self a suitable socks5c.conf file, of course :-) I think they call this CIDR format, or some such. Anyway, it lists the network(s) to exclude, and the last line points at your socks server machine i.e. 207.146.170.0/24 NONE 0.0.0.0/0 mysocksserver.com My friend offered me the binaries for rtelnet, rftp, rwho and other utilities, and I had to export SOCKS_SERVER=mysocksserver.com Then I could use these utilities to go outside the firewall. # firewall port blocking http://coombs.anu.edu.au/~avalon/ You can generate a rule using genflt, I dumped the smitty output: /usr/sbin/genfilt -v 4 -a 'D' -s 'all' -m 'all' -g 'y' -c 'tcp' -o 'eq' -p '1234' -O 'any' -P '0' -r 'B' -w 'O' -l 'N' -t '0' Once you have your filters defined you then need to start the tcp filters up, use smitty ips4_start_stop #################################### # einstellungen zum passwort checken #################################### Mit dem Kommando pwdadm username kann man das Passwort aendern! # pwdadm -q kutz kutz: lastupdate = 902242010 ########################## # letzte login eines users ########################## # set - $(lsuser -a time_last_login kutz); echo ${2##time_last_login=} 1008012807 ################################### # aenderungen an resolv.conf machen ################################### namerslv -C "Domaenen Such-Liste" namerslv -E # umbenennen namerslv -e # Ruecknahme umbenennen namerslv -a -i {IP-Adresse} -D {Domain} -S {Search List} # Nameserver eintragen namerslv -a -i 172.31.64.227 namerslv -a -i 172.31.64.228 -S "search.domain1.de searchpath.domain2.de" Timeouts DNS-Server I think you are on the right track by changing the variable RES_TIMEOUT to a lower value, but you should also try and change RES_RETRY variable which overrides the default value for the retry, which is 4. This value is the number of times the resolver tries to query the name servers before giving up. Hence for default values of RES_TIMEOUT=5 sec and RES_RETRY=4 sec and for each retry the inital RES_TIMEOUT is multiplied by 2 RES_TIMEOUT=5 RES_RETRY=4 => 5 + 10 + 20 + 40 = 75 seconds RES_TIMEOUT=2 RES_RETRY=4 => 2 + 4 + 8 + 16 = 30 seconds RES_TIMEOUT=5 RES_RETRY=2 => 5 + 10 = 15 seconds RES_TIMEOUT=3 RES_RETRY=2 => 3 + 6 = 9 seconds So, change also the RES_RETRY value. Afterwards it should work. ######################### # status ethernet-adapter ######################### entstat -d ent0 ################## # check linkstatus ################## netstat -v |grep RJ45 ################## # check collisions ################## root@cws [/tmp]#netstat -I en0 Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 2.60.8c.2f.c3.ec 3403525 0 3655451 0 0 en0 1500 192.168.0 cws 3403525 0 3655451 0 0 ############################# # batch jobs ueber printqueue ############################# A backend is just an ordinary program or shell script. Here an example of a shell queue. It will execute the submitted scripts sequentially. ----- /etc/qconfig ---- bsh: discipline = fcfs device = bshdev bshdev: backend = /usr/bin/ksh ------------------------- To run a shell procedure called myproc using this batch queue, enter: $ qprt -Pbsh myproc ############################################# # removing all but 3 characters from a string ############################################# Using Bourne shell, how can I take a string of variable length and remove all but the last 3 characters. Try this (in Korn): len1=${#X} # Length of X ((len2=len1-3)) # minus 3 typeset -L$len2 CPL # Fixing length of $CPL to len2 left truncated CPL=$X Beware: -L$len2 WITHOUT space.... ######### # iptrace ######### iptrace -i en1 -s some.address.com -b /tmp/ftp.out iptrace: 0827-877 setsockopt -: There is not enough buffer space for the requested socket operation. Solution: no -o sb_max=1310720 ################### # lvcb ueberpruefen ################### getlvcb -AT ###################### # console ueberpruefen ###################### # lscons /dev/lft0 To change the system console to a file called console.out in the /tmp directory, enter: chcons /tmp/console.out To change the system console to a terminal with the tty3 logical name, enter: chcons /dev/tty3 To change the console to the default physical LFT display, enter: chcons /dev/lft0 ######################### # enable login on console ######################### chcons -a login=enable ############################################ # How do I increase the number of ptys > 64? ############################################ From: mick@oahu.cern.ch (Mickey Coggins) SMIT only allows 64. Try this: odmget -q"attribute=num and uniquetype=pty/pty/pty" PdAt | sed "s/0-64/0-512/" | odmchange -q"attribute=num and uniquetype=pty/pty/pty" -o PdAt chdev -l pty0 -anum=256 -P reboot ############################################# # I lost the root password, what should I do? ############################################# From: dramm@csusm.edu (Donald E. Ramm) Boot from boot diskettes, bootable tape, or bootable CD. At the Installation/Maint menu select item 4, "Start a limited function maintenance shell. At the subsequent "#" prompt enter the command: getrootfs hdiskN (where "N" is replaced by the number of a disk on your system that is in rootvg.) That will run for about a minute or so and you get a # prompt back. At this point you are logged in as root in single user mode. Change to /etc/security and edit the passwd file. Delete the three lines under root: password, update time (or whatever it's called), and flags. Save the file. Then at the prompt, give root a new password. Shutdown/reboot in normal mode. Log in with new password. ####################################### # accessing a system that will not boot ####################################### http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixins/aixinsgd/system_will_not_boot.htm#PJkRg222skil ################################# # How do I recover deleted files? ################################# Preferably from a backup. If you don't have a backup, at least one company, Compunix, claims to have a product that will recover deleted files. More information is available at . From: Bernard.Kozyra@bull.net [Editor's note: this one appears to be for the really desperate ones, but it might be helpful if you really need it the most.] RECOVERING REMOVED FILES AND DIRECTORIES IN A FILESYSTEM If a file is Deleted from the system, the filesytem blocks composing that file still exist, but are no longer allocated. As long as no new files are created or existing files extended within the same filesystem, the blocks will remain untouched. It is possible to reallocate the blocks to the previous file using the "fsdb" command (filesystem debugger). MAKE A BACKUP OF THE ENTIRE FILESYSTEM BEFORE PERFORMING THESE STEPS!!! ELSE ( BANG !!!!! ). It is possible to send a mail for have some informations ... Bernard.Kozyra@bull.net Steps to recover a deleted file ------------------------------- 1) "ls -id {dir}" (where dir is directory where file resided) Record INODE number for next step. 2) Unmount the filesystem. 3) "fsdb /{Mountpoint}" or "fsdb /dev/{LVname}" (where Mountpoint is the filesystem mount point, and LVname is the logical volume name of the filesystem) 4) "{INODE}i" (where INODE is the inode number recorded in step 1) This will display the inode information for the directory. The field a0 contains the block number of the directory. The following steps assume only field a0 is used. If a value appears in a1, etc, it may be necessary to repeat steps #5 and #6 for each block until the file to be recovered is found. 5) "a0b" (moves to block pointed to by field "a0" of this inode) 6) "p128c" (prints 128 bytes of directory in character format) Look for missing filename. If not seen, repeat this step until filename is found. Record address where filename begins. Also record address where PRIOR filename begins. If filename does not appear, return to step #5, and selecting a1b, a2b, etc. Note that the address of the first field is shown to the far left. Increment the address by one for each position to the right, counting in octal. 7) "a0b" (moves to block pointed to by field "a0" of this inode) If the filename was found in block 1, use a1b instead, etc. 8) "p128e" (prints first 128 bytes in decimal word format) Find the address of the file to recover (as recorded in step 6) in the far left column. If address is not shown, repeat until found. 9) Record the address of the file which appeared immediately PRIOR to the file you want to recover. 10) Find the ADDRESS of the record LENGTH field for the file in step #9 assuming the following format: {ADDRESS}: x x x x x x x x x x ... | | | | |-------- filename ------| inode # --+----+ | | | +-- filename length record 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. ############################################# #How do I control how hostnames are resolved? ############################################# From: Frank Kraemer Information from AIX 4.1.2 Infoexplorer: The default order can be overwritten by creating the configuration file, /etc/netsvc.conf and specifying the desired order. Both the default and /etc/netsvc.conf can be overwritten with the environment variable, NSORDER. If either the /etc/netsvc.conf file or environment variable, NSORDER are defined, then at least one value must be specified along with the option. examples: echo hosts = local,nis,bind >/etc/netsvc.conf NSORDER=local,bind; export NSORDER [Editor's notice: As of AIX 4.3 you also have bind4 & bind8 (for IPv4 & IPv6)] ################### # changing hostname ################### NAME= chdev -l inet0 -a hostname=$NAME /usr/sbin/hostid '$NAME' hostname $NAME uname -S $NAME ################################################################# # How to get your keyboard back after unplugging it from the 6000 ################################################################# From: Mickey Coggins and Anne Serre and L. Mark Larsen When you unplug your keyboard from a running system, and plug it back in, the key mapping is wrong. For example, keys like Caps Lock and Ctrl don't work as designed. Solution: Type at the command line /usr/lpp/diagnostics/da/dkbd Your screen goes black, you hear a few beeps, and your keyboard is reset. It works with any environment, Xwindows, hft, NLS... For Models 220, 230 and M20, use the following commands: /usr/lpp/diagnostics/da/dkbd /usr/lpp/diagnostics/da/dkbdsal (for the 220) After running the keyboard diagnostics to reset keyboard mappings, the repeat rate is also reset to some slow value (11, according to the man page). If the user is in X, you need to open an hft window. Do this with "xopen /bin/csh". Once you have an hft window, run "chhwkbd -r30". [Editor's note: By unplugging & plugging a keyboard/mouse on a live system you may/will damage/zap/fry/destroy the motherboard] ################################################### # How can I get the mouse back after unplugging it? ################################################### /usr/lpp/diagnostics/da/dmousea [Editor's note: By unplugging & plugging a keyboard/mouse on a live system you may/will damage/zap/fry/destroy the motherboard] ############### # Some acronyms ############### APAR - Authorized Program Analysis Report Created internaly by a systems programmer to solve a code bug. BOS - Base Operating System DCR - design change request Someone asked to change something. LPP - Licensed Program Product ODM - Object Data Manager Don't touch until you grok it. PRPQ - programming request for price quotation Essentialy, a program that is not available off-the-shelf. (e.g. HACMP started as a PRPQ, you could not order HACMP, but you could ask IBM for a highly-available solution) PTF - Program Temporary Fix SMIT - System Management Interface Tool SMITTY - SMIT, tty interface, no bells, no whistles. "alias smit=smitty" ###################################### # Maximum File/Filesystem Sizes in AIX ###################################### 23-Jan-04 AIX 4.3 AIX 5.1 AIX 5.2 JFS JFS JFS JFS2 JFS JFS2 AIX Kernel 32/64 32/64 32 Bit 64 Bit 32/64 32 Bit 64 Bit Maximum Supported File Size 64 GB 64 GB 1 TB 1 TB 64 GB 1 TB 16 TB Filesystem Size 1 TB 1 TB 1 TB 1 TB 1 TB 1 TB 16 TB ####################################### # Make and Back Up a Snapshot of a JFS2 ####################################### Beginning with AIX 5.2, you can make a snapshot of a mounted JFS2 that establishes a consistent block-level image of the file system at a point in time. The snapshot image remains stable even as the file system that was used to create the snapshot, called the snappedFS, continues to change. The snapshot retains the same security permissions as the snappedFS had when the snapshot was made. In the following scenario, you create a snapshot and back up the snapshot to removable media without unmounting or quiescing the file system, all with one command: backsnap. You can also use the snapshot for other purposes, such as accessing the files or directories as they existed when the snapshot was taken. You can do the various snapshot procedures using Web-based System Manager, SMIT, or the backsnap and snapshot commands. To create a snapshot of the /home/abc/test file system and back it up (by name) to the tape device /dev/rmt0, use the following command: /usr/sbin/backsnap -m /tmp/snapshot -s size=16M -i f/dev/rmt0 /home/abc/test This command creates a logical volume of 16 megabytes for the snapshot of the JFS2 file system (/home/abc/test). The snapshot is mounted on /tmp/snapshot and then a backup by name of the snapshot is made to the tape device. After the backup completes, the snapshot remains mounted. Use the -R flag with the backsnap command if you want the snapshot removed when the backup completes. 1 To create a snapshot for the /home/janet/sb file system and perform a backup on the snapshot by name, enter: /usr/sbin/backsnap -m /tmp/snapshot/janetsb -s size=16M -i -f/dev/rmt0 /home/janet/sb This command creates a logical volume of size 16 megabytes and then creates a snapshot for the /home/janet/sb file system on the newly created logical volume. It then mounts the snapshot on /tmp/snapshot/janetsb and backs up the files and directories in that file system by name to the /dev/rmt0 device. 2 To create a snapshot for the /home/janet/sb file system and perform a backup on the snapshot by inode, enter: /usr/sbin/backsnap -R -m /tmp/snapshot/janetsb -s size=16M -0 -f /dev/rmt0 /home/janet/sb This command creates a logical volume of size 16 megabytes and then creates a snapshot for the /home/janet/sb file system on the newly created logical volume. It then mounts the snapshot on /tmp/snapshot/janetsb and backs up the data in the snapshot by inode to the /dev/rmt0 device. After the backup completes, the snapshot is deleted. ##################### # defrag a filesystem ##################### 1. To defragment the /data1 file system located on the /dev/lv00 logical volume, enter: defragfs /data1 -q Reports the current state of the file system. -r Reports the current state of the file system and the state that would result if the defragfs command is run without either -q or -r flag. ########## # jfs/jfs2 ########## Function JFS Enhanced JFS Optimization 32-bit kernel 64-bit kernel Maximum file system size 1 terabyte 4 petabytes1 Maximum file size 64 gigabytes 4 petabytes1 Number of I-nodes Fixed at file system creation Dynamic, limited by disk space Large file support As mount option Default Online defragmentation Yes Yes namefs Yes Yes DMAPI Yes No Compression Yes No Quotas Yes No Deferred update Yes No Direct I/O support Yes Yes ###################### # mount option dio/cio ###################### direct IO oder Concurrent IO bei jfs2 ab AIX 5.2 ML02 mount -o cio /filesystem mount -o dio /filesystem oder permanent chfs -a options=cio /your/filesystem chfs -a options=dio /your/filesystem zuruecksetzen mit: chfs -a options= /your/filesystem # folgende parameter muessen in Oracle dafuer eingerichtet sein: lock_sga=true filesystemio_options=setall or directIO # Concurrent I/O should only be used for Oracle .dbf files (data & index, rbs or undo, system and temp) online redo logs and/or control files. When used for online redo logs or control files, these files should be isolated in their own JFS2 filesystem(s) that have been created with agblksize=512. Filesystem containing .dbf files should be created with agblksize=2048 if DB_BLOCK_SIZE=2k, or agblksize=4096 if DB_BLOCK_SIZE>= 4k. Failure to implement these agblksize guidelines is likely to result in a severe performance penalty. # Do not under any circumstances, use CIO mount option for the filesystem containing the Oracle binaries (!!!). Additionally, do not use DIO/CIO options for filesystem containing archive logs or any other files not already discussed. #################################### # defragmentiere alle gemounteten fs #################################### for i in `df|grep -v Mounted |awk '{print $7}'` do defragfs $i done #################### # defrag pagingspace #################### Paging space hd6 on volume group rootvg is fragmented reorgvg rootvg hd6 ###################### # creating large files ###################### 1. Create a 1GB file: /usr/sbin/lmktemp filename1 10737418424 2. Create a second 1GB file: cp filename1 filename2 3. To create a 2GB file, append the first file to the second file: cat filename1 >> filename2 4. To create a 3GB file, append the first file to the second file again: cat filename1 >> filename2 #################### # find growing files #################### find . -type f -xdev -ls | awk '{print $7" "$8" " $9" "$10" "$11}' | sort -rn |more ############## # enable quota ############## lslpp -l |grep bos.sysmgt.quota umount /home chfs -a "quota = userquota,groupquota" /home mount /home edquota -u user_who_gets_quota quotaon -u /home quotacheck /home ########################### # managing hang print queue ########################### - one device has "dev/wait" lpstat - stop spooler stopsrc -c -s qdaemon - spooler down? lssrc -s qdaemon - checken der queue lpstat oder lpstat -W (detailed) oder enq -sA - in spool-verzeichnis schauen cd /var/spool/lpd/stat ls -al p* cat /var/spool/lpd/stat/p.lpforu.lp0 - in prozesstabelle nach prozess schauen ps -ef|grep `cat /var/spool/lpd/stat/p ` - killen - start spooler startsrc -s qdaemon ################# # cancel printjob ################# qcan -Plpforu -xJOBnummer oder cancel JOBnummer ############################## # default systemdrucker setzen ############################## smitty qdefault oder /usr/lib/lpd/pio/etc/piochdfq -q 'xyz' oder export LPDEST=xyz ########################### # change ascii pass through ########################### /usr/lib/lpd/pio/etc/piochpq -q 'DRUCKERNAME' -d 'HOSTNAME' -d 'a' oder /usr/lib/lpd/pio/etc/piochpq -q 'DRUCKERNAME' -d 'HOSTNAME' -d 'p' ########################################## # Migrating Print Queues to Another System ########################################## 1. copy the /etc/qconfig (make a copy of the original before) 2. Copy the following files: /var/spool/lpd/pio/@local/custom/* /var/spool/lpd/pio/@local/dev/* /var/spool/lpd/pio/@local/ddi/* 3. change the permissions on the copied files to 664 chmod 664 filename 4. redigest the queue's enq -d 5. run the chvirprt command on each queue chvirprt -q -d Note: If you have a lot of queues, the best thing is to create a short script to do this for you. I grab the queue name and device name by running lsallq -c and saving it to a file. 6. cycle the printer subsystem stopsrc -cg spooler startsrc -g spooler ########################## # create new printer queue ########################## /usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'generic' -D asc -q print38 -h '53.239.67.32' -x 9100 Make sure you edit /etc/host and enter queue name and ipaddress Print38 53.239.67.32 Then issue stopsrc -s qdaemon ; startsrc -s qdaemon ################################################ # setting up remote printing form solaris to aix ################################################ I have set up a remote print que on our AIX server2 wich uses AIX server1's local que successfully. servers1,s qconfig entry is >lp4: > device = lp0 >lp0: > file = /dev/lp0 > header = never > trailer = never > access = both > backend = /usr/lib/lpd/piobe I have set up another remote que on the sun solaris 5.5.1 machine to use AIX server1,s local que. using 'lpadmin -p rempri -s server1!lp4 -T unknown -I any' this looks OK until I try 'lpstat -p', it gives me 'printer rempri faulted. enabled since Mon..... . available. system not responding.' You left out three commands. Here is the full procedure: lpsystem -t bsd server1 lpadmin -p rempri -s server1\!lp4 -T unknown -I any enable rempri accept rempri The lpsystem, enable, and accept commands are needed on Solaris 2.5.1 (SunOS 5.5.1) and previous, unless you have the SunSoft Print Client (SSPC) package installed. Solaris 2.6 and later, or machines with SSPC, only need the lpadmin command. ################################################ # moving print queues from one to another system ################################################ This is how you do it in AIX : Migrating Print Queues to Another System 1. copy the /etc/qconfig (make a copy of the original before) 2. Copy the following files: /var/spool/lpd/pio/@local/custom/* /var/spool/lpd/pio/@local/dev/* /var/spool/lpd/pio/@local/ddi/* 3. change the permissions on the copied files to 664 chmod 664 filename 4. redigest the queue's enq -d 5. run the chvirprt command on each queue chvirprt -q -d Note: If you have a lot of queues, the best thing is to create a short script to do this for you. I grab the queue name and device name by running lsallq -c and saving it to a file. 6. cycle the printer subsystem stopsrc -cg spooler startsrc -g spooler ################### # print queue start ################### smitty qstart oder qadm -U QueueName ################## # print queue stop ################## smitty qstop oder qadm -D QueueName ######################### # set default print queue ######################### smitty qdefault oder /usr/lib/lpd/pio/etc/piochdfq -q ########################## # hold a job or printqueue ########################## smitty qhld oder qlhd -# JOBNUMMER qhld -P QUEUENAME qhld -u USERNAME #################### # release a printjob #################### qlhd -r -# JOBNUMMER qhld -r -P QUEUENAME qhld -r -u USERNAME ############################## # move printjob between queues ############################## smit qmov oder qmov -m DestinationQueue -# JobNumber qmov -m DestinationQueue -P Queue qmov -m DestinationQueue -u User ############################ # list all supported printer ############################ lsdev -P -c printer -F "type subclass description" | sort -u ########################### # list all defined printers ########################### lsdev -C -c printer | sort -u ######################### # check queue qchk lpstat ######################### # qchk -A Queue Dev Status Job Files User PP % Blks Cp Rnk ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- --- pcl7872 hp@hp READY QUEUED 1 STDIN.20880 root 7 1 1 ps78720 hp@hp READY ############## # qprt options ############## -q quality 0 Fast font 1 Draft quality 2 Near letter quality 3 Enhanced quality 300 300 dots per inch (dpi) 600 600 dpi -#{j|h|v} Specifies a special functionality. The possible values for the Value variable are: j Displays a job number for the specified print job. H Queues the print job but holds it in a HELD state. v Validates the specified printer backend flag values. As part of the validation process, the command performs legality checking for illegal flag values, type checking, range checking, list checking, and other types of validation. Typically, the validation of backend flag values is useful because illegal flags are identified when the print job is submitted rather than at a later stage when the print job is processed. -d input data a Extended ASCII c PCL d Diablo 630 g Hewlett-Packard GL p Pass-through (sent to printer unmodified) s PostScript -j Init Initializes the printer before each file is printed. You can specify any of the following: 0 No initialization 1 Full initialization 2 Emulator selection only -O PaperHand Sets the type of input paper handling to one of the following: 1 Manual (insert one sheet at a time) 2 Continuous forms 3 Sheet feed -Y Duplex Sets duplexed output. Duplexed output uses both the front and back of each sheet of paper for printing. You can set one of the following: 0 Simplex 1 Duplex, long edge binding 2 Duplex, short edge binding ##################### # No login name found ##################### Found this on the IBM Website after doing a search on "no login name found" [1]http://www-1.ibm.com/support/docview.wss?uid=aix1d689ba01c7447fc285256cdb007df019 0781-111 * No login name found * This problem often occurs during the process of trying to cancel jobs to remote system, especially with Windows/NT servers when using AIXSHORT for stat filter. Be sure to use bsdshort and bsdlong. * Clear unwanted files out of /var/spool/lpd/qdir. These frequently give this problem. * Remove /etc/qconfig.bin, and rerun lpstat. ##### # ntp ##### /etc/ntp.conf server 172.28.2.8 --> btr008 ntpdate 172.28.2.8 --> sychronisiert die Zeit setclock 172.28.2.8 --> tut dasselbe ntpq -p --> zeigt infos an # ntpq -p remote refid st t when poll reach delay offset disp ============================================================================== *colonia.sp.medi LOCAL(2) 4 u 41 64 377 1.19 0.326 0.03 ################ # 32 oder 64 bit ################ To find out if server is running 32 or 64 bit enter; # bootinfo -K 32 find out machine supports 64-bit enter bootinfo -y The 64-bit support is in bos.64bit. lslpp -L bos.64bit. or check for the presence of the line "load64bit" in your inittab. load64bit:2:once:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs To truly change the kernel to 64-bit, you need to be at the 5.1 oslevel. The means to change to a 64-bit kernel are: From 32-bit to 64-bit: ln -sf /usr/lib/boot/unix_64 /unix ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix lslv -m hd5 bosboot -ad /dev/hdisk0 bosboot -ad /dev/hdisk1 shutdown -Fr bosboot -ad /dev/ipldevice # als alternative To change the kernel back to 32-bit: From 64-bit to 32-bit: Monoprozessor: ln -sf /usr/lib/boot/unix_up /unix ln -sf /usr/lib/boot/unix_up /usr/lib/boot/unix lslv -m hd5 bosboot -ad /dev/ipldevice shutdown -Fr Multiprozessor: 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 ################### # ipldevice corrupt ################### 0514-508 Cannot save the base customized information on /dev/ipldevice ipldevice neu anlegen bosboot -ad /dev/hdiskx savebase -v cd /dev rm ipldevice ln /dev/rhdiskx /dev/ipldevice ################################## # groesse einer Platte feststellen ################################## bootinfo -s hdisk0 #################### # anzahl prozessoren #################### bootinfo -z aixinstall0:/export/conf#bootinfo -z 0 Running this command returns one of the following: 0 = up (single processor) or 1 = mp (multiprocessor). #################### # determing platform #################### aixinstall0:/export/conf#bootinfo -T rspc ######################### # determing boot platform ######################### aixinstall0:/export/conf#bootinfo -p rspc or lscfg -vp |grep Arch ################# # last bootdevice ################# root@cws [~]# bootinfo -b hdisk0 ######################## # change / show bootlist ######################## to modify the bootlist where x is either 0 or 1, then reboot. Type: change the bootlist bootlist -m normal hdiskx cd0 rmt0 netboot bootlist -m normal ent0 hdisk0 list the bootlist bootlist -m normal -o oder # ipl_varyon -i PVNAME BOOT DEVICE PVID VOLUME GROUP ID hdisk0 YES 0045cfaa54ca198e 0045cfaabb9ec85b hdisk1 NO 0045cfaa70510c0a 0045cfaabb9ec85b ##################################### # check from which disk last boot was ##################################### # bootinfo -b #################### # bootblock loeschen #################### mkboot -c -d /dev/hdisk0 -->to clear the boot image off a defective disk ########################## # bosboot bootlv erstellen ########################## 1. To create a boot image on the default boot logical volume on the fixed disk from which the system is booted, enter: bosboot -a 2. To create a bootable image called /tmp/tape.bootimage for a tape device, enter: bosboot -ad /dev/rmt0 -b /tmp/tape.bootimage 3. To copy a given tape boot image to a tape device, enter: bosboot -w /tmp/tape.bootimage -d rmt0 4. To create a boot image file for an Ethernet boot, enter: bosboot -ad /dev/ent0 -M both 5. To create an uncompressed boot image for a hard disk /dev/hdisk1, enter: bosboot -ad /dev/hdisk1 -U 6. To create a token ring boot image for a machine whose hardware platform type is rspc while you are running on a machine whose hardware platform type is rs6k, enter: bosboot -ad /dev/tok -T rspc ################# # shutdown system ################# maintenance shutdown -m reboot shutdown -Fr ###################### # remote reboot string ###################### # find out which tty is used for console # grep cons /etc/inittab # lscons -a # odmget -q 'attribute=reboot_string AND name=tty0' CuAt # chdev -l 'tty0' -a reboot_enable='reboot' -a reboot_string='#@pw@#' -P aktivieren ueber Eingabe des Strings an der Console If you set the REMOTE reboot enable parameter to reboot or dump, once the chosen character sequence is typed on the terminal attached to the TTY device, the character sequence will be erased and a prompt (>) will be presented. You have the following two options at this prompt: - Press 1 on the keyboard Instructs the AIX kernel to perform a defined action (reboot or dump). - Press any other key The typed remote reboot string reappears on the screen as if you just typed it now. Therefore, nothing will happen, and the current session on this terminal will continue to be available. ################## # times for a file ################## "ls -l" shows atime "ls -lc" shows ctime "ls -lm" shows mtime "istat filename" will show all three. $ istat bb18b3.tar.gz Inode 20 on device 10/9 File Protection: rw-r--r-- Owner: 100(bb) Group: 100(bb) Link count: 1 Length 427247 bytes Last updated: Tue Aug 14 11:01:46 2001 Last modified: Thu Jun 21 07:36:32 2001 Last accessed: Thu Nov 01 20:38:46 2001 ########################### # datei auf welcher platte? ########################### fileplace -p foo.dbf when you have the information about the filename or his inode I think you can determine the pv and the file-location with the following command: fileplace -piv ######## # ncheck ######## List i-Nodes in Dirs ncheck -a /VZ List Filenames from Inodes ncheck -i INODENR INODENR /VZ List special and SUID Files ncheck -s /VZ ############################################ # ssh benutzt priviligierten port unter 1024 ############################################ Initial connection via port 22 is established ok. Looking at iptrace output and netstat output I notice that the local port allocation appears to be above the 1024 boundary. i.e. port 2151 is being assigned. Is there a flag on AIX or SSH that I can use to force the allocation of ports below 1024 for ssh tasks?. I think you might be looking for ssh -P, or in the config file: man ssh ==> UsePrivilegedPort Specifies whether to use a privileged port for outgoing connec- tions. The argument must be ``yes'' or ``no''. The default is ``yes''. Note that setting this option to ``no'' turns off RhostsAuthentication and RhostsRSAAuthentication. ################# # sendmail-config ################# In /etc/sendmail.cf Fuer DMZ Dm --> Dmrzag.net Cw localhost $?$m$. Dj$m DSmail.?.de --> DSmail.rzag.net DM --> DMrzag.net Fuer intern Dm --> Dmrzag.net Cw localhost $?$m$. Dj$m DSmail.?.de --> DSmail.intern.rzag.net DM --> DMrzag.net refresh -s sendmail ######################### # sendmail which version? ######################### According to O'Reilly, this is the command to find the version: # /usr/lib/sendmail -d0.1 -bt < /dev/null Version AIX 4.1/UCB 5.64. Address Test Mode: Enter
######################### # start sendmail over SRC ######################### stopsrc -s sendmail startsrc -s sendmail -a "-bd -q30m" ######################### # start sendmail sendonly ######################### stopsrc -s sendmail startsrc -s sendmail (ohne Parameter) ####################### # sendmail queue leeren ####################### sendmail -q -v ############################### # mail mit attachment versenden ############################### cat /etc/motd |uuencode test|mail -s test2 recipient will mail /etc/motd as a attachment called "test" to recipient with subject test2 ################ # mailstatistics ################ # mailstats Statistics from Tue Feb 7 02:15:25 MEZ 2006 M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis Mailer 3 23 579K 0 0K 0 0 local 8 1 1K 24 582K 0 0 relay ============================================================= T 24 580K 24 582K 0 0 C 24 24 0 ######################## # sendmail config mit mc ######################## sendmail.mc # # Restricted Materials of IBM # # (C) COPYRIGHT International Business Machines Corp. 1999,2003 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # Sample AIX file #DOMAIN(`generic')dnl divert(0)dnl OSTYPE(`aixsample')dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') MASQUERADE_AS(`example.org')dnl MASQUERADE_DOMAIN(`example.org')dnl FEATURE(`masquerade_envelope')dnl FEATURE(`masquerade_entire_domain')dnl FEATURE(`no_default_msa')dnl MAILER(local)dnl MAILER(smtp)dnl define(`SMART_HOST', `host.xyz.example.org')dnl cd /usr/samples/tcpip/sendmail/cf /usr/bin/m4 ../m4/cf.m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf ##################### # rewrite mailaccount ##################### to rewrite account xyz@hostname.domain.subdomain do: - comment out the genericstable entry in sendmail.cf - echo "account account@mydomain.subdomain" > /etc/mail/genericstable - makemap hash /etc/mail/genericstable.db < /etc/mail/genericstable - restart sendmail ############ # subsystems ############ $ lssrc -Ss sshd #subsysname:synonym:cmdargs:path:uid:auditid:standin:standout:standerr:action:multi:contact:svrkey:svrmtype:priority:signorm:sigforce:display:waittime:grpname: sshd::-D:/usr/local/sbin/sshd:0:0:/dev/console:/dev/console:/dev/console:-R:-Q:-S:0:0:20:15:9:-d:20:tcpip: ########################### # aio-server running oracle ########################### lsattr -El aio0 pstat -A | grep aioserver ps aux | grep kproc # pstat -a|grep aio|more 14 a e72 1 e72 0 0 1 aioserver 29 a 1d3c 1 1d3c 0 0 1 aioserver 30 a 1e44 1 1e44 0 0 1 aioserver 32 a 2048 1 2048 0 0 1 aioserver 33 a 214a 1 214a 0 0 1 aioserver 92 a 5cba 1 5cba 400 400 1 aioserver 121 a 791c 1 791c 400 400 1 aioserver 131 a 830c 1 830c 400 400 1 aioserver 132 a 8408 1 8408 400 400 1 aioserver 133 a 850a 1 850a 400 400 1 aioserver 134 a 860c 1 860c 400 400 1 aioserver 208 a d0ea 1 d0ea 400 400 1 aioserver 209 a d106 1 d106 400 400 1 aioserver ################### # change aio server ################### # default chdev -l aio0 -P -a minservers=1 -a maxservers=10 -a maxreqs=4096 # oracle chdev -l aio0 -P -a minservers=150 -a maxservers=750 -a maxreqs=16384 ######################## # check idle aio servers ######################## ps -elfk > /tmp/ps.out.1 sleep 60 ps -elfk > /tmp/ps.out.2 echo "Idle AIO-Server:" egrep aioser /tmp/ps.out.2 /tmp/ps.out.1 |sort -n +4 +13 +14|cut -f2-99 -d: |uniq -c|awk '$1==2{print}'|wc -l rm -f /tmp/ps.out.1 rm -f /tmp/ps.out.2 ################# # check ssa place ################# If you want to check a pdisk or hdisk connected to which ssa adapater : # ssaadap -l or looking in /usr/ssa/ssaraid/ssaraid.README gives: ssaraid -I -z -l ssa{n} -z is summary and you get output like pdisk1 0004AC509E8C00D member n/a 4.5GB Physical disk pdisk17 0004AC50E80800D system n/a 2.3GB Physical disk pdisk20 0004AC51B98200D system n/a 4.5GB Physical disk pdisk2 0004AC51BB5C00D member n/a 4.5GB Physical disk pdisk4 0004AC51D83F00D spare n/a 4.5GB Physical disk pdisk5 0004AC7D540D00D member n/a 4.5GB Physical disk pdisk6 0004AC7D74C000D member n/a 4.5GB Physical disk pdisk21 0004AC7DBD9F00D system n/a 2.3GB Physical disk pdisk23 0004AC9D4DB100D system n/a 2.3GB Physical disk pdisk9 0006294FAD6900D member n/a 4.5GB Physical disk pdisk3 00062992371600D member n/a 4.5GB Physical disk pdisk0 000629D0BA2B00D member n/a 4.5GB Physical disk hdisk11 239F3694BC71A4K good 27.1GB RAID-5 array without the -z you obviously get much more detail. The examples worked through in the above README are useful. ssaraid -Il ssa0 -n hdisk2 name pdisk0 id 0004AC9DF01600D class disk use system blocksize 512 size 4.5GB state good network_id A fastwrite off # ssaxlate -l pdisk28 hdisk30 ################################ # ssa-platte zum blinken bringen ################################ um platte leichter zu identifizieren (LED leuchtet) # bash # ssaxlate -l hdisk2 pdisk0 # ssaidentify -l pdisk0 -y Platte sollte jetzt blinken # ssaidentify -l pdisk0 -n Blinken sollte abgeschaltet sein VG=oracle02VG for i in `lsvg -p $VG|grep hdisk|awk '{print $1}'` do PDISK=`ssaxlate -l $i` ssaidentify -l $PDISK -y done VG=oracle02VG for i in `lsvg -p $VG|grep hdisk|awk '{print $1}'` do PDISK=`ssaxlate -l $i` ssaidentify -l $PDISK -n done ########################## # pruefen auf welcher loop ########################## ZAEHLER=1 PLATTEBIS=27 while true do HDISK=`ssaxlate -l pdisk${ZAEHLER}` SIZE=`bootinfo -s $HDISK` CONN=`ssaconn -l pdisk${ZAEHLER} -a ssa0` echo "$CONN $HDISK $SIZE" if [ $ZAEHLER = $PLATTEBIS ] then break else let ZAEHLER=$ZAEHLER+1 fi done pdisk18 ssa0 2 4 - - hdisk20 8689 pdisk19 ssa0 0 6 - - hdisk21 8689 pdisk20 ssa0 - - 2 4 hdisk22 8689 pdisk21 ssa0 - - 0 6 hdisk23 8689 pdisk22 ssa0 - - 1 5 hdisk4 8689 pdisk23 ssa0 - - 5 1 hdisk5 8689 pdisk25 ssa0 - - 3 3 hdisk27 8689 pdisk27 ssa0 - - 6 0 hdisk29 8689 Bedeutung: pdisk19 und pdisk27 sind in unterschiedlichen Drawern, aber am selben Platz! ####################### # microcode ssa-platten ####################### # ssadload -s pdisk0 294D2E1E 9191 DCHC pdisk1 29CA0E99 9595 DCHC pdisk2 29D1499C 0048 DGHC pdisk3 29D302C6 9902 DGHC pdisk4 294CB30F 8181 DCHC pdisk5 29CA0E22 9595 DCHC pdisk6 29D3081E 9902 DGHC pdisk7 29D148C0 0048 DGHC pdisk8 29D302BC 9902 DGHC pdisk9 29D098F3 9902 DGHC pdisk10 29D2608D 9902 DGHC ####################### # microcode ssa-adapter ####################### lscfg -v -l ssa0 | grep ROS ################## # ssa-shared disks ################## ssa_rescheck -l hdisk# ########## # ssa raid ########## States: Good State The array is online and it can be read and written. All the array components are present. All parity data (except that affected by recently completed write operations) is synchronized. No data or parity rebuilding is outstanding. The array is fully protected against the loss of one component. Exposed State One component is missing from the array. When the array is read, data can be reconstructed for the missing component. The first write operation causes the array to enter the "Degraded" state, unless there is no hot spare available that can be used to replace the missing component. In the "Exposed" state, the missing component can be reintroduced or replaced. Then, after any necessary rebuilding, the array is returned to the "Good" state. Degraded State One component is missing and a write operation has been received for the array. Read and write operations to the array are supported. However, if power is lost before all the parity data has been written, it might not be possible to recreate all the data for the missing component. The missing component is permanently excluded from the array. Note :- While in Degraded state, an array is not protected. If another disk drive in the array fails, or the power fails during a write operation, data might be lost. Rebuilding State The array is online and it can be read and written. The full complement of array components are present but data and parity are being rebuilt on one of the components. Offline State An array enters Offline state when two or more member disk drives become missing. Read and write operations are not allowed. ###################### # show status of array ###################### summary ssaraid -Il ssa0 -z detail ssaraid -Il ssa0 -n arrayname ############################ # change from system to free ############################ change pdisk0 to array-candidate SSARAID -H -l ssa0 -n pdisk0 -a use=free ################## # ssa raid anlegen ################## no hotspare SSARAID -C -l ssa0 -t raid_5 -s pdisk0 pdisk1 pdisk2 pdisk3 -d -k hdisk1 -a spare=false hotspare SSARAID -C -l ssa0 -t raid_5 -s pdisk0 pdisk1 pdisk2 pdisk3 -d -k hdisk1 -a spare=true ################## # disk replacement ################## change pdisk0 to array-candidate SSARAID -H -l ssa0 -n pdisk0 -a use=free ################# # fastwrite cache ################# check if possible lscfg -v -l ssa0 | grep "(Z1)" SSARAID -H -l ssa0 -n hdisk1 -a fastwrite=on ##################################### # adding extra disks to an raid array ##################################### * Backup the filesystems on the RAID array to tape or other media. * Umount the filesystems on the RAID array. * Remove the filesystems and logical volumes on the RAID array. * Varyoff the volume group that is on the RAID array * Export the volume group that is on the RAID array. * Delete the RAID array * Create a new RAID array including any new additional disks * Re-create the volume group on the hdisk associated with the new RAID array. * Re-create the logical volume and filesystems on the new RAID array. * Mount the filesystems on the RAID array. * Restore the backup from the tape or other media ################# # ssa raid delete ################# SSARAID -l ssa0 -d -l ssa0 -n hdisk1 -u ############## # ftpd timeout ############## You need to change the parameters in /etc/inetd.conf ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -t 1200 -t TimeOut Logs out inactive sessions after the number of seconds specified by the TimeOut variable. The default limit is 15 minutes (900 seconds). -T MaxTimeOut Logs out inactive client sessions after a maximum number of seconds specified by the MaxTimeOut variable. The default limit is 2 hours (7200 seconds). Once you make the change you will need to refresh inetd. ################################# # Changing umask behaviour in ftp ################################# In /etc/inetd.conf change the ftpd command to "ftpd -u OctVal" where "OctVal" is the umask you want (default umask for ftpd is 027). Refresh inetd so it recognizes the change: refresh -s inetd ######################### # configure anonymous ftp ######################### /usr/samples/tcpip/anon.ftp node5:/> lslpp -w /usr/samples/tcpip/anon.ftp File Fileset Type ---------------------------------------------------------------------------- /usr/samples/tcpip/anon.ftp bos.net.tcp.client File ################# # interactive ftp ################# echo "user username password" > ftp.txt echo "cd /some/directory" >> ftp.txt echo "put filename" >> ftp.txt echo "bye" >> ftp.txt ftp -nv xxx.xxx.xxx.xxx < ftp.txt > ftp.log ############## # group limits ############## I ran into this problem with NIS a long time ago. I believe it's limited to 255 or 255 characters per line after that just make a new line in your group file something like this: group1:123:user1,user2,user3 group1:123:user255,user256,user257 You can continue this forever as far as I know without any problems. We ran like this for years and never had any problems with doing this. OR: group file has a line length limit, this can be got round by hand defining multiple groups with the same id staff:!:1:fred,jim,john,.... staff1:!:barny,david,ann,jane,.... ######################################## # carriage return aus DOS-Datei loeschen ######################################## tr -d '\r" ######### # filemon ######### 1. To monitor the physical I/O activity of the virtual memory, logical volume, and physical volume levels of the file system, enter: filemon The filemon command automatically starts the system trace and puts itself in the background. After this command, enter the application programs and system commands to be run at this time, then enter: trcstop After the trcstop command is issued, the I/O activity report is displayed on standard output (but will probably scroll off the screen). The virtual memory I/O report will be limited to the 20 segments that incurred the most I/O. 2. To monitor the activity at all file system levels, and write the report to the fmon.out file, enter: filemon -o fmon.out -O all # check complete system filemon -v -o /tmp/fmon_all.out -O all trcstop # check only pv,lv filemon -d -o /tmp/fmon_pv_lv.out -O pv,lv trcoff trcon trcstop # monitor 90 seconds sudo filemon -o /tmp/filemon.out -O lv,pv -T 5000000;sleep 90;sudo trcstop ########################## # filemon.pl im scripte VZ ########################## filemon -T 320000 -o /tmp/filemon.out; sleep 20; trcstop /usr/local/bin/filemon.pl /tmp/filemon.out ######### # telnetd ######### Q:What does the -a switch do in telnetd -a? It's the kerberised version of telnetd: -a authmode This option may be used for specifying what mode should be used for authentication. ###################### # large memory support ###################### ORACLE_HOME=/opt/oracle/product/9.2.0 ORACLE_HOME=/opt/oracle/product/10.2.0 ORACLE_HOME=/opt/oracle/product/11.1.0 ORACLE_HOME=/opt/oracle/product/11.2.0 lgpg_regions*lgpg_size=Memory_Configured_for_LP_Support Vorarbeiten: 1 GB Large memory = vmo -r -o lgpg_regions=64 -o lgpg_size=16777216 vmo -o lgpg_regions=64 -o lgpg_size=16777216 2 GB Large memory = vmo -r -o lgpg_regions=128 -o lgpg_size=16777216 vmo -o lgpg_regions=128 -o lgpg_size=16777216 4 GB Large memory = vmo -r -o lgpg_regions=256 -o lgpg_size=16777216 vmo -o lgpg_regions=256 -o lgpg_size=16777216 8 GB Large memory = vmo -r -o lgpg_regions=512 -o lgpg_size=16777216 vmo -o lgpg_regions=512 -o lgpg_size=16777216 16 GB Large memory = vmo -r -o lgpg_regions=1024 -o lgpg_size=16777216 vmo -o lgpg_regions=1024 -o lgpg_size=16777216 32 GB Large memory = vmo -r -o lgpg_regions=2048 -o lgpg_size=16777216 vmo -o lgpg_regions=2048 -o lgpg_size=16777216 64 GB Large memory = vmo -r -o lgpg_regions=4096 -o lgpg_size=16777216 vmo -o lgpg_regions=4096 -o lgpg_size=16777216 To use large pages for shared memory, you must enable the SHM_PIN shmget() system call with the following command, which persists across system reboots: vmo -p -o v_pinshm=1 lsuser -a capabilities oracle chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle lsuser -a capabilities oracle vi init.ora LOCK_SGA=true # Edit the XCOFF file header in the oracle bin enable it to use large page data: ldedit -b lpdata $ORACLE_HOME/bin/oracle ldedit: File /opt/oracle/product/10.2.0/bin/oracle has been updated. or LDR_CNTRL=LARGE_PAGE_TEXT=Y@LARGE_PAGE_DATA=M export LDR_CNTRL BEFORE starting Instance and Listener ############################# # check for largepages in use ############################# vmstat -l ps -Z pagesize -af ######### # backout ######### vmo -r -o lgpg_regions=0 -o lgpg_size=0 lsuser -a capabilities oracle chuser capabilities= oracle lsuser -a capabilities oracle ldedit -b nolpdata $ORACLE_HOME/bin/oracle ldedit: File /opt/oracle/product/10.2.0/bin/oracle has been updated. or vi ~oracle/.profile chmod 6751 $ORACLE_HOME/bin/oracle bosboot -ad /dev/ipldevice shutdown -Fr vmstat -l 2 (look for alp, flp) alp allocated Large Pages flp free Large Pages ############################## # ps memory und cpu auslastung ############################## you can see all your processes with %MEM and %CPU for each one with Usage Memory + CPU ps ug|more hierbei wird die RSS-spalte (Real Mem Usage of Process) der ersten 6 Prozesse ausgewertet ps auxwww|awk '{ sum +=$6} END { print "SUM = ", sum; }' SUM = 195464 RSS (v flag) The real-memory (resident set) size of the process (in 1KB units). im obigen Beispiel wird 195464 KB also 195 MB genutzt! oder svmon -G size inuse free pin virtual memory 65372 42740 22632 6329 17492 pg space 193536 391 work pers clnt pin 6135 194 0 in use 23721 19019 0 # memory Usage 1 User svmon -U # memory usage per user svmon -Uut 10|more svmon -Put 10 # top 10 users of memory svmon -Pgt 10 # top 10 users or paging space 1) svmon -Put 10 | more The top line will provide you with all the info you need, and it will list your top 10 (oracle) memory hogs FYI...(Inuse / 256) = MB (approximate) 2) ps vg|head -1;ps vg | sort -r +5 | head Sorts on the SIZE column, then you can use the PID to find the offender (oracle) - notice there is no '-' in front of the vg...very important 3) ps aux|head -1;ps aux | sort -nr +3 | head Lists the %MEM column - +2 lists %CPU. Again, no '-' in front of the aux. #################### # ipcs shared memory #################### # all info # ipcs -a # shared mem # ipcs -m # semaphores # ipcs -s # unbenutzte shared mem segmente loeschen ipcs -m suche in spalte NATTCH nach 0, diese koennen mit ipcrm -m NUMMER entfernt werden # unbenutzte semaphoren loeschen for i in `ipcs -s |grep "00000000 -----------" |awk '{print $2}'` do echo ${i} ipcrm -s ${i} done ############################# # opened libraries at runtime ############################# aixinstall0:/#which genld /usr/bin/genld Proc_pid: 0 Proc_name: swapper Proc_pid: 1 Proc_name: init d0004000 /usr/lib/libpthreads.a/shr_xpg 5.o d0001000 /usr/lib/libpthreads.a/shr_com ... 1- To get a listing of the libraries an executable file needs to run: # dump -Hv exec_file To get a listing of the libraries a process uses: # genld | grep -p pid ##################################### # dump header information of a binary ##################################### # dump -ov /usr/java131/jre/bin/java /usr/java131/jre/bin/java: ***Object Module Header*** # Sections Symbol Ptr # Symbols Opt Hdr Len Flags 4 0x00009160 669 72 0x1002 Flags=( EXEC DYNLOAD ) Timestamp = "May 17 16:29:56 2004" Magic = 0x1df (32-bit XCOFF) ***Optional Header*** Tsize Dsize Bsize Tstart Dstart 0x0000696b 0x00000301 0x0000081c 0x10000128 0x20000a93 SNloader SNentry SNtext SNtoc SNdata 0x0004 0x0002 0x0001 0x0002 0x0002 TXTalign DATAalign TOC vstamp entry 0x0005 0x0003 0x20000c70 0x0001 0x20000c14 maxSTACK maxDATA SNbss magic modtype 0x00000000 0x80000000 0x0003 0x010b UR ######################## # performance diagnostic ######################## /usr/sbin/perf/diag_tool/pdt_config http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/prftungd/2365cd4.htm ###### # nmon ###### # alte 9er Version export NMON="vlntDpkA" # neue 10er Version export NMON="BlnmtdkAa" # vpathdevs export NMON="BlnmtekAa" # Linux export NMON="Blnmtkd" nmon -h Hint: nmon [-h] [-s ] [-c ] [-f -d -t -r ] [-x] -h FULL help information - much more than here Interactive-Mode: read startup banner and type: "h" once it is running For Data-Collect-Mode (-f) -f spreadsheet output format [note: default -s300 -c288] optional -s between refreshing the screen [default 2] -c of refreshes [default millions] -t spreadsheet includes top processes -x capacity planning (15 min for 1 day = -fdt -s 900 -c 96) For Interactive-Mode -s between refreshing the screen [default 2] -c of refreshes [default millions] -g User decided Disk Groups - file = on each line: group_name space seperated - like: rootvg hdisk0 hdisk1 hdisk2 - upto 32 groups hdisks can appear more than once -b black and white [default is colour] example: nmon -s 1 -c 100 For Data-Collect-Mode = spreadsheet format (comma separated values) Note: use only one of f,F,z,x or X and make it the first argument -f spreadsheet output format [note: default -s300 -c288] output file is _YYYYMMDD_HHMM.nmon -F same as -f but user supplied filename -r goes into spreadsheet file [default hostname] -t include top processes in the output -T as -t plus saves command line arguments in UARG section -s between snap shots -c of refreshes -l disks/line default 150 to avoid spreadsheet issues. EMC=64. -g User decided Disk Groups (see above -g) -D Skip disk configuration sections -E Skip ESS configuration sections -I Ignore process percent threshold (default 0.1) don't save TOP stats if proc using less CPU than this % -A Include Async I/O Section -m nmon changes to this directory before saving data to a file example: collect for 1 hour at 30 second intervals with top procs nmon -f -t -r Test1 -s30 -c120 To load into a spreadsheet like Lotus 1-2-3: sort -A *nmon >stats.csv transfer the stats.csv file to your PC Start 1-2-3 and then Open Capacity planning mode - use cron to run each day -x sensible spreadsheet output for CP = one day every 15 mins for 1 day ( i.e. -ft -s 900 -c 96) -X sensible spreadsheet output for CP = busy hour every 30 secs for 1 hour ( i.e. -ft -s 30 -c 120) Set-up and installation If you get a "can't open /dev/kmem" message then as root run: chmod ugo+r /dev/kmem or run the tool as the root user To enable disk stats as root: chdev -l sys0 -a iostat=true - this adds the disk % busy numbers (otherwise they are zero) If you have hundreds of disk this can take 1% to 2% CPU Interactive Mode Commands key --- Toggles to control what is displayed --- h = Online help information r = RS6000/pSeries type, machine name, cache details and AIX version + LPAR c = CPU by processor stats with bar graphs l = long term CPU (over 75 snapshots) with bar graphs m = Memory and Paging stats k = Kernel Internal stats n = Network stats d = Disk I/O Graphs D = Disk I/O Stats o = Disk I/O Map (one character per disk showing how busy it is) g = Disk Group I/O Stats (have to use -g commandline option) a = Adapter I/O Stats e = ESS vpath Logical Disk I/O Stats j = JFS Stats f = Fast Response Cache Accelerator Stats (IBM HTTP web server) t = Top Process Stats 1=Basic-Details 2=Accumulated-CPU Performance sorted by 3=CPU 4=Size 5=I/O u = Top but with command arguments shown (used with 3,4 & 5) to refresh arguments (for new processes) hit u twice w = use with top to show AIX wait processes (good for SMP) A = Summarise Async I/O (aioserver) processes v = Verbose this highlights problems on the machine and categorises them as either danger, warnings or OK b = black and white mode (or use -b option) . = minimum mode i.e. only busy disks and processes key --- Other Controls --- + = double the screen refresh time - = halves the screen refresh time q = quit (also x, e or control-C) 0 = reset peak counts to zero (peak = ">") space = refresh screen now Startup Control If you find you always type the same toggles every time you start then place them in the NMON shell variable. For example: export NMON=cmdrvtan Others: a) Use shell variable NMONAIX=4.3.2 to a force AIX version To you want to stop nmon - kill -USR2 b) Use -p and nmon outputs the background process pid c) To limit the processes nmon lists (online and to a file) Either set NMONCMD0 to NMONCMD63 to the program names or use -C cmd:cmd:cmd etc. example: -C ksh:vi:syncd d) If you want to pipe nmon output to other commands use a FIFO: mkfifo /tmp/mypipe nmon -F /tmp/mypipe & grep /tmp/mypipe e) If nmon fails please report it with: 1) nmon version like: v9a 2) the output of lslpp -L bos.mp (or for uniprocessor bos.up) 3) some clue of what you were doing 4) I may ask you to run the debug version f) From version 7 nmon can output rrdtool friendly output Use -R - you then have to create suitable rrd databases and can run nmon output via ksh to update them This is still experimental - help needed (see the README.txt) Written by Nigel Griffiths nag@uk.ibm.com and Richard Cutler Feedback welcome - on the current release only and state exactly the problem Version v9a - updated for each AIX release No warranty given or implied. ####################################### # daten fuer einen Tag mit nmon sammeln ####################################### alle 300 sekunden (5 minuten) + 288 = 1 Tag cd /tmp nmon -f -s300 -c288 ######## # vpaths ######## 0:root@testy:/ # lsdev -Cl dpo dpo Available Data Path Optimizer Parent 0:root@testy:/ # lsattr -El dpo Enterpr_maxlun 600 Maximum LUNS allowed for Enterprise Products True ==> Wieviele ESS, DS8000, DS6000 LUNs kann ich anschliessen? Virtual_maxlun 512 Maximum LUNS allowed for Virtualization Products False ==> Wieviele SAN Volume Controller LUNS kann ich anschliessen? persistent_resv yes Subsystem Supports Persistent Reserve Command False qdepth_enable no Queue Depth Control True Das kann man entsprechend anpassen: chdev -l dpo -a Enterpr_maxlun=zzz. Algorithmen zur Wahl des Pfades Der SDD Treiber setzt verschiedene Algorithmen zur Verteilung des I/O auf die vorhandenen Pfade ein. Dieses lassen sich mit dem datapath-Kommando setzten. * fo - Failover Only Saemtlicher Verkehr geht ueber einen preferred Adapter. Faellt der aus, wird ein anderer Adapter genutzt. * lb - Load Balancing Anhand der aktuellen I/O Operationen eines Adapters werden die Adapter priorisiert. Die Last wird so gleichverteilt; sind Adapter gleich ausgelastet, so wird per Zufall zwischen ihnen gewaehlt. Diese Policy wird auch als Optimized bezeichnet. * rr - Round Robin Der Pfad fuer die anstehende I/O Operation wird per Zufall unter den Pfaden verteilt, der letzte aktive Pfad bzw. Adapter bleibt ausgenommen. * df - Default Die Default-Policy ist Load Balancing. Die aktuelle Policy eines vpath findet sich in der Ausgabe des lsattr-Kommandos (oder in der Ausgabe von datapath query device: 0:root@testy:/root # lsattr -El vpath5 active_hdisk hdisk7/00C27913/fscsi0 Active hdisk False active_hdisk hdisk17/00C27913/fscsi1 Active hdisk False policy df Scheduling Policy True pvid 00c8ca9d7853d4340000000000000000 Physical volume identifier False serial_number 00C27913 LUN serial number False Der vpath5 zeigt also ueber die (virtuellen) Platten hdisk7 und hdisk17 und die beiden Fiber-Channel Adapter fscsi0 und fscsi1 auf die ESS C27913. Die Policy steht auf Default, als wird die Last ueber Load Balancing verteilt. Die Policy kann man veraendern mit den datapath-Kommando: 0:root@testy:/root # datapath query device Total Devices : 10 .... DEV#: 5 DEVICE NAME: vpath5 TYPE: 2105800 POLICY: Optimized SERIAL: 00C27913 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk7 CLOSE NORMAL 3345 0 1 fscsi1/hdisk17 CLOSE NORMAL 3417 0 .... 0:root@testy:/root # datapath set device 5 policy rr DEV#: 5 DEVICE NAME: vpath5 TYPE: 2105800 POLICY: Round Robin SERIAL: 00C27913 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk7 CLOSE NORMAL 3345 0 1 fscsi1/hdisk17 CLOSE NORMAL 3417 0 Es ist dabei egal, ob das Device OPEN oder CLOSE ist. Welche Programme / Befehle kommen mit SDD? Eine Auswahl der Dienstprogramme, die mit dem SDD Fileset installiert werden. Die Befehle sind teilweise sehr wichtig: * addpaths - Fuegt einem bestehenden vpath-Device weitere Pfade zu. Das Kommando ist dynamisch, der vpath ist aktiv und im Status "available". * cfallvpath - Legt das SDD Pseudo-Device dpo an sowie alle vpath Devices. * chgvpath - aendert vpath Attribute. * datapath - Eine Administrations-Konsole fuer SDD Treiber. * lquerypr - Zeigt und setzt persistente Reservierungen (SCSI Locks). * lsvpcfg - Zeigt die Zuordnung Platte - vpath Device. * querysn - Zeigt die serielle Nummer der Devices. * mkvg4vp - Legt SDD Volume Groups an. * extendvg4vp - Erweitert SDD Volume Groups. * dpovgfix - Repariert eine SDD Volume Group, die gemischte hdisk / vpath Devices aufweist. * pathtest - Umfangreiches Tool zum Testen und Debuggen. Wie sind meine (virtuellen) Platten auf die vpath verteilt? Dazu dient das Kommando lsvpcfg: 0:root@testy2:/root # lsvpcfg vpath0 (Avail pv testy_vg) 00427298 = hdisk2 (Avail ) hdisk12 (Avail ) vpath1 (Avail ) 10427298 = hdisk3 (Avail ) hdisk13 (Avail ) vpath2 (Avail ) 30427298 = hdisk4 (Avail ) hdisk14 (Avail ) vpath3 (Avail pv hbb_vg) 30627298 = hdisk5 (Avail ) hdisk15 (Avail ) vpath4 (Avail ) 50427298 = hdisk6 (Avail ) hdisk16 (Avail ) vpath5 (Avail pv testy_vg) 00C27913 = hdisk7 (Avail ) hdisk17 (Avail ) vpath6 (Avail pv hbb_vg) 00D27913 = hdisk8 (Avail ) hdisk18 (Avail ) vpath7 (Avail pv ) 10727913 = hdisk9 (Avail ) hdisk19 (Avail ) vpath8 (Avail ) 20327913 = hdisk10 (Avail ) hdisk20 (Avail ) vpath9 (Avail ) 30227913 = hdisk11 (Avail ) hdisk21 (Avail ) Hier ist jeder vpath mit den zugeordneten Platten gezeigt. Platte hdisk2 und hdisk12 sind also "virtuelle" Platten auf der lokalen Maschine, die ueber zwei verschiedene Fiber-Channel Adapter auf diesselbe, physikalische Platte in einer Storage Box zeigen - das ist der vpath. Wichtig ist, dass pro vpath mindestens 2 Platten im Zustand "Available" stehen. Das Attribut pv (AIX sieht dieses Device als physikalisches Volume) darf nur dem vpath zugeordnet sein. Taucht es bei hdisk-Devices auf, so muss das mit dem dpovgfix Kommando korriert werden. Man kann die Ausgabe auf einzelne Typen von Storage Boxen oder Virtualisierungs Einheiten beschräen, z.B. lsvpcfg -d 2105. datapath Kommando Ist eine Administrations-Konsole, mit der man Parameter auslesen und Setzen sowie Pfade oeffnen und schliessen kann. Dazu dienen entsprechende Subkommandos. Nuetzlich sind folgende Kommandos zum Auslesen von Information: * datapath query device - Zeigt jedes bekannte Device mit zugehoeriger Information. * datapath query essmap - Zeigt Pfad und Lokation an. * datapath query portmap - Zeigt die Verteilung der Devices auf die Ports der Storage Box an. * datapath query wwpn - Zeigt die World Wide Port Number der FC Adapter. * datapath query adapter - Zeigt Informationen zu den FC Adaptern. * datapath query adaptertats - Zeigt Statistiken der Adapter. Setzt man den Befehl ohne Subkommandos ab, so werden alle aktuellen Moeglichkeiten angezeigt. Damit ist es leicht, die Kommandos zum Setzen der Parameter zu finden. Was passiert, wenn ich cfgmgr oder chdev ausfuehrt Beim Kommando cfgmgr ist zu beachten, dass er bei Platten, die schon eine PVID haben, pro Fiber-Channel Adapter einmal ausgefuehrt werden muss (cfgmgr findet die PVID, traegt sie in die ODM ein und setzt das Device in den Status "defined". Findet er diese PVID dann nochmal ueber den anderen Adapter, macht er nichts mehr. Ruft man cfgmgr nochmal auf, ist die Platte im Zustand "Available" und wird nochmal eingerichtet). Beim Kommando chdev gegen eine der hdisk wird die PVID der Platte ausgelesen und von der chdev-Methode in die ODM eingetragen. Das hat zur Folge, das sowohl fuer vpath Device wie fuer eine der "virtuellen" hdisk eine PVID existiert und AIX davon ausgeht, dass es sich um physikalische Devices handelt. Dieser Fehler taucht in der Ausgabe des lsvpcfg-Kommandos auf (Attribut "pv" einer hdisk zugeordnet) sowie in der Ausgabe des lsvg -p-Kommandos (statt eines vpath erscheint eine hdisk). Dieses Problem muss mit dem dpovgfix-Kommando behoben werden, da sonst ein vpath verloren geht. Die VG muss varyon sein, aber die Filesysteme sollten nicht gemountet sein. Wie lege ich richtig Volume Groups an? Anlegen von Volume Groups mit SDD Platten erfordert bestimmte Kommandos, die "normalen" LVM Kommandos reichen nicht aus. Es gibt fuer alle SMIT Fenster und Kommandozeilen Befehle spezielle Versionen fuer vpath Devices: mkvg4vp, extendvg4vp, savevg4vp. Weitere Befehle sind zugleich auch SMIT Fenster und spezifisch fuer vpath Devices: lsvpcfg, cfallvpath, addpaths. Fehlermeldungen im Error-Report Es werden eine Reihe Nachrichten zu vpath-Devices und sddsrv (errpt -a |grep VPATH bzw. SDD). Das ist teilweise nuetzlich, wenn man mit gelockten Devices kaempft. * VPATH_FAIL_RELPRESERVE - Wird ausgegeben, wenn ein Device geschlossen wurde, aber die persistent reserve nicht geloest werden konnte. Das Device ist also weiterhin gesperrt, und ein Versuch, es zu oeffnen, gibt den folgenden Fehler. * VPATH_RESV_CFLICT - Der aktuelle Reservation Key ist nicht der, mit dem das SDD vpath-Device gesperrt ist. Jemand anders sperrt die Platte bzw. den vpath. Besonders im HACMP Umfeld notorisch. Hier muss man mit lquerypr -vh das Lock wegnehmen. * VPATH_PATH_OPEN - Einer der Pfade eines vpath-Devices konnte nicht geoeffnet werden (trotzdem ist der vpath ueber die anderen Pfade verfuegbar. Erst wenn keiner der Pfade funktioniert, wird die Meldung VPATH_OUT_SERVICE geschrieben. * VPATH_XBUF_NOMEM - Fuer ein vpath-Device sollte ein Device-special File angelegt werden. Es war aber kein Kernel-Memory mehr verfuegbar und der Aufruf ist fehlgeschlagen. * VPATH_DEVICE_OFFLINE - Nach mehreren erfolglosen Versuchen, I/O ueber einen Pfad abzusetzten, ist dieser Offline genommen und in den Status DEAD gesetzt worden. * VPATH_DEVICE_ONLINE - Wenn ein Pfad nicht erreichbar ist (DEAD), kann er per auto_failback wieder aktiviert werden. Dabei wird nach 2000 I/O Aufrufen der Pfad wieder angesprochen. Funktioniert es, geht der Status nach OPEN. Funktioniert der I/O nicht, so wird der Pfad zwar wieder online genommen, aber erst nach weiteren 50000 I/O Operationen auf den anderen Pfaden in den Status OPEN gesetzt. In beiden Faellen gibt es diese Meldung. * VPATH_OUT_SERVICE - Ein vpath Device hat keinen Pfad zu keiner Platte mehr. Das Device ist damit im LIMBO, und jeder Aufruf wird sofort an den Verursacher zurueckgegeben. Wichtige Kommandos Welche Devices sind an meine Maschine angeschlossen? 0:root@testy:/ # lsdev -C -t 2105 hdisk2 Available 05-08-01 IBM FC 2105 hdisk3 Available 05-08-01 IBM FC 2105 hdisk4 Available 05-08-01 IBM FC 2105 hdisk5 Available 05-08-01 IBM FC 2105 hdisk6 Available 05-08-01 IBM FC 2105 hdisk7 Available 05-08-01 IBM FC 2105 hdisk8 Available 05-08-01 IBM FC 2105 hdisk9 Available 05-08-01 IBM FC 2105 2105 ==> ESS (mit FC ==> Fiber Channel connected, sonst SCSI) 2107 ==> DS8000 1750 ==> DS6000 2145 ==> SAN Volume Controller Device 2062 ==> SAN Volume Controller for Cisco MDS 9000 Wie sehe ich den all die Sachen, die ich fuer meine Pfade definiert habe? Mit lsattr -El vpathX und lsattr -El hdiskX. 0:root@testy:/ # lsattr -El vpath0 active_hdisk hdisk2/00427298/fscsi0 Active hdisk False active_hdisk hdisk12/00427298/fscsi1 Active hdisk False policy df Scheduling Policy True pvid 00c8ca9d7853d69c0000000000000000 Physical volume identifier False serial_number 00427298 LUN serial number False 0:root@testy:/ # lsattr -El hdisk2 PR_key_value none Reserve Key True location Location Label True lun_id 0x5004000000000000 Logical Unit Number ID True lun_reset_spt yes Support SCSI LUN reset True max_transfer 0x40000 N/A True node_name 0x5005076300c0a83a FC Node Name False pvid none Physical volume identifier False q_type simple Queuing TYPE True qfull_dly 20 delay in seconds for SCSI TASK SET FULL True queue_depth 20 Queue DEPTH True reserve_policy single_path Reserve Policy True rw_timeout 60 READ/WRITE time out value True scbsy_dly 20 delay in seconds for SCSI BUSY True scsi_id 0x30600 SCSI ID True start_timeout 180 START unit time out value True ww_name 0x5005076300cba83a FC World Wide Name False Hilfreich ist auch das lspath-Kommando. Gibt es ein Debug- oder Testtool in der Art des AIX diag? Das Kommando heisst /usr/sbin/pathtest. Kann ich auf einen Blick meine Platten, die LUN, Art der Platte, Groesse sehen? Das geht z.B. mit dem lsess-Kommando. Das nimmt die Daten, die der cfgmgr in das File /var/adm/essmap.out geschrieben hat, generiert /var/adm/lsess.out, was dann ausgegeben wird. Welche Platten unterstuetzt ein System den als MPIO faehig? Mit dem Kommando odmget -q DvDr=aixdiskpcmke PdDv |more. ###################################### # check queue_depth for ESS, DS6k DS8k ###################################### # check for i in `lspv|grep -v rootvg |grep hdisk|awk '{print $1}'` do echo "Beginn $i" lsattr -El $i|grep "queue_depth"|awk '{print $2}' done # change to maximum of 256 for i in `lspv|grep -v rootvg |grep hdisk|awk '{print $1}'` do QUEUEDEPTH=`lsattr -El $i|grep "queue_depth"|awk '{print $2}'` echo "Change of $i from $QUEUEDEPTH to 256" # 20 = default if [ $QUEUEDEPTH = 20 ] then chdev -l $i -P -a queue_depth=256 # falls disk nicht in Benutzung dann naechste Zeile aktivieren #chdev -l $i -a queue_depth=256 fi done Boot erforderlich um die Parameter zu aktivieren ################################## # datei loeschen mit sonderzeichen ################################## Beispiel: Dateiname = -I oder --files-from Loesung: rm -- -I oder rm -- --files-from ##### # NIS ##### You can bind across a subnet with AIX, I won't vouch for the security. Here is how I've done it, all on the NIS client: 1. Set the domain name by entering the command: chypdom -B newdomainname For example: "chypdom -B ca" would set the domain to ca for California. 2. Enter "startsrc -s ypbind -a -ypsetme" to start the ypbind daemon. 3. Enter "ypset nismaster" where nismaster is the ip address of the NIS master server. This will cross the gateway and bind this slave server to the your NIS master server. (Use ypwhich to see where it is bound.) 4. Add these commands to a startup script if you want this to occur on reboot. ###################### # list vg major-number ###################### node1:/usr/sbin> lvlstmajor 20,37..79,82... ############################################ # list der vg-major number der einzelnen vgs ############################################ xarcp01#for i in `lsvg` > do > ls -al /dev/$i > done crw-rw---- 1 root system 46, 0 May 19 07:00 /dev/docpvg2 crw-rw---- 1 root system 10, 0 Mar 22 2002 /dev/rootvg crw-rw---- 1 root system 40, 0 Mar 22 2002 /dev/arcpvg crw-ow---- 1 root system 85, 0 Mar 19 09:08 /dev/docpvg for i in `lsvg -o |grep -v rootvg` do ls -al /dev/$i done crw-r----- 1 root system 55, 0 Sep 08 13:28 /dev/vpdb01VG crw-r----- 1 root system 54, 0 Sep 08 13:28 /dev/mdepot02VG crw-r----- 1 root system 53, 0 Sep 08 13:27 /dev/mnet01VG crw-r----- 1 root system 52, 0 Sep 08 13:26 /dev/mdepot01 ########################## # belegter platz im system ########################## summe=0 for i in `lsvg|grep -v rootvg` do wert=`lsvg $i|grep "TOTAL PPs:"|awk '{print $7}'|cut -f2 -d"("`; echo $wert let summe=$summe+$wert done echo "Summe aller VG=$summe" ############ # redefinevg ############ examine each disk in system and determine which voloume group it belongs to and updates the ODM redefinevg -d /dev/hdisk? -i VGID VGNAME ########### # synclvodm ########### syncs the LVCB and the VGDA on disks synclvodm -P -v myvg (-P preserves Ownership!) ######################################### # importvg importieren einer volume group ######################################### importvg -y'' hdiskx ##################### # create volume group ##################### mkvg -f -y'oracle01VG' -s'16' hdisk2 without automatic varyon: mkvg -f -y'bdmVG' -s'16' '-n' hdisk8 hdisk10 Major Number: mkvg -f -B -y'xyzVG' -s'16 -V 80 hdiskx mkvg4vp -f -B -s 256 -y vg_edsprd vpath8 ##################### # remove volume group ##################### reducevg -df aixinstall0VG hdisk2 but before aixinstall2:/#mkboot -c -d /dev/hdisk2 --> removes bootlv from disk aixinstall2:/#rmlv -f bootlv00 pagelv00 loglv00 fslv00 fslv01 fslv02 fslv03 fslv04 paging00 local01VG tftboot01LV export01LV 0516-1246 rmlv: If bootlv00 is the boot logical volume, please run 'chpv -c ' as root user to clear the boot record and avoid a potential boot off an old boot image that may reside on the disk from which this logical volume is moved/removed. rmlv: Logical volume bootlv00 is removed. rmlv: Logical volume pagelv00 is removed. rmlv: Logical volume loglv00 is removed. rmlv: Logical volume fslv00 is removed. rmlv: Logical volume fslv01 is removed. rmlv: Logical volume fslv02 is removed. rmlv: Logical volume fslv03 is removed. rmlv: Logical volume fslv04 is removed. rmlv: Logical volume paging00 is removed. rmlv: Logical volume local01VG is removed. rmlv: Logical volume tftboot01LV is removed. rmlv: Logical volume export01LV is removed. aixinstall2:/#chpv -c hdisk2 varyoffvg aixinstall0VG exportvg aixinstall0VG ####################################### # changing pv from missing to available ####################################### - correct problem, which causes missing state chpv -v a hdisk ############# # import a VG ############# importvg -y applicationVG hdisk? ############################### # syncvg stale partitions in vg ############################### syncing a vg syncvg -v rootvg syncing a disk replaced by another syncvg -p hdiskx Plattenausfall SSA / Drawer 0516-934 /etc/syncvg: Unable to synchronize logical volume oralv0314. cfgmgr -v # makes disk available varyonvg -n VGNAME # makes disk active in VGNAME synclvodm -P -v VGNAME syncvg -l stale_LV ####################### # mirror a volume group ####################### extendvg rootvg hdisk1 mirrorvg rootvg hdisk1 # exact mirror mirrorvg -m rootvg hdisk1 ############### # mirror rootvg ############### http://techsupport.services.ibm.com/server/aix.techTips?refNo=90605212214784 http://mpfrye.hopto.org/aix/mirror_rootvg.html ################# # unmirror rootvg ################# unmirrorvg -c kopies vg platte_die_geleert_werden_soll unmirrorvg -c 1 rootvg hdisk1 ########################### # paging space deaktivieren ########################### chps -a'n' paging00 ########################### # paging space vergroessern ########################### chps -s'48' hd6 ################################################# # How do I remove a non-existant physical volume? ################################################# Thanks to Johnny Shieh (shieh@austin.ibm.com) To delete a phantom disk from the ODM use reducevg with the pvid instead of the disk name. You are running some command such as lsvg or varyonvg and it is griping about a disk that is no longer findable right? In that warning message, it should give you a pvid. Try one of the following, (note: reducevg updates the VGDA but not the ODM). reducevg -f ldeletepv -g VGid -p PVid -g Required, specify the VGid of the volume group you are removing the physical volume from -p Required, specif # reducevg oracle01VG hdisk2 #################################### # volumegroup autovaryon ausschalten #################################### node1:/> lsvg mdbVG VOLUME GROUP: mdbVG VG IDENTIFIER: 000001307f545bdf VG STATE: active PP SIZE: 16 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 2144 (34304 megabytes) MAX LVs: 256 FREE PPs: 1243 (19888 megabytes) LVs: 4 USED PPs: 901 (14416 megabytes) OPEN LVs: 4 QUORUM: 5 TOTAL PVs: 8 VG DESCRIPTORS: 8 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 8 AUTO ON: yes MAX PPs per PV: 1016 MAX PVs: 32 node1:/> chvg -a n mdbVG node1:/> lsvg mdbVG VOLUME GROUP: mdbVG VG IDENTIFIER: 000001307f545bdf VG STATE: active PP SIZE: 16 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 2144 (34304 megabytes) MAX LVs: 256 FREE PPs: 1243 (19888 megabytes) LVs: 4 USED PPs: 901 (14416 megabytes) OPEN LVs: 4 QUORUM: 5 TOTAL PVs: 8 VG DESCRIPTORS: 8 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 8 AUTO ON: no MAX PPs per PV: 1016 MAX PVs: 32 ############################ # add physical volumes to vg ############################ # extendvg oracle01VG hdisk5 ###################### # reorg a volume group ###################### # reorgvg applicationVG applicationLV 0516-962 reorgvg: Logical volume applicationLV migrated. ################## # quorum abstellen ################## You can prevent of this if rootvg is setting without quorum: chvg -Qn chvg -Qn rootvg ############# # PP aller vg ############# lsvg -o|lsvg -i|grep 'TOTAL PPs' root@cws [~]# lsvg -o|lsvg -i|grep 'TOTAL PPs' VG PERMISSION: read/write TOTAL PPs: 127 (4064 megabytes) VG PERMISSION: read/write TOTAL PPs: 254 (8128 megabytes) VG PERMISSION: read/write TOTAL PPs: 537 (2148 megabytes) ############################ # mklv - make logical volume ############################ mklv -t raw -y # mklv -t jfs -y oltpLV applicationVG 19 hdiskx oltpLV oder # mklv -t jfs2 -y oltpLV applicationVG 19 hdiskx oltpLV -a position c = center m = outer middle e = outer edge ie = inner edge im = inner middle # mklv -a c -t jfs -y oltpLV applicationVG 19 hdiskx # striped non mirrored lv # mklv -y stripelv -S64k -u2 odmvg 2 # striped mirrored lv # mklv -y mirrorstripelv -S64K -u2 -c2 odmvg 2 # sudo mklv -y lv_oraadmin -S64K -u2 -c2 rootvg 40 hdisk0 hdisk1 hdisk78 hdisk80 #################################### # ueber mehrere platten stripe raid0 #################################### mklv -y'kutestLV' -t'jfs' -e'x' oracle01VG 1020 hdisk14 hdisk15 hdisk16 hdisk17 oder mklv -y'kutestLV' -t'jfs2' -e'x' oracle01VG 1020 hdisk14 hdisk15 hdisk16 hdisk17 oder sudo mklv -e x -y lv_kutest -t jfs2 vg_oracle01 395 vpath5 vpath6 vpath7 vpath8 vpath9 ############################ # extendlv - lv vergroessern ############################ extendlv kutestLV 30 ########################## # crfs - create filesystem ########################## smitty crjfsbf oder crfs -v jfs -d -m / -a bf=true -A yes | no # crfs -v jfs -d oltpLV -m /usr/app/OLTP -a bf=true -A yes Based on the parameters chosen, the new /usr/app/OLTP JFS file system is limited to a maximum size of 134217728 (512 byte blocks) New File System size is 622592 # mit INLINE log crfs -v jfs2 -d -m / -a logname=INLINE -A yes ################## # aix 4.3.3 limits ################## 0506-276 JFS file systems have the following size limitations: NBPI Minimum AG Size Fragment Size Maximum Size (GB) 512 8 512, 1024, 2048, 4096 8 1024 8 512, 1024, 2048, 4096 16 2048 8 512, 1024, 2048, 4096 32 4096 8 512, 1024, 2048, 4096 64 8192 8 512, 1024, 2048, 4096 128 16384 8 512, 1024, 2048, 4096 256 32768 16 1024, 2048, 4096 512 65536 32 2048, 4096 1024 131072 64 4096 1024 ################################## # agblksize fuer oracle cio option ################################## crfs -v jfs2 -d oralogdepot02LV -m /usr/app/oracle/oradata/vpdepot/oralog2 -a agblksize=512 -A yes ############################### # mklvcopy - spiegeln eines LVs ############################### Auf bestimmter platte einen Spiegel ablegen mklvcopy # mklvcopy oltpLV 2 hdisk13 Automatisch auf separate Disk spiegeln mklvcopy -s y direkt spiegeln # mklvcopy -k -s y Falls Spiegel sich nicht auf einer Platte anlegen laesst: # chlv -s'n' oracle01LV # exaktes spiegeln lslv -m $LVNAME |awk '{print $3":"$2}'>/tmp/kutest vi /tmp/kutest - ersetze hdisk_orig durch hdisk spiegel - wq mklvcopy -s y -m /tmp/kutest $LVNAME 2 ########################### # check lvmirror which disk ########################### # lslv -m oralv0300 oralv0300:N/A LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0110 hdisk23 0103 hdisk46 0002 0110 hdisk24 0103 hdisk31 0003 0110 hdisk25 0103 hdisk84 0004 0110 hdisk29 0103 hdisk32 0005 0110 hdisk33 0103 hdisk87 0006 0110 hdisk34 0103 hdisk35 0007 0110 hdisk68 0103 hdisk37 0008 0110 hdisk40 0103 hdisk39 0009 0110 hdisk43 0103 hdisk41 0010 0110 hdisk69 0103 hdisk42 0011 0111 hdisk20 0104 hdisk28 0012 0111 hdisk22 0104 hdisk36 0013 0111 hdisk3 0104 hdisk18 0014 0111 hdisk4 0104 hdisk11 0015 0111 hdisk5 0104 hdisk55 0016 0111 hdisk7 0104 hdisk70 0017 0111 hdisk8 0104 hdisk38 0018 0111 hdisk9 0104 hdisk82 0019 0111 hdisk10 0104 hdisk71 0020 0111 hdisk12 0104 hdisk78 0021 0111 hdisk14 0104 hdisk96 0022 0111 hdisk19 0104 hdisk60 0023 0111 hdisk23 0104 hdisk46 0024 0111 hdisk24 0104 hdisk31 0025 0111 hdisk25 0104 hdisk84 0026 0111 hdisk29 0104 hdisk32 0027 0111 hdisk33 0104 hdisk87 0028 0111 hdisk34 0104 hdisk35 0029 0111 hdisk68 0104 hdisk37 0030 0111 hdisk40 0104 hdisk39 0031 0111 hdisk43 0104 hdisk41 0032 0111 hdisk69 0104 hdisk42 ########################## # rmlvcopy loeschen lvcopy ########################## # rmlvcopy hd6 1 hdisk1 # lslv -l hd6 hd6:N/A PV COPIES IN BAND DISTRIBUTION hdisk0 032:000:000 100% 000:032:000:000:000 Wenn mehrere copys vorhanden z.B. 3 dann rmlvcopy hd6 2 hdisk1 Damit wird copy auf hdisk1 geloescht, jedoch alle anderen bleiben erhalten. Nicht vergessen anschliessend syncvg -v VG durchzufuehren! ################################################## # schauen welche platte mit welcher gespiegelt ist ################################################## # lslv -m adsmpool01LV adsmpool01LV:/adsm/pool/01 LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0056 hdisk2 0056 hdisk4 0002 0057 hdisk2 0057 hdisk4 0003 0058 hdisk2 0058 hdisk4 0004 0059 hdisk2 0059 hdisk4 0005 0060 hdisk2 0060 hdisk4 0006 0061 hdisk2 0061 hdisk4 0007 0062 hdisk2 0062 hdisk4 ################################ # copy lv from one vg to another ################################ cplv -y'' -v cplv -y'local02LV' -v'rootvg' local01LV cplv -y'application04LV' -v'application01VG' application02LV ############# # rename a lv ############# chlv -n'' chlv -n'local01LV' local02LV ######################## # extend volumes on a lv ######################## Can I change the MAX NUMBER of PP's allocated to a logical volume on the fly? For instance, I initially set this LV up with the default of 512 MAX PP's. This LV currently has 240 PP's allocated to it, and I need to add 312 PP's - which will take me over my 512 hard limit. chlv -x ################## # cplv existing lv ################## /usr/sbin/cplv -e DestinationLogicalVolume [ -f ] SourceLogicalVolume ######### # lvmstat ######### # finding hotspots # enable VGNAME= lvmstat -v $VGNAME -e # disable lvmstat -v $VGNAME -d # list statistics 4 seconds interval lvmstat -v $VGNAME 4 # stat of lv LVNAME= lvmstat -l $LVNAME 4 # monitor die 5 groessten io alle 4 sekunden lvmstat -l $LVNAME -c 5 4 #################################### # monitoring lv to find out hotspots #################################### LVNAME= MAXZAHL=10 ITERATION=100 INTERVAL=4 lvmstat -l $LVNAME -c 1 -s $INTERVAL $ITERATION >/tmp/lvmstat_$LVNAME.out head -2 /tmp/lvmstat_$LVNAME.out >/tmp/lvmstat_$LVNAME.out.1 # headlines cat /tmp/lvmstat_$LVNAME.out|grep -v "Log_part" >/tmp/lvmstat_$LVNAME.out.2 cat /tmp/lvmstat_$LVNAME.out.2|egrep "[.99]" > /tmp/lvmstat_$LVNAME.out.3 cat /tmp/lvmstat_$LVNAME.out.3|sort|awk '{print $1}'|uniq >/tmp/lvmstat_$LVNAME.out.4 # find out hot spot for i in `cat /tmp/lvmstat_$LVNAME.out.4` do ANZAHL_ZEILEN=`grep -cw $i /tmp/lvmstat_$LVNAME.out.3` if [ $ANZAHL_ZEILEN -gt $MAXZAHL ] then echo "$LVNAME LP $i should be moved - more than [$ANZAHL_ZEILEN] accesses during monitoring" fi done # find out highest io read echo "5 highest IO Read" cat /tmp/lvmstat_$LVNAME.out.1; cat /tmp/lvmstat_$LVNAME.out.3 |sort +3 -nr |head -5 # find out highest io write echo "5 highest IO Write" cat /tmp/lvmstat_$LVNAME.out.1; cat /tmp/lvmstat_$LVNAME.out.3 |sort +4 -nr |head -5 rm -f /tmp/lvmstat_$LVNAME.out* ######### # lspv -p ######### where is your lv located root@kerp-ebd001 /> lspv -p hdisk1 hdisk1: PP RANGE STATE REGION LV NAME TYPE MOUNT POINT 1-110 free outer edge 111-219 used outer middle fslv01 jfs2 /oradata01 220-328 used center fslv01 jfs2 /oradata01 329-437 used inner middle fslv01 jfs2 /oradata01 438-510 used inner edge fslv01 jfs2 /oradata01 511-546 free inner edge root@kerp-ebd001 /> lspv -p hdisk4 hdisk4: PP RANGE STATE REGION LV NAME TYPE MOUNT POINT 1-110 free outer edge 111-219 used outer middle fslv01 jfs2 /oradata01 220-328 used center fslv01 jfs2 /oradata01 329-437 used inner middle fslv01 jfs2 /oradata01 438-510 used inner edge fslv01 jfs2 /oradata01 511-546 free inner edge ################## # find file in lvm ################## 1. fileplace -p /etc/passwd File: /etc/passwd Size: 53603 bytes Vol: /dev/hd4 Blk Size: 4096 Frag Size: 4096 Nfrags: 14 Compress: no Physical Addresses (mirror copy 1) Logical Fragment ---------------------------------- ---------------- 11449289-11449292 hdisk0 4 frags 16384 Bytes, 28.6% 0111017-0111020 11449299-11449308 hdisk0 10 frags 40960 Bytes, 71.4% 0111027-0111036 2. frag size = 4k and starting frag is 0111017. 0111017*4/1024 = 433M. The file starts 433M into the filesystem. 3. Run lspv hdisk0 to get PP size. lspv hdisk0 PP SIZE: 128 megabyte(s) 4. lslv -m hd4 hd4:/ LP PP1 PV1 PP2 PV2 PP3 PV3 0001 0329 hdisk0 0329 hdisk1 0002 0330 hdisk0 0330 hdisk1 0003 0331 hdisk0 0331 hdisk1 0004 0350 hdisk0 0350 hdisk1 0005 0365 hdisk0 0365 hdisk1 0006 0366 hdisk0 0366 hdisk1 0007 0367 hdisk0 0367 hdisk1 0008 0368 hdisk0 0368 hdisk1 0009 0369 hdisk0 0369 hdisk1 0008 0368 hdisk0 0368 hdisk1 0009 0369 hdisk0 0369 hdisk1 This is a map of LPs to PPs. 433M into the file at 128M/PP means you are on the 4rd PP (0350) of the filesystem to get the file. That translates into LP4 in our example. (433/128 = 3.38 which is just past PP 3) ############## # lvmo command ############## # /> lvmo -v vg_oradata -a vgname = vg_oradata pv_pbuf_count = 512 total_vg_pbufs = 2048 max_vg_pbuf_count = 65536 pervg_blocked_io_count = 32 pv_min_pbuf = 512 global_blocked_io_count = 5986 # /> moni 'vmstat -v|grep "blocked with no"' # /> vmstat -v |grep buf 5986 pending disk I/Os blocked with no pbuf 1979981 paging space I/Os blocked with no psbuf 2740 filesystem I/Os blocked with no fsbuf 0 client filesystem I/Os blocked with no fsbuf 570433 external pager filesystem I/Os blocked with no fsbuf # /> lvmo -v vg_oradata -o pv_pbuf_count=1024 # /> lvmo -v vg_oradata -a vgname = vg_oradata pv_pbuf_count = 1024 total_vg_pbufs = 4096 max_vg_pbuf_count = 65536 pervg_blocked_io_count = 32 pv_min_pbuf = 512 global_blocked_io_count = 5986 # check vg settings for i in `lsvg`; do lvmo -a -v $i; done ########### # migratepv ########### Migration von LV's oder ganzen Platten! Beispiel: Umzug von 2 LV's von hdisk11 nach hdisk19 Voraussetzung: - Kein Prozess greift auf LV's zu - Platten, auf die migriert werden soll, sind in die VG aufgenommen worden # lspv -l hdisk11 hdisk11: LV NAME LPs PPs DISTRIBUTION MOUNT POINT loglv00 1 1 00..01..00..00..00 N/A application02LV 161 161 00..106..55..00..00 /usr/app/oracle # migratepv -l application02LV hdisk11 hdisk19 # migratepv -l loglv00 hdisk11 hdisk19 # lspv -l hdisk11 # lsvg -l application01VG application01VG: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv00 jfslog 1 2 2 closed/stale N/A application02LV jfs 161 322 2 closed/syncd /usr/app/oracle ########### # migratelp ########### # moving lp from one disk to another # To move the first logical partitions of logical volume lv00 to hdisk1, type: migratelp lv00/1 hdisk1 # To move second mirror copy of the third logical partitions of logicalvolume hd2 to hdisk5, type: migratelp hd2/3/2 hdisk5 # To move third mirror copy of the 25th logical partitions of logical volume testlv to 100th partition of hdisk7, type: migratelp testlv/25/3 hdisk7/100 # to move lp from one disk to another # aufpassen bei lp groesser 1000 --> BEREICH und oneliner anpassen QUELLDISK= ZIELDISK= BEREICH= # 01 oder 02 oder ... for i in `lslv -m $LVNAME|grep ${QUELLDISK}|grep "^${BEREICH}"|awk '{print $1}'|cut -c2-4` do echo "beginn lpp $i" nice -n 15 migratelp $LVNAME/${i} $ZIELDISK done ################################### # increase the size of a filesystem ################################### You can increase file system size too, by amount of additional space chfs -a size=+{[additional space in MB]*1024*2} /fs_name If "size" begins with a + it is interpreted as a rquest to increase the file system size by the specified amount ( in 512-bytes block ). [!]verleihnix:/usr/local/apachessl/template#chfs -a size=+1228800 /var/log/twister Filesystem size changed to 1835008 OR chfs -a size=$(( number_of_lps * PPSIZE * 2)) /filesystem_name OR mountpoint aendern chfs -m neu alt chfs -m /tmp/Orainstall /mnt/OraInstall ########### # shrink fs ########### ab AIX 5.3 - reduziert FSNAME um 1 GB chfs -a size=-1G /FSNAME ####################### # move fs to another vg ####################### 1) umount old_fs 2) cplv -v new_vg -y new_lv_name old_lv_name 3) rmlv old_lv_name 4) chlv -n new_lv_name old_lv_name 4a) falls neues lvlog erstellt wurde: mklv -t jfslog -y jfslog newvg 1 hdiskname logform /dev/lvlogname 5) chfs -a log=log_of_new_vg old_fs 6) fsck old_fs 7) mount old_fs step 6) will probably fail because it does not recognize the jfslog no problem, just mount && umount && fsck then just a note: cplv will not care about mirroring; you will have to mirror+sync manually or cplv -y -v sourcelogicalvolume chfs -a dev=/dev/ -a log= / mount / rmlv ######### # logform ######### mklv -t jfslog -y jfslog vg_oracle01 1 hdisk1 logform -V jfs /dev/jfslog mklv -t jfs2log -y jfs2log vg_oracle01 1 hdisk1 logform -V jfs2 /dev/jfs2log ######################## # errlog entry jfs2_full ######################## # calc hex to number REFERENCED Detail Data JFS2 MAJOR/MINOR DEVICE NUMBER 002B 000B The major/minor numbers (002B 000B) are in hex: hex abcd = a*16^3+b*16^2+c*16^1+d therefore hex 002B=0*16^3+0*16^2+2*16^1+11=2*16+11 000B=0*16^3+0*16^2+0*16^1+11=11 1=1 2=2 3=3 4=4 5=5 6=6 7=7 8=8 9=9 10=a 11=b 12=c 13=d 14=e 15=f 16=g 17=h 18=i # find fs ls -al /dev/* |grep 43|grep 11 # bc obase=2 90 1011010 obase=16 90 5A 1. 90 converted to bin format 1. 90 converted to hex format ######################## # size of jfs filesystem ######################## The maximum AIX file and filesystem size depends on the kernel type and AIX/JFS versions. Here are the maximum supported values. Maximum File/Filesystem Sizes in AIX 23-Jan-04 AIX 4.3 AIX 5.1 AIX 5.2 JFS JFS JFS JFS2 JFS JFS2 AIX Kernel 32/64 32/64 32 Bit 64 Bit 32/64 32 Bit 64 Bit Maximum Supported File Size 64 GB 64 GB 1 TB 1 TB 64 GB 1 TB 16 TB Filesystem Size 1 TB 1 TB 1 TB 1 TB 1 TB 1 TB 16 TB #################### # superblock failure #################### The backup superblock can be copied over the primary superblock via one of these commands: All versions: dd count=1 bs=4k skip=31 seek=1 if=/dev/lv00 of=/dev/lv00 For AIX 4.x only: fsck -p /dev/lv00 Once the copying over is completed, check the integrity of the file system by is suing: fsck /dev/lv00 ######################## # fsck check automatisch ######################## in /etc/filesystems check=TRUE bei filesystem eintragen ################################## # filesystem einstellungen ansehen ################################## # lsfs -q /usr/app Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/application02LV -- /usr/app jfs 1310720 rw no no (lv size: 1310720, fs size: 1310720, frag size: 4096, nbpi: 4096, compress: no, bf: true, ag: 64) ############## # mount groups mountgruppen ############## add "type = xyz" stanza in /etc/filesystems chfs -u '' chfs -u 'I03sapdata' /oracle/I03/sapdata17 mount -t xyz to mount filesystems umount -t xyz to umount filesystems but One additional note, I think that the groups needed to be added via smit and not just an editing of the /etc/filesystems file, so that they became a part of the VGDA ####### # lsjfs ####### # lsjfs /usr/local #MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct:OtherOptions:LvSize:FsSize:FragSize:Nbpi:Compress:Bf:AgSize: /usr/local:/dev/localLV:jfs:::1089536:rw:yes:no::1089536:1089536:4096:4096:no:true:8: # lsjfs2 #MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct:OtherOptions:LvSize:FsSize:BlockSize:Sparse:InlineLog:InlineLogSz: /usr/local:/dev/lvlocal01:jfs2:::1310720:rw:yes:no::1310720:1310720:4096:yes:yes:6144: /audit:/dev/lvaudit01:jfs2:::262144:rw:yes:no::262144:262144:4096:yes:yes:2048: /usr/sap/P03/extern:/dev/lvsappextern:jfs2::P03sapsw:60817408:rw:no:no::60817408:60817408:4096:yes:yes:65536: /oracle/P03/sapdata1:/dev/lvsapdatap01:jfs2::P03sapdata:70254592:rw:no:no::70254592:70254592:4096:yes:yes:65536: /oracle/P03/sapdata2:/dev/lvsapdatap02:jfs2::P03sapdata:70254592:rw:no:no::70254592:70254592:4096:yes:yes:65536: /oracle/P03/sapdata3:/dev/lvsapdatap03:jfs2::P03sapdata:70254592:rw:no:no::70254592:70254592:4096:yes:yes:65536: /oracle/P03/sapdata4:/dev/lvsapdatap04:jfs2::P03sapdata:70254592:rw:no:no::70254592:70254592:4096:yes:yes:65536: /oracle/P03/sapdata5:/dev/lvsapdatap05:jfs2::P03sapdata:70254592:rw:no:no::70254 ######################################## # find out which terminal type is on tty ######################################## ts5:/usr/local/lib !# /usr/sbin/lsattr -Eltty2 -a term term vt100 TERMINAL type True #################### # find out big files #################### find /home -xdev -ls 2>/dev/null| sort +6 -nr | head -20 ########################### # performancetest ueber ftp ########################### ftp> put "|dd if=/dev/zero bs=32k count=10000" /dev/null 200 PORT command successful. 150 Opening data connection for /dev/null. 10000+0 records in. 10000+0 records out. 226 Transfer complete. 327680000 bytes sent in 385.3 seconds (830.6 Kbytes/s) local: |dd if=/dev/zero bs=32k count=10000 remote: /dev/null oder ftp> put "|dd if=/dev/zero bs=1k count=1000000" /dev/null 200 PORT command successful. 150 Opening data connection for /dev/null. 1000000+0 records in. 1000000+0 records out. 226 Transfer complete. 1024000000 bytes sent in 49.25 seconds (2.031e+04 Kbytes/s) local: |dd if=/dev/zero bs=1k count=1000000 remote: /dev/null oder Allgemeiner perfomancecheck AIX http://techsupport.services.ibm.com/cgi-bin/support/rs6000.support/techbrowse/tbgaus?gaus_mode=8&documents=090605198014824&database=aix ############# # tape haengt ############# diag -cd /dev/rmt0 tctl -f /dev/rmt0 offline ########################## # blocksize festellen tape ########################## dd if=/dev/rmtxx bs=128k count=1 | wc -c oder tcopy /dev/rmtxx root@cws [~]#whichlpp tcopy lppname: bos.rte.archive location: /usr/bin/tcopy ########################### # trace a program under aix ########################### You probably want the -trace & -trcon -trcoff -trcrpt commands. More info in the manpages. #trace > !my_cmd > quit # trcrpt >/tmp/my_cmd.out #################### # showmount-commands #################### display exports of a machine # showmount -e colonia export list for colonia: /spdata/sys1/install/pssplpp (everyone) /spdata/sys1/install/images colon01,colon05,colon7,colon09,colon11,colon17,colon19 /spdata/sys1/install/aix433006/lppsource (everyone) /cdrom colon01,colon05,colon07,colon09,colon11,colon17,colon19 display mounted dirs on server # showmount -a host1.xyz.de:/usr/sap/trans host2.xyz.de:/usr/sap/trans host3.xyz.de:/usr/sap/trans host4.xyz.de:/usr/sap/trans ######## # cfgmgr ######## cfgmgr -i --> will install any required missing filesets (insert the AIX Cd in the drive) cfgmgr -vi . --> will install from actual dir ################# # RAN Adapter ran ################# config des adapters # smitty cxpasync # lsdev -C|grep cxp cxpa0 Available 04-01 IBM 128-Port Async (PCI) Adapter # lsdev -C|grep 04-01 cxpa0 Available 04-01 IBM 128-Port Async (PCI) Adapter sa2 Available 04-01-22 16-Port Enhanced RAN EIA-232 for 128-Port Adapter tty1 Available 04-01-22-00 Asynchronous Terminal Definition neues TTY in Terminalserver: # -->maschine-port -w = Port auf dem RAN-Adapter -p = TTY-Anschluss an dem der RAN konfiguriert ist (s.o.) # mkdev -c tty -t 'tty' -s 'rs232' -p 'sa2' -w '0' -a login='enable' # -->fastt-port # mkdev -c tty -t 'tty' -s 'rs232' -p 'sa2' -w '4' -a login='enable' -a speed='19200' Verzeichnen der tty to hostname-Map in /var/adm/ts/ran.list Aufruf durch /var/adm/ts/ran Monitor Async Adapters # smitty cxpasync ############## # kill signals ############## The file /usr/include/sys/signal.h has the signal info and some usage clues. You can get a full list of signal names by "kill -l": sp4:/ # kill -l 1) HUP 14) ALRM 27) MSG 40) bad trap 53) bad trap 2) INT 15) TERM 28) WINCH 41) bad trap 54) bad trap 3) QUIT 16) URG 29) PWR 42) bad trap 55) bad trap 4) ILL 17) STOP 30) USR1 43) bad trap 56) bad trap 5) TRAP 18) TSTP 31) USR2 44) bad trap 57) bad trap 6) ABRT 19) CONT 32) PROF 45) bad trap 58) bad trap 7) EMT 20) CHLD 33) DANGER 46) bad trap 59) bad trap 8) FPE 21) TTIN 34) VTALRM 47) bad trap 60) GRANT 9) KILL 22) TTOU 35) MIGRATE 48) bad trap 61) RETRACT 10) BUS 23) IO 36) PRE 49) bad trap 62) SOUND 11) SEGV 24) XCPU 37) bad trap 50) bad trap 63) SAK 12) SYS 25) XFSZ 38) bad trap 51) bad trap 13) PIPE 26) bad trap 39) bad trap 52) bad trap ########## # errclear ########## 1. To delete all entries from the error log, enter: errclear 0 2. To delete all entries in the error log classified as software errors, enter: errclear -d S 0 3. To clear all entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter: errclear -i /var/adm/ras/errlog.alternate 0 4. To clear all hardware entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter: errclear -i /var/adm/ras/errlog.alternate -d H 0 ################## # viewing bootlogs ################## alog -f /var/adm/ras/bootlog -o alog -t boot -o ############# # console log ############# alog -t console -o ################# # last reboot was ################# root@cws [~]# who -b . system boot 17 Jan 11:08 ##################################### # genkex shows used kernel extensions ##################################### aixinstall2:/#genkex Virtual Address Size File 11db7d0 35d0 /usr/lib/drivers/mceh 11d7640 4188 /usr/lib/drivers/bpf 4f87000 741c8 /usr/lib/drivers/nfs.ext 5009000 534 /unix 11d72e8 348 /usr/lib/drivers/nfs_kdes.ext 4f69000 518 /unix 11d70f8 1e8 /usr/lib/drivers/smt_loadpin 11d2600 4af0 /usr/lib/drivers/smt_load 4f5b000 518 /unix 11c4da0 d854 /etc/drivers/ptydd 4f40000 4d8 /unix 11c0720 465c /usr/lib/drivers/if_en 4d97000 4d4 /unix 4d98000 15d264 /usr/lib/drivers/netinet 4f03000 4d4 /unix 11adee0 12828 /etc/drivers/ldterm ############## # kernel procs ############## Kproc name Explanation swapper does priority calculations/aging of cpu usage - runs at fixed pri of 16. Wakes up once per second. wait (idle process) - runs at fixed pri of 127 One per CPU. Runs when no other thread needs to run. netm runs at fixed pri of 36 Used to free network memory back to the VMM - runs when highwater marks for mbufs/clusters are reached. gil "Global ISR List" ISR->Interrupt Service Routines - multithreaded kproc runs at fixed pri of 37 Used to process various timers (tcp, streams, ....) and also used to pass packets from demux layer to IP layer for non-CDLI drivers. lvmb/lvmbb (disk/lvm) - runs at floating pri of 60 Used to get bad block structures - used in bad block relocations. jfsc (filesystem compression) - decompresses/compresses JFS data on compressed filesystems. Runs at fixed priority of 30. rtcm/rtcmd (RPC transport connection manager) - used by NFS kernel extension. Runs at floating priority of 60. kbio/kbiod (nfs biod thread) - runs at floating priority of 60. Works just like a biod process. lrud least recently used daemon Only on SMP systems. Does VMM page replacement when number of free frames reaches 'minfree'. Runs at fixed pri of 16. aio/aioserver Asynchronous I/O servers. Used to take AIO requests from a queue and send it to the device. Used mainly with JFS files, but could be used for LVM or VSD if fastpath is disabled. Runs at fixed priority of 39. PM Power Management kproc. Used to monitor and wake up devices that have been hibernated. Runs at floating pri of 60. ############ # smtctl smt ############ /usr/sbin/smtctl (shows SMT on or off) ##################### # bosdebug ausstellen ##################### # bosdebug -o Memory debugger off Memory sizes 0 Network memory sizes 0 Kernel debugger off Real Time Kernel off # bosboot -ad /dev/ipldevice bosboot: Boot image is 8205 512 byte blocks. ##################### # bosdebug einstellen ##################### # bosdebug -M Memory debugger on Memory sizes 0 Network memory sizes 0 Kernel debugger off Real Time Kernel off # bosboot -ad /dev/ipldevice bosboot: Boot image is 8205 512 byte blocks. ############ # ipl_varyon ############ ipl_varyon -i hdisk0 root@xcws01 /tftpboot> ipl_varyon -i hdisk0 PVNAME BOOT DEVICE PVID VOLUME GROUP ID hdisk0 YES 00423471584e7264 0090392912a5103f hdisk1 YES 00903929121ba344 0090392912a5103f hdisk2 NO 0020195528875d41 0090392912a5103f hdisk3 NO 002019552887591a 0090392912a5103f hdisk4 NO 009039292057621a 00903929ac9d54cc hdisk5 NO 00903929a9feef97 00903929ac9d54cc hdisk6 NO 009039299b4ca747 00903929a9b2345a hdisk17 NO 000762714f520335 00903929134829fb hdisk18 NO 000762714f52324a 00903929134829fb hdisk117 NO 000987fc47972c82 00903929134829fb hdisk118 NO 000987fc47969f77 00903929134829fb ############################## # change * to ! in /etc/passwd ############################## What are you needing to do this for? Has 'bob' been deactivated and now needs to be reactivated? If so, and there's already an entry in /etc/security/passwd for bob with his old password, you can use the pwdadm -c bob command. This will flip the star to a bang in /etc/passwd, place a star on the password line (meaning no password) in /etc/security/passwd (creating the entry if it's not already there). If you want bob to change the password, execute pwdadm -f ADMCHG. To query the last update string, pwdadm -q bob. To set a new password, pwdadm bob. ############################## # creating new random password ############################## < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c8 ############################## # increment with leading zeros ############################## I want to increment a count which is a six digit number, with leading zeros. typeset -Z6 i=0001 (( i += 1 )) echo $i gives 000002 or !/bin/ksh integer i i=0 while [ $i != 10000 ] do printf "%06d\n" $i i=i+1 done ############################ # kill all process of a user ############################ The most effective way would be to write a script which would include the following logic: 1.) su - bill 2.) killall 3.) exit kill -9 `ps -uBill -opid=` ###################### # mail with attachment ###################### cat $FILE | uuencode $FILE | mail -s $SUBJ $RCPT ######################################## # Cleanup and reset the spooler system : ######################################## # stopsrc -cg spooler (will stop the spooler daemons) # rm /etc/qconfig.bin (will remove the compiled version of the /etc/qconfig file) # rm /var/spool/lpd/qdir/* (will remove all queued jobs) # rm /var/spool/lpd/stat/* (will remove all queues and devices status files) # rm /var/spool/lpd/pio/@local/msg* # rm /var/spool/qdaemon/* # rm /var/spool/lpd/* # ps -ef | grep pio (then kill all processes start with pio) # ps -ef | grep qd (then kill all processes start with qd) # ps -ef | grep srcmstr (if there is more than one occurrence for "srcmstr" kill the ones with the higher PIDs) # startsrc -g spooler ######## # rmssys ######## loescht service aus src (system resource controller) ######## # mkssys ######## erstellt service in src (system resource controller) # aus tsm-scheduler einen dienst machen mkssys -s dsmc -G tsm -u 0 -p /usr/tivoli/tsm/client/ba/bin/dsmc -a schedule -o /dev/console \ -e /var/adm/ras/dsmerror.log -R -Q -S n1 -f 9 -E 38 -w 10 ########################################## # configuring look auf login prompt in AIX ########################################## As was already stated, to change the pre-login message, you must modify the "herald" stanza in /etc/security/login.cfg In /etc/security/login.cfg, change the "herald" line as follows... herald = "^[[2Jlogin: " where the first "^[" is one character (the ESC character) created by pressing CTRL-V followed by CTRL-[ This escape sequence (^[[2J) will clear the screen leaving the cursor where it's at so all the user will see is: login: If you want the login at the bottom of the screen, follow the escape sequence with a bunch of newlines: herald = " ^[[2Jlogin\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlogin:" herald = "\nlogin:" The number of newlines is up to you. If you want NO prompt, use just the escape sequence: herald = "^[[2J" chsec -f /etc/security/login.cfg -s default -a herald=" Notice to Users\r\n\r\nUse of this machine waives all rights to your privacy,\r\n\r and is consent to be monitored.\r\n\rUnauthorized use prohibited,\r\n\r\n\r\nlogin: " ################################# # tcpdump - snoop von Netzpaketen ################################# tcpdump -I -i en0 -I = ohne Pufferung direkte Ausgabe -i = Interface (en0, en1, enx) -x = hexprint -v = verbosity expr kann folgendes sein: host Hostname oder IP die gesnoopt werden soll (host aixinstall0) port Portname der gesnoopt werden soll (port 80) dst port portname destination src port portname source net pakete eines netzwerks # tcpdump from a specific host /usr/sbin/tcpdump -I -vvv -w /tmp/tcpdump.out -i en0 host xxx.xxx.xxx.xxx ############################# # herausfinden, ob Port aktiv ############################# nur bei p640 und hoeher netstat -v ent0 |grep RJ45 aixinstall1:/etc/postfix#netstat -v ent0 |grep RJ45 RJ45 Port Link Status : up ########################## # MAC-Adresse herausfinden ########################## netstat -v ent0|grep ardware; netstat -v|grep ETHER kurzschlus:/export/conf#netstat -v|grep ardware;netstat -v|grep ETHER Hardware Address: 08:00:5a:f8:b9:19 Hardware Address: 00:04:ac:de:95:e8 ETHERNET STATISTICS (ent0) : ETHERNET STATISTICS (ent1) : atm-karte MAC-Adresse ermitteln: lscfg -vl atm0 -v ##################### # atmle lan-emulation ##################### smitty atmle_panel ###################### # status atm-interface ###################### entstat -d atm0 The driver flags are particularly informative: - Up The LE client has been opened. - Running The LE client is connected with the LAN Emulation Servers and is operational. - Limbo Network recovery mode. The LE client lost contact with one or more LAN Emulation Servers. - Dead A hard failure has occurred. The LE client is no longer operational. atmstat -d atm0 ##################### # troubleshooting atm ##################### atmstat -d atm0 | grep Virtual Connections Virtual Connections in use: 10 Max Virtual Connections in use: 64 Virtual Connections Overflow: 0 lsattr -El atm0 -a min_vc min_vc 32 Minimum Guaranteed VCs Supported True erhoehen von min_vc chdev -l atm0 -a min_vc=64 # MCA-Adapter atmstat -d atm0 | grep overflow Small Mbuf overflow: 0 Medium Mbuf overflow: 0 Large Mbuf overflow: 0 Huge Mbuf overflow: 0 MTB Mbuf overflow: 0 falls overflow check: lsattr -El atm0 -a max_lrg_bufs max_lrg_bufs 400 Maximum Large ATM mbufs True We want to increase this value by 10 percent; so, we run the following command: chdev -l atm0 -a max_lrg_bufs=440 atmstat -d atm0 | grep "No " The output for our atm0 is as follows: No mbuf Errors: 0 Packets Dropped - No small DMA buffer: 0 Packets Dropped - No medium DMA buffer: 0 Packets Dropped - No large DMA buffer: 0 Receive Aborted - No Adapter Receive Buffer: 0 Transmit Attempted - No small DMA buffer: 0 Transmit Attempted - No medium DMA buffer: 0 Transmit Attempted - No large DMA buffer: 0 Transmit Attempted - No MTB DMA buffer: 0 Transmit Attempted - No Adapter Transmit Buffer: 0 lsattr -El atm0 -a med_highwater med_highwater 30 Minimum Medium ATM mbufs True aenderung +10% chdev -l atm0 -a med_highwater=33 ############# # mpoa-client ############# mpcstat -a ############## # core anaylse ############## kopiere core-file und programm welches den core verursacht in ein tmp-dir. anschliessend: dbx core where ############################################## # find out name list from stripped executables ############################################## stripnm #################################### # pruefen welche route pakete nehmen #################################### kurzschlus:/home/kutz>ping -R aixinstall1 PING aixinstall1: (172.28.255.11): 56 data bytes 64 bytes from 172.28.255.11: icmp_seq=0 ttl=255 time=1 ms RR: aixinstall1 (172.28.255.11) aixinstall0 (172.28.255.10) 64 bytes from 172.28.255.11: icmp_seq=1 ttl=255 time=0 ms (same route) 64 bytes from 172.28.255.11: icmp_seq=2 ttl=255 time=0 ms (same route) 64 bytes from 172.28.255.11: icmp_seq=3 ttl=255 time=0 ms (same route) 64 bytes from 172.28.255.11: icmp_seq=4 ttl=255 time=0 ms (same route) ^C ----aixinstall1 PING Statistics---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0/0/1 ms ################# # hostnew command ################# kurzschlus:/home/kutz>hostnew -a www Trying domain "intern.rzag.net" rcode = 3 (Non-existent domain), ancount=0 Trying domain "rzag.net" rcode = 0 (Success), ancount=1 www.rzag.net is www.yline-esolutions.de rcode = 0 (Success), ancount=1 www.yline-esolutions.de is 193.168.131.119 ################################# # verzeichnisse nfs reexportieren ################################# exportfs -a ################################### # nfs-mount in der /etc/filesystems ################################### Hardmount: /usr/sbin/mknfsmnt -f '/usr/app/twister' -d '/vol/vol0/unix/appl/twister' -h 'filer2-ext.prod.primus-online.de' '-n' '-B' '-A' -t 'rw' -w 'bg' '-Y' '-Z' '-X' '-H' '-j' '-q' '-g' Softmount: /usr/sbin/mknfsmnt -f '/usr/app/twister' -d '/vol/vol0/unix/appl/twister' -h 'filer2-ext.prod.primus-online.de' '-n' '-B' '-A' -t 'rw' -w 'bg' '-Y' '-Z' '-X' '-S' '-j' '-q' '-g' oder direkt eintragen in /etc/filesystems /usr/local/apachessl: dev = "/vol/vol0/unix/appl/apachessl-neu" vfs = nfs nodename = filer2-ext.prod.primus-online.de mount = true options = bg,soft,intr,rsize=8192,wsize=8192 account = false Wichtig Soft-Mount !!! ########################## # nfs-mount richtung filer ########################## mount -v'nfs3' -n'filer2.intern.rzag.net' -o rsize=8192 -o wsize=8192 -o soft -o bg -o proto=udp -o intr -o rw -o vers=3 /vol/vol0/unix/installserver /install_packages BACKUPNODE= VZ=/export mount -o bg,intr,proto=udp,vers=3 ${BACKUPNODE}:${VZ} /mnt VZ=/export/customize VZ=/export/fixes VZ=/export/lpp_source mount -o bg,intr,proto=udp,vers=3 ${BACKUPNODE}:${VZ} /mnt ############################## # nfs-mount optionen unter aix ############################## # nfso -a|grep use nfs_use_reserved_ports= 1 Falls nicht gesetzt, setzen # nfso -o nfs_use_reserved_ports=1 Anschliessend: stopsrc -s lockd;stopsrc -s statd ;startsrc -s statd;startsrc -s lockd ########## # chnfsmnt ########## chnfsmnt -f /import/filer2/appl/extern -d /vol/vol0/unix/appl/dmz -h filer2.intern.rzag.net -b 8192 -c 8192 chnfsmnt -f /import/filer2/appl/intern -d /vol/vol0/unix/appl/intern -h filer2.intern.rzag.net -b 8192 -c 8192 ############## # nfs-probleme ############## /etc/hosts gepflegt? Dienste gestartet? Funkt showmount -e Servername ? ################### # top CPU processes ################### kurzschlus:/#ps aux|tail +2 |sort -k 1.15,1.19nr root 516 98.6 2.0 264 6168 - A Jul 11 4941:12 kproc kutz 16458 0.5 0.0 544 380 pts/0 A Jul 13 10:27 topas root 1032 0.1 2.0 64 5960 - A Jul 11 3:59 kproc root 5676 0.1 1.0 3768 3080 - A Jul 11 3:18 /usr/local/bin/pe root 15936 0.1 0.0 212 20 - A Jul 12 5:13 /usr/sbin/nfsd 8 kutz 15758 0.0 0.0 924 680 pts/0 A Jul 12 0:00 -bash kutz 17056 0.0 0.0 928 1052 pts/1 A 21:45:43 0:00 -bash kutz 20572 0.0 0.0 924 552 pts/3 A Jul 12 0:00 -bash nobody 13736 0.0 0.0 660 280 - A Jul 11 0:51 /usr/sbin/tftpd - ################### # processes by user ################### kurzschlus:/#ps -u kutz UID PID TTY TIME CMD 211 15758 pts/0 0:00 bash 211 16458 pts/0 10:27 topas 211 17056 pts/1 0:00 bash 211 20572 pts/3 0:00 bash ############################################ # processes whith paging activity and status ############################################ kurzschlus:/#ps vg PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND 0 - A 1:21 7 12 5916 xx 0 5904 0.0 2.0 swapper 1 - A 0:07 128 708 260 xx 25 36 0.0 0.0 /etc/init 516 - A 4943:43 0 264 6168 xx 0 5904 98.6 2.0 kproc 774 - A 0:04 18 16 5920 xx 0 5904 0.0 2.0 kproc 1032 - A 3:59 0 64 5960 xx 0 5904 0.1 2.0 kproc 1822 - A 0:00 0 16 5912 xx 0 5904 0.0 2.0 kproc 2212 - A 0:00 9 672 32 xx 55 0 0.0 0.0 /usr/lib/ 2648 - A 0:00 0 16 5912 xx 0 5904 0.0 2.0 kproc 2872 - A 1:17 1064 156 36 xx 2 4 0.0 0.0 /usr/sbin 3224 pts/2 A 0:00 1 356 544 xx 201 208 0.0 0.0 -ksh 3386 - A 0:00 75 348 152 xx 37 0 0.0 0.0 /usr/sbin ####################################################### # problem determination - find out which device is down ####################################################### > A PROBLEM WAS DETECTED ON Thu Dec 14 04:00:47 WET > 2000 801014 > The Service Request Number(s)/Probable Cause(s) > (causes are listed in descending order of probability): > 29A00003:Refer to the Error Code to FRU Index in the system service > guide. > FRU: 11K0459 P1/K1 Do $ lscfg -vp | grep -p 11K0459 to see which device incurred the error. ####################### # iostat plattenzugriff ####################### $ iostat -d|sort -k 5nr hdisk5 11.8 150.4 34.4 781858272 8234386 hdisk9 12.5 135.3 30.5 681328109 29598747 hdisk4 7.8 117.9 27.9 610924112 8234386 hdisk8 8.4 115.1 25.4 597785921 6731777 hdisk10 9.3 110.7 25.7 551921805 29598747 hdisk2 7.3 96.4 16.2 475991898 30308499 hdisk7 4.6 82.1 19.0 424640473 6731777 hdisk13 3.6 50.5 11.4 235201105 30308499 hdisk14 4.6 45.8 8.5 172167032 68184540 hdisk6 3.0 40.2 7.3 170913201 40027245 hdisk11 3.2 34.7 3.6 51766705 130306707 hdisk15 3.3 22.5 4.7 50001400 68184540 hdisk3 1.0 17.0 2.5 49319945 40027245 hdisk0 1.0 12.4 1.1 41448749 23901193 hdisk12 3.1 25.9 3.4 5702505 130306707 hdisk17 0.1 1.0 0.1 5035731 273433 hdisk16 0.1 1.1 0.1 4755436 1250709 hdisk1 0.9 4.6 1.0 40145 23901193 Disks: % tm_act Kbps tps Kb_read Kb_wrtn $ iostat -d|sort -k 6nr hdisk11 3.2 34.7 3.6 51774073 130308904 hdisk12 3.1 25.9 3.4 5702509 130308904 hdisk14 4.6 45.7 8.5 172167049 68184542 hdisk15 3.3 22.5 4.7 50001409 68184542 hdisk3 1.0 17.0 2.5 49319955 40027364 hdisk6 3.0 40.2 7.3 170913227 40027364 hdisk13 3.6 50.5 11.4 235213251 30308523 hdisk2 7.3 96.4 16.2 476024128 30308523 hdisk10 9.3 110.7 25.7 551940163 29598750 hdisk9 12.5 135.3 30.5 681346479 29598750 hdisk0 1.0 12.4 1.1 41456117 23904238 hdisk1 0.9 4.6 1.0 40149 23904238 hdisk4 7.8 117.9 27.9 610937285 8234414 hdisk5 11.8 150.4 34.4 781872138 8234414 hdisk7 4.6 82.1 19.0 424647686 6731814 hdisk8 8.4 115.1 25.4 597793263 6731814 hdisk16 0.1 1.1 0.1 4755445 1250716 hdisk17 0.1 1.0 0.1 5035748 273440 Disks: % tm_act Kbps tps Kb_read Kb_wrtn iostat -ts - shows overall system statistics iostat -ta - shows adapter statistics iostat -tm - shows MPIO device path statistics # use filemon.pl script for monitoring IO filemon -T 320000 -o /tmp/filemon.out; sleep 20; trcstop filemon.pl /tmp/filemon.out iostat 5 10 | /usr/local/bin/analyse_iostat ###### # sort ###### # cat kutest prod10vg prod11vg prod12vg prod1vg prod2vg prod3vg prod4vg prod5vg prod6vg prod7vg prod8vg prod9vg # cat kutest |sort -n -k 1.5 prod1vg prod2vg prod3vg prod4vg prod5vg prod6vg prod7vg prod8vg prod9vg prod10vg prod11vg prod12vg ##################### # /dev/null erstellen ##################### mknod /dev/null c 2 2 ################# # ssaraid pruefen ################# # ssaraid -I -l ssa0|grep fastwrite|uniq ssaraid: No RAID manager found for ssa0 ############################################# # ssaxlate zeige hdisk zu pdisk und umgekehrt ############################################# # for i in `lspv|grep -v hdisk0 |grep -vw hdisk1|awk '{print $1}'`; do echo "$i ist" `ssaxlate -l $i`; done ssaxlate: Illegal device specified hdisk0 ist ssaxlate: Illegal device specified hdisk1 ist hdisk2 ist pdisk0 hdisk3 ist pdisk1 hdisk4 ist pdisk2 hdisk5 ist pdisk3 hdisk6 ist pdisk4 hdisk7 ist pdisk5 hdisk8 ist pdisk6 hdisk9 ist pdisk7 hdisk10 ist pdisk8 hdisk11 ist pdisk9 hdisk12 ist pdisk10 hdisk13 ist pdisk11 hdisk14 ist pdisk12 hdisk15 ist pdisk13 hdisk16 ist pdisk14 hdisk17 ist pdisk15 ################################## # summe der kapazitaet der platten ################################## VAR1=0 VAR2=0 for i in `lspv|grep None|awk '{print $1}'` do VAR1=`bootinfo -s $i` let VAR2="$VAR1+$VAR2" done echo $VAR2 ######## # lsconf ######## ML08 Voraussetzung # lsconf System Model: IBM,9076-WCN Processor Type: PowerPC_604 Number Of Processors: 4 Memory Size: 3064MB Good Memory Size: 3064MB Firmware Version: IBM,L00278 Console Login: enable Auto Restart: false Full Core: false /usr/sbin/lsconf: set: unknown option: A Network Information Host Name: IP Address: Sub Netmask: Gateway: Name Server: Domain Name: Paging Space Information Total Paging Space: 2560MB Percent Used: 1% Volume Groups Information ============================================================================== rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 268 32 00..32..00..00..00 hdisk1 active 268 104 00..32..32..00..40 ============================================================================== oracle01VG: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk2 active 542 73 08..00..00..00..65 hdisk6 active 542 0 00..00..00..00..00 hdisk13 active 542 73 08..00..00..00..65 hdisk3 active 542 0 00..00..00..00..00 hdisk9 active 542 37 00..00..00..25..12 hdisk10 active 542 37 00..00..00..25..12 hdisk8 active 542 8 00..00..00..00..08 hdisk7 active 542 8 00..00..00..00..08 hdisk5 active 542 40 20..00..00..00..20 hdisk4 active 542 40 20..00..00..00..20 hdisk14 active 542 1 00..00..00..00..01 hdisk15 active 542 1 00..00..00..00..01 hdisk16 active 542 158 109..00..00..00..49 hdisk17 active 542 158 109..00..00..00..49 ============================================================================== application01VG: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk11 active 542 158 34..00..00..15..109 hdisk12 active 542 130 18..00..00..03..109 ============================================================================== INSTALLED RESOURCE LIST The following resources are installed on the machine. +/- = Added or deleted from Resource List. * = Diagnostic support not available. Model Architecture: chrp Model Implementation: Multiple Processor, PCI bus + sys0 00-00 System Object + sysplanar0 00-00 System Planar + mem0 00-00 Memory + proc0 00-00 Processor + L2cache0 00-00 L2 Cache * pmc0 00-00 Power Management Controller + proc1 00-01 Processor + proc2 00-02 Processor + proc3 00-03 Processor + css0 00-f1000000 SP Switch Communications Adapter (Check MX Type) * pci1 00-fed00000 PCI Bus + ent1 20-58 IBM 10/100 Mbps Ethernet PCI Adapter (23100020) + atm0 20-70 IBM PCI 155 Mbps ATM Adapter (14107c00) * pci2 20-78 PCI Bus * pci0 00-fef00000 PCI Bus * isa0 10-58 ISA Bus + fda0 01-D1 Standard I/O Diskette Adapter * siokma0 01-K1 Keyboard/Mouse Adapter + sioka0 01-K1-00 Keyboard Adapter + sioma0 01-K1-01 Mouse Adapter + sa0 01-S1 Standard I/O Serial Port + tty0 01-S1-00-00 Asynchronous Terminal + sa1 01-S2 Standard I/O Serial Port + scsi0 10-60 Wide SCSI I/O Controller + hdisk0 10-60-00-0,0 16 Bit SCSI Disk Drive (4500 MB) + hdisk1 10-60-00-1,0 16 Bit SCSI Disk Drive (4500 MB) + ssa1 10-68 IBM SSA Enhanced RAID Adapter (14104500) + ssa0 10-70 IBM SSA Enhanced RAID Adapter (14104500) + ent0 10-80 IBM PCI Ethernet Adapter (22100020) * hdisk2 10-70-L SSA Logical Disk Drive * hdisk3 10-70-L SSA Logical Disk Drive * hdisk4 10-70-L SSA Logical Disk Drive * hdisk5 10-70-L SSA Logical Disk Drive * hdisk6 10-70-L SSA Logical Disk Drive * hdisk7 10-70-L SSA Logical Disk Drive * hdisk8 10-70-L SSA Logical Disk Drive * hdisk9 10-70-L SSA Logical Disk Drive * hdisk10 10-70-L SSA Logical Disk Drive * hdisk11 10-70-L SSA Logical Disk Drive * hdisk12 10-70-L SSA Logical Disk Drive * hdisk13 10-70-L SSA Logical Disk Drive * hdisk14 10-70-L SSA Logical Disk Drive * hdisk15 10-70-L SSA Logical Disk Drive * hdisk16 10-70-L SSA Logical Disk Drive * hdisk17 10-70-L SSA Logical Disk Drive + pdisk0 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk1 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk2 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk3 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk4 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk5 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk6 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk7 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk8 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk9 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk10 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk11 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk12 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk13 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk14 10-70-P 9.1GB SSA C Physical Disk Drive + pdisk15 10-70-P 9.1GB SSA C Physical Disk Drive ################ # list pci-slots ################ Only in hotplugable-Machines! $ lsslot -c pci # Slot Description Device(s) U0.1-P1-I1 PCI 64 bit, 66MHz, 3.3 volt slot ssa0 U0.1-P1-I2 PCI 64 bit, 66MHz, 3.3 volt slot ent0 U0.1-P1-I3 PCI 64 bit, 66MHz, 3.3 volt slot Empty U0.1-P1-I4 PCI 64 bit, 66MHz, 3.3 volt slot Empty U0.1-P1-I5 PCI 64 bit, 66MHz, 3.3 volt slot ssa1 U0.1-P1-I6 PCI 32 bit, 33MHz, 5 volt slot Empty U0.1-P1-I7 PCI 32 bit, 33MHz, 5 volt slot Empty U0.1-P1-I8 PCI 64 bit, 66MHz, 3.3 volt slot Empty U0.1-P1-I9 PCI 64 bit, 66MHz, 3.3 volt slot Empty U0.1-P1-I10 PCI 64 bit, 66MHz, 3.3 volt slot ent1 U0.1-P1-I11 PCI 32 bit, 33MHz, 5 volt slot Empty U0.1-P1-I12 PCI 32 bit, 33MHz, 5 volt slot Empty U0.1-P1-I13 PCI 64 bit, 66MHz, 3.3 volt slot Empty U0.1-P1-I14 PCI 64 bit, 66MHz, 3.3 volt slot Empty ################### # Microcode lsmcode ################### vor ML08 lscfg -vp | grep -i alter nach ML08 lsmcode -A DISPLAY MICROCODE LEVEL 802811 IBM,9076-WCN System Firmware level is L00278 Service Processor level is wc000901 Use Enter to continue. lscfg -vp |grep ROM # AIX 5.3 TL 7 lsmcode -A sys0!system:EM340_041 (t) EM340_041 (p) EM340_041 (t) sissas0!53495320.02200070 ent2!14104003.EP0170 ent3!14104003.EP0170 ent4!14104003.EP0170 ent5!14104003.EP0170 fcs0!df1000fe-0002.271102 fcs1!df1000fe-0002.271102 fcs2!df1000fe-0002.271102 fcs3!df1000fe-0002.271102 hdisk0!HUS1530.A1700D13.41343234 hdisk1!HUS1530.A1700D13.41343234 ses1!A170027B.0021 ses2!A170027B.0021 cd0!IBM-DROM0020581.DA33 ########################################### # Gelbes Front LED auf p640 normal schalten ########################################### /usr/lpp/diagnostics/bin/usysfault -s normal oder diag Task Selection Menue Log Repair Action ###### # diag ###### certify media diag -c -d deviceName -T "certify" diag -c -d hdisk0 -T "certify" display microcode of device diag -c -d device -T "disp_mcode" device could be sys0, hdisk0,... # temperatur 1. Display a list of the environmental sensors: /usr/lpp/diagnostics/bin/uesensor -l Sensor = Fan Speed Status = Normal Value = 2436 RPM Location Code = F1 Sensor = Power Supply Status = Normal Value = Present and operational Location Code = V1 Sensor = Power Supply Status = Critical low Value = Present and not operational Location Code = V2 2. Display a list of the environmental sensors in a numerical list: /usr/lpp/diagnostics/bin/uesensor -a 3 0 11 87 P1 9001 0 11 2345 F1 9004 0 11 2 V1 9004 1 9 2 V2 ######### # diagrpt ######### /usr/lpp/diagnostics/bin/diagrpt -o Displays the last diagnostic results file stored in the /etc/lpp/diagnostics/data directory. -s mmddyy Displays all diagnostic result files logged since the date specified. -a Displays the long version of the Diagnostic Event Log. -r Displays the short version of the Diagnostic Event Log. ################ # showled befehl ################ /usr/lib/methods/showled ID /usr/lib/methods/showled --> resetted anzeige ############### # PS? als datum ############### tgdvkho1@tvgicsc1 404# typeset -RZ2 _x1 _x2 _x3 tgdvkho1@tvgicsc1 405# let SECONDS=$(date '+3600*%H+60*%M+%S') tgdvkho1@tvgicsc1 406# _s='(_x1=(SECONDS/3600)%24)==(_x2=(SECONDS/60)%60)==(_x3=SECONDS%60)' tgdvkho1@tvgicsc1 407# TIME='"${_d[_s]}$_x1:$_x2:$_x3"' tgdvkho1@tvgicsc1 408# export PS1=${TIME} 19:11:56 ####### # xargs ####### Instead of : /usr/bin/file * Use : ls | /usr/bin/xargs /usr/bin/file ls . | xargs -i -t cp ./{} /export/lpp_source/lpp5300/RPMS/ppc ############################## # errpt - errorreporter update ############################## Vermeidung Eintrage im Errorreporter AIX: # cat kutest =DADF69E4: Report = False Log = True 0 entries added. 0 entries deleted. 1 entries updated. # errupdate kutest # cat umstellung_errorreporter_tape_clean.txt =D1A1AE6F: Report = False Log = False =E507DCF9: Report = False Log = False # errupdate umstellung_errorreporter_tape_clean.txt ################################ # Testen, ob errlog funktioniert ################################ errlogger test errpt |more --> Pruefen ob neuer Eintrag generiert wurde ############################### # print out all possible errors ############################### errpt -t ################################## # recreating errlog if errpt fails ################################## For future convience reasons with this procedure it would be a good idea to add the following line to your "/.profile" file. export PATH=$PATH:/usr/lib/ The default AIX errpt, log file is located in: "/var/adm/ras/errlog" to confirm this enter the following command: # /usr/lib/errdemon -l Error Log Attributes -------------------------------------------- Log File /var/adm/ras/errlog Log Size 1048576 bytes Memory Buffer Size 8192 bytes To change the AIX errpt log name, type in the following: # /usr/lib/errdemon -i /tmp/newlogfile # Now verify your changes by once again typing in: # /usr/lib/errdemon -l Error Log Attributes -------------------------------------------- Log File /tmp/newlogfile Log Size 1048576 bytes Memory Buffer Size 8192 bytes To stop the AIX errpt daemon, type in the following to find out it's Unix PID: # ps -ef | grep -i err Kill the process # kill -9 PID_NUMBER Now no errors will be appended to the AIX error log "errpt" while this daemon is not running. To restart the AIX errpt daemon, type in the following: # /usr/lib/errdemon ############################# # logger - produce logentries ############################# root@16-gd2vb6 140# grep -v ^# /etc/syslog.conf daemon.notice /var/adm/SPlogs/SPdaemon.log *.emerg;*.alert;*.crit;*.err;*.warning;*.notice;*.info /tmp/.tivoli/.tecad_logfile.fifo.gd2vb6.default local4.debug /var/adm/ipsec.log root@16-gd2vb6 136# logger -p daemon.notice bla root@16-gd2vb6 137# logger -p local4.debug test root@16-gd2vb6 138# tail -1 /var/adm/SPlogs/SPdaemon.log Aug 5 12:45:57 gd2vb6 root: bla root@16-gd2vb6 139# tail -1 /var/adm/ipsec.log Aug 5 12:46:06 gd2vb6 root: test ###################### # syslog daemon remote ###################### Step 1 - On each client, edit /etc/syslog.conf to add an entry like this: mark.debug;*.info @syslogserver Make sure syslogserver resolves and is pingable. (This is covered in the man page for syslog.conf, under "destination".) Step 2 - Restart syslogd and make sure it starts without the -R option (lowercase r is ok). The man page says the -R option disables the ability to recieve. I've discovered it also disables the ability to send across the network. ################## # corefile analyse ################## Herausfinden welches Program den core verursachte: # lquerypv -h core 6b0 64 000006B0 7FFFFFFF FFFFFFFF 7FFFFFFF FFFFFFFF |................| 000006C0 7FFFFFFF FFFFFFFF 7FFFFFFF FFFFFFFF |................| 000006D0 00120000 1506DF90 00000000 00000013 |................| 000006E0 6F726163 6C650000 00000000 00000000 |oracle..........| 000006F0 00000000 00000000 00000000 00000000 |................| 00000700 00000000 00000000 00000000 0000FF6C |...............l| 00000710 00000000 00001091 00000000 0000FF25 |...............%| Analyse mit: dbx PFAD/PROGRAMM core-file #################### # logical track size #################### ermitteln: /usr/sbin/lquerypv -M hdisk0 aendern: /usr/bin/chvg -L256 vgname ####### # xtalk ####### x25 check xtalk -s -l IBMXTALK ##################### # x25 starten stoppen ##################### Vorher rvs runterfahren! rmdev -l x25s0 #rmdev -l xs0 # nur fuer ISDN rmdev -l sx25a0 mkdev -l sx25a0 #mkdev -l xs0 # nur fuer ISDN mkdev -l x25s0 x25status ###### # scsi ###### check scsi-bus You can run cfgmgr -v -l scsi1 to scan the buses on the scsi1 adapter and display the progess. # cfgmgr -v -l scsi3 ---------------- attempting to configure device 'scsi3' Time: 0 LEDS: 0x2e6 invoking /usr/lib/methods/cfgncr_scsi -l scsi3 Number of running methods: 1 ---------------- Completed method for: scsi3, Elapsed time = 8 return code = 0 ****************** no stdout *********** ****************** no stderr *********** ---------------- Time: 8 LEDS: 0x539 Number of running methods: 0 ---------------- calling savebase return code = 0 ****************** no stdout *********** ****************** no stderr *********** Configuration time: 8 seconds ###################### # scsi-id herausfinden ###################### lsdev -Cc disk -H root@node1_i [~]#lsdev -Cc disk -H name status location description hdisk0 Available 00-08-00-0,0 2.2 GB SCSI Disk Drive hdisk1 Available 00-08-00-1,0 2.2 GB SCSI Disk Drive hdisk2 Available 00-13-L SSA Logical Disk Drive hdisk3 Available 00-13-L SSA Logical Disk Drive hdisk4 Available 00-13-L SSA Logical Disk Drive hdisk5 Available 00-13-L SSA Logical Disk Drive hdisk6 Available 00-13-L SSA Logical Disk Drive hdisk7 Available 00-13-L SSA Logical Disk Drive 1,0 ist scsi-id fuer hdisk1 ################## # changing scsi-id ################## chdev -l 'scsi0' -a id='6' '-P' on your SCSI board to change default ID from 7 to 6. Look for correct SCSI name (here scsi0). Look also the option -P to do changes on database only, cos this will require a reboot to take efect, specially if you got only one SCSI controller or can't offline the controller. ###### # lsof ###### lsof -i:80 --> gets all open connections to http ######################################## # check which process is using a library ######################################## # /usr/bin/genld -l ########## # CD Eject ########## /usr/lpp/bosinst/cdeject /dev/cd0 ########## # timezone ########## in /etc/environment TZ=MEZ-1MSZ-2,M3.5.0/02:00:00,M10.5.0/03:00:00 oder TZ=DFT-1DFT,M3.5.0,M10.5.0 ########## # lqueryvg ########## node1:/> lqueryvg -Avtp hdisk10 Max LVs: 256 PP Size: 24 Free PPs: 1243 LV count: 4 PV count: 8 Total VGDAs: 8 Conc Allowed 0 MAX PPs per 1016 MAX PVs: 32 Conc Autovar 0 Varied on Co 0 Logical: 000001307f545bdf.1 mdbLV 1 000001307f545bdf.2 loglv00 1 000001307f545bdf.3 mdb01LV 1 000001307f545bdf.4 mdb02LV 1 Physical: 00000130acf95e16 1 0 00000130acf96704 1 0 00000130acf9475b 1 0 00000130acf98196 1 0 0000046683575106 1 0 00000130f3307a28 1 0 00000130a0e746a3 1 0 00000047859d43e4 1 0 VGid: 000001307f545bdf Total PPs: 2144 node1:/usr/local> lqueryvg -g `getlvodm -v mdbVG` -At -p hdisk4 Max LVs: 256 PP Size: 24 Free PPs: 707 LV count: 4 PV count: 6 Total VGDAs: 6 Conc Allowed 16 MAX PPs per 1016 MAX PVs: 32 Conc Autovar 0 Varied on Co 0 Logical: 000001307f545bdf.1 mdbLV 1 000001307f545bdf.2 loglv00 1 000001307f545bdf.3 mdb01LV 1 000001307f545bdf.4 mdb02LV 1 Physical: 00000130acf95e16 1 0 00000130acf96704 1 0 00000130acf9475b 1 0 00000130acf98196 1 0 0000046683575106 1 0 00000130a0e746a3 1 0 Total PPs: 1608 ####################### # software installation ####################### Voraussetzung .toc-datei cws:/spdata/sys1/install/hacmp> installp -ld .|more Fileset Name Level I/U Q Content ==================================================================== cluster.adt.es.client.demos 4.4.1.0 I N usr # ES Client Demos installp Installs available software products in a compatible installation package. Table 45. Commonly used flags of the installp command Flag Description -ac commit -g includes requisites -N overrides saving of existing files -q quiet mode -w does not place a wildcard at end of fileset name -X attempts to expand file system size if needed -d input device -l list of installable filesets -c commit an applied fileset -C clean up after an failed installation -u uninstall -r reject an applied filset -p preview of installation -e define an installation log -F forced overwrite of same or newer version ################## # installp package ################## root@cws [/usr/local/src]#installp -acXd. freeware.aix.tools.rte ... Installation Summary -------------------- Name Level Part Event Result ------------------------------------------------------------------------------- freeware.aix.tools.rte 1.5.4.0 USR APPLY SUCCESS ################ # install_commit ################ # preview /usr/lib/instl/sm_inst installp_cmd -c -f'all' '-p' '-g' '-X' # do /usr/lib/instl/sm_inst installp_cmd -c -f'all' '-g' '-X' or /usr/lib/instl/sm_inst installp_cmd -a -Q -d '.' -f 'bos.adt.libm' '-c' '-N' '-g' '-X' '-G' '-Y' ######################## # list software on media ######################## installp -ld . (aktuelles vz + .toc-file vorhanden) ##################### # list fixes on media ##################### /usr/lib/instl/sm_inst instfix_list -d '.' >README #################### # uninstall software #################### /usr/lib/instl/sm_inst installp_cmd -u -f'IMNSearch.rte.httpdlite' '-g' oder /usr/lib/instl/sm_inst installp_cmd -u -f'openssh.base.client openssh.base.serve r' ################### # list dependencies ################### lslpp -d # lslpp -d rsct.compat.clients.hacmp Fileset Dependents ---------------------------------------------------------------------------- is a requisite of Path: /usr/lib/objrepos rsct.compat.clients.hacmp 2.2.1.0 rsct.compat.clients.rte 2.2.1.0 for i in `lslpp -l|grep -v Path|grep -v Fileset|awk '{print $1}'` do lslpp -d $i done ################################### # list when was a package installed ################################### # lslpp -ha bos.mp Fileset Level Action Status Date Time ---------------------------------------------------------------------------- Path: /usr/lib/objrepos bos.mp 5.3.0.50 COMMIT COMPLETE 05/02/07 22:27:42 5.3.0.50 APPLY COMPLETE 05/02/07 22:27:42 Path: /etc/objrepos bos.mp 5.3.0.50 COMMIT COMPLETE 05/02/07 22:27:44 5.3.0.50 APPLY COMPLETE 05/02/07 22:27:44 ################################################### # list packages that could be committed or rejected ################################################### installp -s ############## # restore look ############## restore -qTvf packagename.bff cws:/spdata/sys1/install/kutest> /cluster.adt.es.4.4.1.0.I ./lppname < New volume on ../hacmp/cluster.adt.es.4.4.1.0.I: Cluster size is 51200 bytes (100 blocks). The volume number is 1. The backup date is: Do 7 Jun 21:36:10 2001 Files are backed up by name. The user is BUILD. 0 ./ 4422 ./lpp_name 0 ./usr 0 ./usr/lpp 0 ./usr/lpp/cluster.adt.es 144968 ./usr/lpp/cluster.adt.es/liblpp.a 0 ./usr/es 0 ./usr/es/include 0 ./usr/es/include/cluster 3740 ./usr/es/include/cluster/ast.h ############ # restore do ############ restore -xvqf ../DBI-1.19.0.0.bff ################## # alt_disk_install ################## !!! NEVER ISSUE exportvg altinst_rootvg !!! # lspv hdisk0 000c91ade17a26ab rootvg hdisk1 000c91ad9ae45533 None hdisk2 000c91ad9aebadac None # clone rootvg with alt_disk_install -C hdisk2 Calling mkszfile to create new /image.data file. Checking disk sizes. Creating cloned rootvg volume group and associated logical volumes. Creating logical volume alt_hd5. Creating logical volume alt_hd6. Creating logical volume alt_hd8. Creating logical volume alt_hd4. Creating logical volume alt_hd2. Creating logical volume alt_hd9var. Creating logical volume alt_hd3. Creating logical volume alt_hd1. Creating logical volume alt_hd10opt. Creating /alt_inst/ file system. Creating /alt_inst/home file system. Creating /alt_inst/opt file system. Creating /alt_inst/tmp file system. Creating /alt_inst/usr file system. Creating /alt_inst/var file system. Generating a list of files for backup and restore into the alternate file system... Backing-up the rootvg files and restoring them to the alternate file system... Modifying ODM on cloned disk. Building boot image on cloned disk. forced unmount of /alt_inst/var forced unmount of /alt_inst/usr forced unmount of /alt_inst/tmp forced unmount of /alt_inst/opt forced unmount of /alt_inst/home forced unmount of /alt_inst Changing logical volume names in volume group descriptor area. Fixing LV control blocks... Fixing file system superblocks... Bootlist is set to the boot disk: hdisk2 # lspv hdisk0 000c91ade17a26ab rootvg hdisk1 000c91ad9ae45533 None hdisk2 000c91ad9aebadac altinst_rootvg bootlist -m normal hdisk2 shutdown -Fr nach reboot # lspv hdisk0 000c91ade17a26ab old_rootvg hdisk1 000c91ad9ae45533 None hdisk2 000c91ad9aebadac rootvg # To delete the old_rootvg volume group alt_disk_install -X old_rootvg # applying patches and clone rootvg to another disk alt_disk_install -C -F IY24217 -l /mnt hdisk2 alt_disk_install -C -b update_all -l /vz_vom_ML hdisk_name # wake up altinst_rootvg to modify files alt_disk_install -W hdisk2 Now you can modify under /alt_inst/etc/resolv.conf eg. # suspend altinst_rootvg alt_disk_install -S # Determine Volume Group Boot Disk: alt_disk_install -q disk # Rename Alternate Disk Volume Group: alt_disk_install -v new_volume_group_name disk # Wake-up Volume Group: alt_disk_install -W disk # new in aix 5.3 alt_disk_copy - To copy rootvg to Alternate Disk alt_disk_mksysb - Installs an alternate disk with a mksysb install base install image alt_rootvg_op - Performs operations on existing alternate rootvg volume groups # cloning To clone the running rootvg to hdisk3 and hdisk4, and execute update_all on all updates from /updates do: alt_disk_copy -d "hdisk3 hdisk4" -b update_all -l /updates ################### # aliases unter aix ################### alias dmesg='alog -f /var/adm/ras/conslog -o' alias df='/usr/bin/df -k' alias l='/usr/bin/ls' alias ll='/usr/bin/ls -ltr' alias m='/usr/bin/more' alias psf='ps -ef|grep ' alias slog='tail -f /var/adm/messages' ####### # fuser ####### fuser -x -c /vz root@cws [/tmp]#fuser -x -c /tmp /tmp: 2132 10624 14716 32550c oder fuser -dVu /dev/lvname ################# # network options ################# list no -a set no -o ################# # crontab entries ################# minute(0-59) hour(0-23) day(1-31) month(1-12) weekday(0-6 with 0=Sunday) 0 10 1 12 0 /something/to/do will execute on 01.12 at 10:00 if the day is a Sunday ########## # xwindows ########## running exceed You need to turn off reverse name resolution. Change the exec line in /etc/inetd.conf to. exec stream tcp6 nowait root /usr/sbin/rexecd rexecd -c restart your inetd daemon with refresh -s inetd ########################################### # loeschen der letzten 4 zeilen einer datei ########################################### wc -l inputfile | awk '{x=$1-4; print x}' | xargs -i sed '{},$d' inputfile oder tac /etc/passwd | sed '1,4d' | tac 'tac' is the reverse of 'cat' and is found in GNU textutils on the freeware collection. ################## # convert dos2unix ################## 1) If you have VIM, you can edit the file and enter "set fileformat=unix" and then write quit the file. 2) If you have perl, you can: cat file | perl -pe ";" or from within VIM as: :%!perl -pe ";" or dos2unix ################## # convert unix2dos ################## if you have VIM, you can edit the file and enter "set fileformat=dos" and then write quit the file. or unix2dos #### # vi #### nicht sichtbare zeichen anzeigen set list ################# # workloadmanager ################# http://publib16.boulder.ibm.com/pseries/en_US/aixbman/admnconc/wlm_concepts.htm#wlm_concepts start wlmcntrl -a stop wlmcntrl -o check running wlmcntrl -q root@cws [~]# wlmcntrl -q WLM is stopped ################ # location codes ################ Network interfaces and protocols 25 AIX location codes In the following, the AIX location codes are described for the purpose of identifying the location of network adapters on your system. The AIX location code is a way of identifying physical devices. The actual location code values vary among the different server architecture types such as MCA, PCI RSPC, and PCI CHRP, but the same format is used. The location code consists of up to four fields of information depending on the type of device. The basic formats of the AIX location codes are: AB-CD-EF-GH For planars, adapters and any non-SCSI devices AB-CD-EF-G,H For SCSI devices/drives For planars, adapter cards, and non-SCSI devices, the location code is defined as: - AB The AB value identifies a bus type or PCI parent bus as assigned by the firmware. - CD The CD value identifies adapter number, adapter's devfunc number or physical location. The devfunc number is defined as the PCI device number times 8 plus the function number. - EF The EF value identifies the connector - ID used to identify the adapter sconnector that a resource is attached to. - GH Identifies a port, address, device, or field replaceable unit (FRU). Adapters such as network adapters and network cards are identified with just AB-CD. The possible values for AB are: 00 Processor bus 01 ISA bus 02 EISA bus 03 MCA bus 04 PCI bus (used in the case where the PCI bus cannot be identified) 05 PCMCIA buses xy For PCI adapters where x is equal to or greater than 1. The x and y are characters in the range of 0-9, A-H, J-N, P-Z (O, I, and lowercase are omitted) and are equal to the parent bus's ibm, aix-loc Open Firmware Property. The possible values for CD depend on the adapter/card: - PCI adapters/cards CD is the device's devfunc number. The C and D are characters in the range of hexadecimal numbers 0-F. - Pluggable ISA adapters CD is equal to the order the ISA cards are defined/configured either by SMIT or the ISA Adapter Configuration Service Aid. - Integrated ISA adapters CD is equal to a unique code identifying the ISA adapter. In most cases this is equal to the adapter's physical location code. In cases where a physical location code is not available, CD will be FF. node5:/> lsdev -Cc adapter | grep ent ent0 Available 00-11 Ethernet High-Performance LAN Adapter (8ef5) ent1 Available 00-16 IBM 10/100 Mbps Ethernet TX MCA Adapter (8f62) ent2 Available 00-17 IBM 10/100 Mbps Ethernet TX MCA Adapter (8f62) ################ # firmware menue ################ 7026-6H1 14900 auf service processor menue ebene eingeben fuer erweiterte funktionen ######## # driver ######## lsdev -Cc driver ###### # snap ###### ACHTUNG!!! genug Plattenplatz unter /tmp/ibmsupt loeschen alter snap snap -r neuer snap anlegen snap -acg ######## # vmtune ######## display mem pools /usr/samples/kernel/vmtune -A # permanentes tuning # vmo -p -o maxclient%=20 Setting maxclient% to 20 in nextboot file Setting maxclient% to 20 # vmo -p -o minperm%=3 Setting minperm% to 3 in nextboot file Setting minperm% to 3 # vmo -p -o maxperm%=20 Setting maxperm% to 20 in nextboot file Setting maxperm% to 20 # reset of tuning root@eric /home/root> vmo -d maxperm% Setting maxperm% to 80 root@eric /home/root> vmo -d minperm% Setting minperm% to 20 root@eric /home/root> vmo -d maxclient% Setting maxclient% to 80 ############### # tuning in AIX ############### Starter set of tuneables Current 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 nfso -p -o nfs_socketsize=60000 nfso -p -o nfs_tcp_socketsize=600000 # Memory Settings vmo -p -o minperm%=5 Leave maxperm and maxclient at default of 80 Leave strict_maxperm and strict_maxclient at their defaults vmo -p -o minfree=960 vmo -p -o maxfree=1088 vmo -p -o lru_file_repage=0 vmo -p -o lru_poll_interval=10 # IO Settings Leave minpgahead and J2_minPageReadAhead at their defaults of 2 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_pbuf=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 ########### # schedtune ########### /usr/samples/kernel/schedtune ############ # autoexpect ############ /usr/bin/autoexpect -f test1.exp sftp blafasel erstellt expect-script in test1.exp und fuehrt eine sftp-verbindung zu blafasel durch ################################## # lpar anzeigen der partition info ################################## # ./ncommand "uname -aLs" Beginn node host1 ... AIX host1 1 5 00379B2A4C00 3 host1 Ende node host1 ! Beginn node host2 ... AIX host2 1 5 0037917A4C00 3 host2 Ende node host2 ! Beginn node host3 ... AIX host3 1 5 0037917A4C00 1 host3 Ende node host3 ! Beginn node host4 ... AIX host4 1 5 0037917A4C00 2 host4 Ende node host4 ! Beginn node host5 ... AIX host5 1 5 00379B2A4C00 1 host5 Ende node host5 ! Beginn node host6 ... AIX host6 1 5 0037917A4C00 4 host6 Ende node host6 ! ################### # LTG Size anpassen ################### Under AIX 5 you have a new feature for logical group track size. I think its from 128K - 1024 K. You can run lquerypv -M hdiskx to get the maximum allowable setting for you disks. Change with: chvg -L 1024 vgname ##################### # vim on aix 5.1 ML04 ##################### E363: Pattern ... No Searches possible use vim -u NONE ##################### # print out to STDERR ##################### in ksh: print -u2 "text" in perl: but you would have to run it like `script.pl "Text to STDERR"` #!/usr/bin/perl print STDERR @ARGV; print STDERR "\n"; ########################## # restore only permissions ########################## found this on the man pages for restore command on http://publib16.boulder.ibm.com/pseries/en_US/cmds/aixcmds4/aixcmds4tfrm.htm : -Pstring Restore only the file attributes. Does not restore the file contents. If the file specified does not exist in the target directory path, the files is not created. This flag restores file attributes selectively depending on the flags specified in the string parameter. String parameter can be a combination of the following characters: A restore all attributes. a restore only the permissions of the files. o restore only the ownership of the files. t restore only the timestamp of the files. c restore only the ACL attributes of the files. Note: Among the existing options for the restore command, options v, h, b, s, f, B, d, and q are valid with the P option. The P option can be used with both file-name and filesystem archives. If the File argument is a symbolic link, then the metadata of the target file will be modified and not that of the symbolic link. ##### # wsm ##### /usr/websm/bin/wsmserver -enable /usr/websm/bin/wsmserver -disable ##### # pax ##### sichern: cd /home/kutz pax -wf home.pax . archiv anschauen: pax -f home.pax|less auspacken: cd /tmp/kutz pax -rvf /home/kutz/home.pax pax erkennt cpio und tar archive: -z = komprimiert pax -rzvf /home/kutz/home.tar.gz pax -rvf /home/kutz/home.tar eingabeaufforderung zu jedem restore file: pax -rif /home/kutz/home.tar baum kopieren: cd ziel pax -rw . /quelle/vz inkrementelles backup: basis cd quelle pax -wvf /zieldir/montag.pax . increment: pax -wv -T 0000 -f /zieldir/dienstag.pax ############ # desktop dt ############ stopsrc -s dtsrc (stoppen) startsrc -s dtsrc (starten) refresh -s dtsrc (refresh) kommentieren mit : in inittab ########### # dns named ########### AIX supports three versions of BIND: 4, 8, and 9. By default, named links to named4, nsupdate to nsupdate4, named-xfer to named-xfer4. To use a different version of named, you must relink the symbolic links accordingly for the named and named-xfer daemons. For example, to use named8: ln -fs /usr/sbin/named8 /usr/sbin/named ln -fs /usr/sbin/named8-xfer /usr/sbin/named-xfer nsupdate4 can be used with named8, but nsupdate9 must be used with named9 because the security process is different. It does not matter what named-xfer is linked to when using named9 because the daemon does not use it. ############# # timeout dns ############# On AIX, a DNS query will wait a total of 75 seconds before failing over to the second nameserver entry in the resolv.conf. The 75 sec timeout period comes from two values RES_RETRY and RES_TIMEOUT. The way it works is the dns client will try to contact the dns server, then if it doesn't get an answer back it will wait 5 seconds and try again, then it will wait 10 secs and try again, 20 sec and try again, 40 secs and try again. . 5 + 10 + 20 + 40 = 75 seconds If you want to change these on the dns client do the following: . # export RES_RETRY=value # export RES_TIMEOUT=value . The timeout is defined by two values : RES_TIMEOUT (default 5 sec) RES_RETRY (defautl 4 times) Each retry the initial timeout value is multipied by 2 ################### # snmpd + oracle ia ################### stopsrc -s snmpd su - oracle -c ". mnet.ksh;lsnctrl dbsnmp_stop;lsnctrl dbsnmp_start;" startsrc -s snmpd ########################## # Switch to snmp Version 1 ########################## # snmpv3_ssw -1 $ sudo snmpv3_ssw Password: Usage: /usr/sbin/snmpv3_ssw [-e|-n|-1] -e Switch to encrypted version of snmpdv3 agent. -n Switch to non-encrypted version of snmpdv3 agent. -1 Switch to snmpdv1 agent. ############### # snmpd restart ############### stopsrc -s aixmibd stopsrc -s dpid2 stopsrc -s snmpmibd stopsrc -s hostmibd stopsrc -s snmpd startsrc -s snmpd startsrc -s dpid2 startsrc -s aixmibd startsrc -s hostmibd startsrc -s snmpmibd start ohne dpid2 wenn snmpdv3 und aix 5.3 startsrc -s snmpd startsrc -s aixmibd startsrc -s hostmibd startsrc -s snmpmibd # status lssrc -a|egrep "snmpd|aixmibd|snmpmibd|hostmibd" lssrc -a|egrep "snmpd|aixmibd|snmpmibd|hostmibd|dpid2" ######################### # agent could not contact ######################### /etc/snmpdv3.conf smux 1.3.6.1.4.1.2.3.1.2.2.1.1.2 dpid_password #dpid2 if the snmpd.peers file shows : "dpid2" 1.3.6.1.4.1.2.3.1.2.2.1.1.2 "dpid_password" and the snmpd.conf shows : smux 1.3.6.1.4.1.2.3.1.2.2.1.1.2 public #dpid then this shows that the password stored in each file does not match. For this case, it is necessary to update the snmpd.conf file and change the dpid2 smux statement from : smux 1.3.6.1.4.1.2.3.1.2.2.1.1.2 public #dpid to : smux 1.3.6.1.4.1.2.3.1.2.2.1.1.2 dpid_password #dpid2 ################ # 1 AIX Commands ################ TITLE : AIX Command Crib Sheet OS LEVEL : AIX DATE : 22/10/2001 VERSION : 1.9 >> Latest version can be found at http://mort.level5.net/johnr/index.html << MISCELLENEOUS http://www.rs6000.ibm.com/cgi-bin/ds_form Web based man pages whence (program) Returns full path of program whereis (program) Returms full path of program what (program) Displays identifying info from the executable like version number, when compiled. compress -c file.txt > file.Z Create a compressed file. uuencode (infile) (extract-file-name) > (output file) Converts a binary file to an ASCII file for transfer by modem or email uudecode (encoded file) Extracts a binary file from encoded file and calls it the extract-file-name examples :- uuencode maymap maymap > maymap.enc uudecode maymap.enc od -c /tmp Displays contents of the /tmp directory file ls -i Lists files with their inode numbers echo * Lists files, can be used if ls is corrupt/missing alog -o -t boot View the boot log chtz (timezone eg GMT0BST) Changes the timezone in /etc/environment file chlang (language eg En_GB) Changes the language in /etc/environment file ar -v -t (archive file) List contents of an archive ar -v -x (archive file) Extracts the archive ar -v -t /usr/lib/libC-r.a Lists contents of the libC_r.a library find /source -print | cpio -pdm /target Copying directories using cpio, creates /target/source directory. dump -nTv (binary executable) Displays the contents of an executable file dump -c Displays string information dump -o Displays object file headers dump -l Displays line numbers dump -s Displays the text section snap -ao /dev/rmt0 Create a snapshot onto tape snap -ad (directory) Create a snapshot into a named directory other than the default (/tmp/ibmsupt) /usr/dt/bin/dtconfig -d Disables desktop logins /usr/dt/bin/dtconfig -e Enables desktop logins /var/dt/Xpid PID of the dtlogin process SOFTWARE INSTALLATION oslevel Returns operating system level 4 . 3 . 3 . 0 <------ Preventive Maintenance Level | | | | | +-------------Modification | +-----------------Release +---------------------Version oslevel -l 4.3.3.0 Displays all filesets that are "downlevel" lslpp -L all list all installed software lslpp -L (program set name) Check if software installed lslpp -f Lists filesets vs packages lslpp -ha Lists installation history of filesets lslpp -w /usr/bin/swapon Lists the fileset that the file belongs to instfix -ik (fix number eg IX66617) Checks id fix is installed instfix -ik 4330-02_AIX_ML instfix -i | grep ML Displays all ML's installed /usr/sbin/install_assist Smitty Installation Assistant /usr/sys/inst.images/sys.bundles Software bundle files alt_disk_install -c hdisk1 Clones a running rootvg onto hdisk1 alt_disk_install -w Wakes up alt vg alt_disk_install -s Sends alt vg to sleep ! alt_disk_install -x Removes alt vg from disk /usr/lpp/bosinst/blvset -d /dev/hdisk0 -p 4.2 Resets the pad string in the BLV to the correct AIX version. Needed if the migration option is missing when installing. installp -ad (device) (fileset) (level) Install apply and commit fileset installp -pad (device) (fileset) (level) Preview install installp -u (fileset) Remove fileset installp -ld (device) List all software on device example:- installp -pad /dev/rmt0 X11.base 4.3.3.0 TERMINALS / DISPLAYS tty Displays what the tty/pty number of the terminal is. termdef reports the termtype setup in smit for the tty port that termdef is run on. chdev -l (device eg tty1) -a term=vt100 Sets tty to a vt100 terminal type penable tty0 adds getty line into /etc/inittab for tty0 and starts getty pdisable tty0 disables the getty line and disables getty penable / pdisable -a option is for all stty erase ^? Set backspace key for vt100 terminals stty erase ^H Set backspace key for wyse50 terminals lscons Displays the console device chcons -a login=enable (device eg /dev/tty1) Changes the console device lsdisp Display adapter device information chdisp Change default display used by LFT subsystem Create ttys on ports 0 to 7 on adapter sa2 :- for i in 0 1 2 3 4 5 6 7 do mkdev -c tty1 -t tty -s rs232 -p sa2 -w$i -a login=enable -a term=vt100 done portmir -t /dev/tty0 Mirror current terminal onto /dev/tty0 portmir -o Turns off port mirroring NETWORK host (ip or hostname) Resolves a hostname / ip address hostname Displays hostname hostname (hostname) Sets the hostname until next reboot chdev -l (device name) -a hostname=(hostname) Changes hostname permanently chdev -l inet0 -a hostname=thomas ifconfig (device name) Displays network card settings ifconfig (device name) up Turns on network card chdev -l (device name) -a state=up Turns on network card ifconfig (device name) down Turns off network card ifconfig (device name) detach Removes the network card from the network interface list ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up ifconfig lo0 alias 195.60.60.1 Create alias ip address for loopback route (add/delete) (-net/-host) (destination) (gateway) Adds or deletes routes to other networks or hosts, does not update the ODM database and will be lost at reboot. route add -net 194.60.89.0 194.60.90.4 chdev -l inet0 -a "net,-hopcount,1,-netmask,255.255.255.0,207.156.168.0,10.0.15.254" (destination) ( gateway ) Adds route and adds entry into ODM, route survives a reboot, lsattr -EHl inet0 Displays routes set in ODM and hostname odmget -q "name=inet0" CuAt Displays routes set in ODM and hostname refresh -s inetd Refresh inetd after changes to inetd.conf kill -1 (inetd PID) Refresh inetd after changes to inted.conf netstat -i Displays interface statistics entstat -d (ethernet adapter eg en0) Displays ethernet statistics arp -a Displays ip to mac address table from arp cache no -a Displays network options use -o to set individual options or -d to set individual options to default. no -o option=value (this value is reset at reboot) no -o "ipforwarding=1" traceroute (name or ipaddress) Displays all the hops from source to destination supplied. ping -R (name or ipaddress) Same as traceroute except repeats. N.F.S. exportfs Lists all exported filesystems exportfs -a Exports all fs's in /etc/exports file exportfs -u (filesystem) Un-exports a filesystem mknfs Configures and starts NFS services rmnfs Stops and un-configures NFS services mknfsexp -d /directory Creates an NFS export directory mknfsmnt Creates an NFS mount directory mount hostname:/filesystem /mount-point Mount an NFS filesystem nfso -a Display NFS Options nfso -o option=value Set an NFS Option nfso -o nfs_use_reserved_port=1 BACKUPS / MKSYSB mkszfile -f Creates /image.data file (4.x onwards) mkszfile -X Creates /fs.size file (3.x) mksysb -i (device of file) Creates a mksysb image mksysb does not save any raw data and will not backup a filesystem that is not mounted. SAVEVG savevg -if (device or file) (vg) Creates a savevg image restvg -q -f (device or file) Restore from a savevg image Ensure that the restvg command is run from / mkvgdata (vg) Creates new vgname.data file CPIO ARCHIVE find (filesystem) -print | cpio -ocv > (filename or device) eg find ./usr/ -print | cpio -ocv > /dev/rmt0 CPIO RESTORE cpio -ict < (filename or device) | more Lists archive cpio -icdv < (filename or device) cpio -icdv < (filename or device) ("files or directories to restore") eg cpio -icdv < /dev/rmt0 "tcpip/*" Restore directory and contents cpio -icdv < /dev/rmt0 "*resolve.conf" Restore a named file 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 tar -xvf (filename or device) Restore all tar -xvf (filename or device) ("files or directories to restore") use -p option for restoring with orginal permissions eg tar -xvf /dev/rmt0 "tcpip" Restore directory and contents tar -xvf /dev/rmt0 "tcpip/resolve.conf" Restore a named file 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" -u option updates /etc/dumpdates file AIX RESTORE restore -qTvf (filename or device) Lists archive restore -qvxf (filename or device) Restores all restore -qvxf (filename or device) ("files or directories to restore") (use -d for restore directories) restore -qvxf /dev/rmt0.1 "./etc/passwd" Restore /etc/passwd file restore -s4 -qTvf /dev/rmt0.1 Lists contents of a mksysb tape BACKUPS ACROSS A NETWORK To run the backup on a local machine (cpio) and backup on the remote machine's (remhost) tape drive (/dev/rmt0) find /data -print | cpio -ocv | dd obs=32k | rsh remhost \ "dd ibs=32k obs=64k of=/dev/rmt0" To restore/read the backup (cpio) on the remote machine dd ibs=64k if=/dev/rmt0 | cpio -icvt To restore/read the backup (cpio) on the local machine from the remote machine's (remhost) tape drive (/dev/rmt0) rsh remhost "dd ibs=64k obs=32k if=/dev/rmt0" | dd ibs=32k \ | cpio -icvt To run the backup (cpio) on a remote machine (remhost) and backup to the local machines tape drive (/dev/rmt0) rsh remhost "find /data -print | cpio -ocv | dd ibs=32k" \ | dd ibs=32k obs=64k of=/dev/rmt0 tar cBf - . | rsh remhost "dd ibs=512 obs=512 of=/dev/rmt0" Copying diskettes and tape COPYING DISKETTES dd if=/dev/fd0 of=(filename) bs=36b dd if=(filename) of=/dev/fd0 bs=36b conv=sync or flcopy COPYING TAPES dd if=/dev/rmt0 of=(filename) dd if=(filename) of=/dev/rmt0 or tcopy VI Commands :g/xxx/s//yyy/ global change where xxx is to be changed by yyy :set list lists all signs in vi sed 's(ctrl v ctrl m)g//g' old.filename > new.filename Strips out ^M characters from ascii files that have been transferred as binary. To enter crontrol characters type ctrl v then ctrl ? where ? is whatever ctrl character you need. DEVICES lscfg lists all installed devices lscfg -v lists all installed devices in detail lscfg -vl (device name) lists device details bootinfo -b reports last device the system booted from bootinfo -k reports keyswitch position 1=secure, 2=service, 3=normal bootinfo -r reports amount of memory (/ by 1024) bootinfo -s (disk device) reports size of disk drive bootinfo -T reports type of machine ie rspc lsattr -El sys0 -a realmem reports amount of useable memory mknod (device) c (major no) (minor no) Creates a /dev/ device file. mknod /dev/null1 c 2 3 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) Change a device attribute chdev -l sys0 -a maxuproc=80 lsattr -EH -l (device) -D Lists the defaults in the pre-defined db lsattr -EH -l sys0 -a modelname rmdev -l (device) Change device state from available to defined rmdev -l (device) -d Delete the device rmdev -l (device) -SR S stops device, R unconfigures child devices lsresource -l (device) Displays bus resource attributes of a device. Power Management (PCI machines) pmctrl -a Displays the Power Management state rmdev -l pmc0 Unconfigure Power Management mkdev -l pmc0 Configure Power Management TAPE DRIVES rmt0.x where x = A + B + C A = density 0 = high 4 = low B = retension 0 = no 2 = yes C = rewind 0 = yes 1 = no tctl -f (tape device) fsf (No) Skips forward (No) tape markers tctl -f (tape device) bsf (No) Skips back (No) tape markers tctl -f (tape device) rewind Rewind the tape tctl -f (tape device) offline Eject the tape tctl -f (tape device) status Show status of tape drive chdev -l rmt0 -a block_size=512 changes block size to 512 bytes (4mm = 1024, 8mm = variable but 1024 recommended) dd if=/dev/rmt0 bs=128k count=1 | wc -c Displays the block size of an unknow tape. Set block size to 0 first. bootinfo -e answer of 1 = machine can boot from a tape drive answer of 0 = machine CANNOT boot from tape drive diag -c -d (tape device) Hardware reset a tape drive. tapechk (No of files) Checks Number of files on tape. < /dev/rmt0 Rewinds the tape !!! PRINTERS / PRINT QUEUES splp (device) Displays/changes printer driver settings splp /dev/lp0 export $LPDEST="pqname" Set default printer queue for login session lsvirprt Lists/changes virtual printer attributes. lsallq Displays all queues rmvirprt -q queuename -d queuedevice Removes a virtual printer qpri -#(job No) -a(new priority) Change a queue job priority. qhld -#(job No) Put a hold on hold qhld -r #(job No) Release a held job qchk -A Status of jobs in queues lpstat lpstat -p(queue) Status of jobs in a named queue qcan -x (job No) Cancel a job from a queue cancel (job No) enq -U -P(queue) Enable a queue enable (queue) enq -D -P(queue) Disable a queue disable (queue) qmov -m(new queue) -#(job No) Move a job to another queue startsrc -s qdaemon Start qdaemon sub-system lssrc -s qdaemon List status of qdaemon sub-system stop -s qdaemon Stop qdaemon sub-system FILE SYSTEMS Physical Volumes (PV's) lspv Lists all physical volumes (hard disks) lspv (pv) Lists the physical volume details lspv -l (pv) Lists the logical volumes on the physical volume lspv -p (pv) Lists the physical partition usage for that PV If the PV state is "missing" but the disk is okay, use "varyonvg vg" to change the state of the PV to "active". chdev -l (pv) -a pv=yes Makes a new hdisk a pysical volume. chpv -v r (pv) Removes a disk from the system. chpv -v a (pv) Adds the removed disk back into the system. chpv -a y (pv) Changes pv allocatable state to YES chpv -a n (pv) Changes pv allocatable state to NO migratepv (old pv) (new pv) Moves all LV's from one PV to another PV, both PV's must be in the same volume group. Migratepv cannot migrate striped logical volumes, use cplv and rmlv. replacepv (old pv) (new pv) (4.3.3 onwards) Volume Groups (VG's) lsvg Lists all volume groups lsvg (vg) Lists the volume group details lsvg -l (vg) Lists all logical volumes in the volume group lsvg -p (vg) Lists all physical volumes in the volume group lsvg -o Lists all varied on volume groups varyonvg (vg) Vary On a volume group varyonvg -f (vg) Forces the varyon process varyonvg -s (vg) Vary on a VG in maintenance mode. LV commands can be used on VG, but LV,s cannot be opened for I/O. varyoffvg (vg) Vary Off a volume group synclvodm (vg) Tries to resync VGDA, LV control blocks and ODM. synclvodm -v (vg) Rebuilds the LVCB. mkvg -y(vg) -s(PP size) (pv) Create a volume group mkvg -y datavg -s 4 hdisk1 reducevg -d (vg) (pv) Removes a volume group reducevg (vg) (PVID) Removes the PVID disk reference from the VGDA when a disk has vanished without the reducevg (vg) (pv) command being run first. reducevg -df (vg) (pv) Deletes all LV's from the VG and removes the VG from the disk. If the last disk in the VG then the VG is deleted. extendvg (vg) (new pv) Adds another PV into a VG. exportvg (vg) Exports the volume group eg deletes it! Note : Cannot export a VG if it has active paging space, turn off paging, reboot before exporting VG. Exporting removes entries from filesystems file but does not remove the mount points. chvg -a y (vg) Auto Vary On a volume group at system start. lqueryvg -Atp (pv) Details volume group info for the hard disk. importvg -y (vg name) (pv) Import a volume group from a disk. importvg (pv) Same as above but VG will be called vg00 etc. 4.3 onwards, importvg will automatically varyon the VG. chvg -Q (y/n) (vg name) Turns on/off Quorum checking on a VG. reorgvg Does not reorg the PP's of striped LV's Logical Volumes (LV's) lslv (lv) Lists the logical volume details lslv -l (lv) Lists the physical volume which the LV is on mklv (vg) (No of PP's) (pv Name optional) Create a logical volume mklv -y (lv) (PP's) (pv name optional) Creates a named logical volume chlv -n (new lv) (old lv) Rename a logical volume extendlv (lv) (extra No of PP's) Increase the size of an LV rmlv (lv) Remove a logical volume cplv -v (vg to copy to) -y (new lv) (lv) Copy an LV to a new LV If copying a filesystem LV, umount the filesystem before copying, otherwise you will have to fsck the the new LV before the filesystem can be mounted. If copying a striped LV to an LV that is already created, and the stripe size is different ( or not even striped ), then these new parameters are maintained when the data is copied to the new LV. mklv/extendlv -a = PP alocation policy -am = middle -ac = center -ae = edge -aie = inner edge -aim = inner middle migratepv -l (lv) (old pv) (new pv) Move a logical volume between physical volumes. Both physical volumes must be in the same volume group ! mklv -y (lv) -t jfslog (vg) (No of PP's) (pv Name optional) Creates a JFSlog logical volume. logform (/dev/lv) Initialises an LV for use as an JFSlog getlvcb -AT (lv) Displays Logical Volume Control Block information File Systems (FS's) lsfs Lists all filesystems lsfs -q (fs) Lists the file system details lsjfs Displays data about all filesystems in CSV style format mount Lists all the mounted filesystems mount (fs or lv) Mounts a named filesystem mount -a Mounts all filesystems mount all mount -r -v cdrfs /dev/cd0 /cdrom mounts cd0 drive over /cdrom crfs -v jfs -d(lv) -m(mount point) -A yes Will create a file system on the whole of the logical volume, adds entry into /etc/filesystems and will create mount point directory if it does not exist. crfs -v jfs -g(vg) -m(mount point) -a size=(size of fs) -A yes Will create a logical volume on the volume group and create the file system on the logical volume. All at the size stated. Will add entry into /etc/filesystems and will create the mount point directory if it does not exist. Use attribute "-a log=/dev/log01" to specify a jfslog devices Use attrubute "-a bf=true" for a large file enabled filesystem chfs -A yes (fs) Change file system to Auto mount in /etc/filesystems chfs -a size=(new fs size)(fs) Change file system size rmfs (fs) Removes the file system and will also remove the LV if there are no onther file systems on it. defrag -q (fs) Reports the fragment status of the file system. defragfs -r (fs) Runs in report only defrag mode (no action). defragfs (fs) Defragments a file system. 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. 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) Removes logical volume copies. rmlvcopy (lv) (copies 1 or 2) (pv) From this pv only! syncvg -p (pv) Synchronize logical partion copies syncvg -l (lv) syncvg -v (vg) mirrorvg (vg) (pv) Mirrors the all the logical volumes in a volume group onto a new physical volume. New physical volume must already be part of the volume group. BOOT LOGICAL VOLUME (BLV) Mirroring does not work with the BLV as it is not a true logical volume, bosboot must be run against the other disk after mirroring the rootvg. bootlist -m (normal or service) -o displays bootlist bootlist -m (normal or service) (list of devices) change bootlist bootinfo -b Identifies the bootable disk bootinfo -t Specifies type of boot bosboot -a -d (/dev/pv) Creates a complete boot image on a physical volume. mkboot -c -d (/dev/pv) Zero's out the boot records on the physical volume. savebase -d (/dev/pv) Saves customised ODM info onto the boot device. SYSTEM DUMP sysdumpdev -l Lists current dump destination. sysdumpdev -e Estimates dumpsize of the current system in bytes. sysdumpdev -L Displays information about the previous dump. sysdumpstart -p Starts a dump and writes to the primary dump device. sysdumpstart -s Starts a dump and writes to the secondary dump device. (MCA machine can also dump if key is in service position and the reset button is pressed) sysdumpdev -p (dump device) -P Sets the default dump device, permanently Analyse dump file :- echo "stat\n status\n t -m" | crash /var/adm/ras/vmcore.0 PAGING SPACE (PS's) lsps -a Lists out all paging space lsps -s Displays total paging and total useage lsps (ps) mkps -s(No of PP's) -n -a (vg) mkps -s(No of PP's) -n -a (vg) (pv) -n = don't activate/swapon now -a = activate/swapon at reboot mklv -b n -t paging -y hd6 (vg) (No of PP's) (pv) Creates paging space using the mklv command. chps -a n (ps) Turns off paging space. chps -s(No of PP's) (ps) Increases paging space. chlv -n (new name) (old name) Change paging space name rmps (ps) Remove paging space. PS must have been turned off and then the system rebooted before it can be removed. 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 File that lists all paging space devices that are activated/swapon during reboot. SCHEDULING crontab -l List out crontab entrys crontab -e Edit crontab entrys crontab -l > (filename) Output crontab entrys to a file crontab (filename) Enter a crontab from a file crontab -r Removes all crontab entrys crontab -v Displays crontab submission time. /var/adm/cron/cron.allow File containing users allowed crontab use. /var/adm/cron/cron.deny File containing users denied crontab use. /var/adm/cron/crontab Directory containing users crontab entries. at (now + 2 minutes, 13:05, etc) {return} Schedule a job using at Command or schell script {return} {CTRL D} echo "shutdown -Fr" | at now + 1 minute at -l atq Lists out jobs scheduled to run via at command at -r (at job No) atrm (at job No) Removes an at job scheduled to run. /var/adm/cron/at.allow File containing users allowed at use. /var/adm/cron/at.deny File containing users denied at use. /var/adm/cron/atjobs Directory containing users at entries. SECURITY nulladm /var/adm/wtmp To recreate/clear down the wtmp file. groups Lists out the groups that the user is a member of setgroups Shows user and process groups chmod abcd (filename) Changes files/directory permissions Where a is (4 SUID) + (2 SGID) + (1 SVTX) b is (4 read) + (2 write) + (1 execute) permissions for owner c is (4 read) + (2 write) + (1 execute) permissions for group d is (4 read) + (2 write) + (1 execute) permissions for others -rwxrwxrwx -rwxrwxrwx -rwxrwxrwx ||| ||| ||| - - - | | | Owner Group Others -rwSrwxrwx = SUID -rwxrwSrwx = SGID drwxrwxrwt = SVTX chown (new owner) (filename) Changes file/directory owners chgrp (new group) (filename) Changes file/directory groups chown (new owner).(new group) (filename) Do both !!! umask Displays umask settings umask abc Changes users umask settings where ( 7 - a = new file read permissions) ( 7 - b = new file write permissions) ( 7 - c = new file execute permissions) eg umask 022 = new file permissions of 755 = read write and execute for owner read ----- and execute for group read ----- and execute for other mrgpwd > file.txt Creates a standard password file in file.txt passwd Change current user password pwdadm (username) Change a users password pwdck -t ALL Verifies the correctness of local authentication lsgroup ALL Lists all groups on the system mkgroup (new group) Creates a group chgroup (attribute) (group) Change a group attribute rmgroup (group) Removes a group USERS passwd -f Change current users gecos (user description) passwd -s Change current users shell chfn (username) Changes users gecos chsh (username) (shell) Changes users shell env Displays values of environment variables printenv id Displays current user's uid and gid details id (user) Displays user uid and gid details whoami Displays current user details who am i (or who -m) who Displays details of all users currently logged in. w who -b Displays system reboot time uptime Displays number of users logged in, time since last reboot, and the machine load averages. lslicense Displays number of current user licensese chlicense -u (number) Changes the number of user licenses lsuser ALL Lists all users details lsuser (username) Lists details for user lsuser -a(attribute) (username or ALL) Lists user attributes lsuser -a home ALL mkuser -a(attributes) (newuser) Add a new user chuser (attributes) (user) Change a user chuser login=false (user) Lock a user account rmuser -p (user) Removes a user and all entries in security files usrck -t ALL Checks all the user entires are okay. fuser -u (logical volume) Displays processes using the files in that LV fuser -k /dev/lv02 Will send a kill signal to all processes using /dev/lv02 lsattr -D -l sys0 -a maxuproc Displays max number of processes per user chdev -l sys0 -a maxuproc=(number) Changes max number of processes per user REMOTE USERS ruser -a -f (user) Adds entry into /etc/ftpusers file ruser -a -p (host) Adds entry into /etc/host.lpd file ruser -a -r (host) Adds entry into /etc/hosts.equiv file ruser -d -f (user) Deletes entry in /etc/ftpusers file ruser -d -p (host) Deletes entry in /etc/host.lpd file ruser -d -r (host) Deletes entry in /etc/hosts.equiv file ruser -s -F Shows all entries in /etc/ftpusers file ruser -s -P Shows all entries in /etc/host.lpd file ruser -s -R Shows all entries in /etc/hosts.equiv file ruser -X -F Deletes all entries in /etc/ftpusers file ruser -X -P Deletes all entries in /etc/host.lpd file ruser -X -R Deletes all entries in /etc/hosts.equiv file INITTAB telinit S Switches to single user mode. telinit 2 Switches to multi user mode. telinit q Re-examines /etc/inittab lsitab -a Lists all entries in inittab lsitab (ident eg tty1) Lists the tty1 entry in inittab mkitab ("details") Creates a new inittab entry chitab ("details") Ammends an existing inittab entry rmitab (ident eg tty1) Removes an inittab entry. chitab "tty1:2:respawn:/usr/bin/getty /dev/tty1" ODM odmget -q "name=lp1" CuDv |more Gets lp1 info from pre-defined database. odmget -q "name-lp1" CuAt |more Gets lp1 info from customised database. odmdelete -o CuAt -q "name=lp1" Deletes lp1 info from customised db. odmget -q "name=lp1" CuAt > lp1.CuAt Export ODM info to text file. odmadd lp1.CuAt Import ODM info from text file. ERROR LOGGING /usr/lib/errdemon -l Displays errorlog attributes. /usr/lib/errdemon Starts error logging. /usr/lib/errstop Stops error logging. errpt Displays summary errorlog report. errpt -a Displays detailed errorlog report. errpt -j (identifier) Displays singe errorlog report. Note : errorlog classes are H=Hardware S=Software O=Information V=Undetermined errclear (days) Deletes all error classes in the errorlog. errclear -d (class) (days) Deletes all error class entries in errlog. 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 vmstat (drive) (interval) (count) Reports virtual memory statistics. vmstat hdisk0 5 20 vmstat -s Diplays number of paging events since system start. vmstat -f Diplays number of forks since system start. vmstat -i Diplays number of interupts by device since system start. iostat (drive) (interval) (count) Reports i/o and cpu statistics. iostat hdisk0 5 20 iostat -d (drive) (interval) (count) Limits report to drive statistics. iostat -t (interval) (count) Limits report to tty statistics. sar -u -P ALL 10 10 Displays %usr %sys %wio %idle for all processors DOS DISKETTES dosdir Reads directory listing of a diskette dosdir (directory) Reads directory listing of a named directory dosread -D/dev/fd0 C41.TXT c41.txt Gets C41.TXT from diskette drive fd0 dosread -D/dev/fd0 DIRECTORY/C41.TXT c41.txt (-D option can be dropped if using fd0) doswrite -D/dev/fd0 (unixfile) (dosfile) Writes a file to diskette dosdel (dosfile) Deletes a dos file on diskette dosformat Formats the diskette SENDMAIL sendmail -bi Creates new aliase db from /etc/aliase file. newaliases sendmail -bp Displays the contents of the mail queue mailq sendmail -q Processe the sendmail queue NOW sendmail -bt -d0.4 < /dev/null Prints out sendmail version, compile defines and system information refresh -s sendmail Restart sendmail kill -l (sendmail PID) ##################### # useful aix commands ##################### Useful AIX commands svmon svmon -P Further: use can user svmon command to monitor memory usage as follows; (A) #svmon -P -v -t 10 | more (will give top ten processes) (B) #svmon -U -v -t 10 | more ( will give top ten user) 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 -g'ptmpvg' -a size='884998144' -m'/ptmp2' -A''`locale yesstr | awk -F: '{print $1}'`'' -p'rw' -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. ################################## # check who is mounting my exports ################################## netstat -an | grep 2049 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 mksysb, making it error out instead of doing your backup There's also "smitty mksysb" You can create an image using the savevg command i.e. savevg -v -n -9 / _rootvg.img rootvg This can be used to build a NIM installable image to recover your systems alternatively, the command line call for a mksysb to tape (to include map and exclude files) is /usr/bin/mksysb '-m' '-e' '-i' /dev/rmt0 Finding which lpp contains a file: lslpp -w /usr/sbin/umount There exists a "diag CD" for AIX. /usr/samples/kernel/vmtune lsattr -El sys0 | grep realmem lsattr -El mem0 See if you AIX system's hardware is CHRP (some sort of PowerPC reference platform spec, I believe) : bootinfo -p chrp Some really funky hardware-looking problems can be fixed by draining the NVRAM battery for 5 minutes, and then reinstalling the microcode. We used to do this on some IBM RT's in Cincinnati, and a recent poster to AIX-L indicates that it's still useful in some situations. From AIX-L: AIX 4.3.2 -> AIX 4.3.3 is the most easiest Upgrade of ALL. Place the AIX 4.3.3 Vol 1 of CD on the CDROM drive and run smitty update_all , this will upgrade the OS On the subject of running out of paging space, from AIX-L: Look into npswarn, npskill stuff in Performance Management Guide Changing the boot device order: Boot the server, and hit 1 or F1 (depending if you have an ascii console or a graphics console) when the logos come up to get to sms mode. In the menus select multiboot, select boot devices, select boot order. You should start tracing for inetd subsystem with traceson -s inetd and then issue: trpt -j you will see the protocols control blocks (PID) you're tracing, and then with: trpt -p you should see output for telnet communications. But this is not working. 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 1310711 1298235 12476 103782 711466 pg space 2097152 585219 work pers clnt lpage pin 103782 0 0 0 in use 438570 10130 849535 0 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 chack 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). odmget, odmshow, odmchange, odmadd, odmdelete, odmdrop lsps -a nmon - free, unsupported download from IBM What's this about chmod'ing kmem to be world readable though?! esmf04m-dcsew> instfix -i | grep ML All filesets for 5.1.0.0_AIX_ML were found. All filesets for 5100-01_AIX_ML were found. All filesets for 5100-02_AIX_ML were found. All filesets for 5100-03_AIX_ML were found. All filesets for 5100-04_AIX_ML were found. esmf04m-dcsew> The specifix fixes can be checked using instfix command: #instfix -ivk e.g #instfix -ivk IY56076 instfix -ciqk 4330-08_AIX_ML | grep ":-:" Lists what filesets need to be installed for instfix to show "All filesets for 4330-08 were found". instfix -k "IX#####" -d /dev/rmt0.1 Installs the APAR and its prerequisites on the system. installp -Xagqd /dev/rmt0.1 X11.base.rte Installs Xwindows on the system. # delete an AIX lpp installp -u or /usr/lib/instl/sm_inst installp_cmd -u -f'rsct.msg.en_US.core.utils' Copious network statistics: entstat -d ent0 Making AIX 5.1 see a change to /etc/inetd.conf and/or /etc/services and/or /etc/rpc is different from most other systems (only verified using one rpc/udp service so far) You can't just kill -HUP inetd's pid What you can do, is "smitty inetd", stop inetd, start inetd, and exit smitty. Alternatively, it -should- work to: stopsrc -s inetd startsrc -s inetd Or better: Edit /etc/inetd.conf and comment out ftp and refresh inetd by issuing "refresh -s inetd" startsrc -t ftpd -u 022 -l ############## # check kernel ############## /usr/sbin/lsconf -k Kernel Type: 64-bit ############### # change kernel ############### To truly change the kernel to 64-bit, you need to be at the 5.1 oslevel. The means to change to a 64-bit kernel are: From 32-bit to 64-bit: ln -sf /usr/lib/boot/unix_64 /unix ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix 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 as well is defined on a Volume Group lsattr -El hdiskXX lscfg -vp -l hdiskXX These should give you the raw disk capacity Go to: http://www-912.ibm.com/eserver/support/fixes/fcgui.jsp Choose: 1)pSeries family 2)AIX OS,Java, compilers 3)Specifi fix 4)Your OS Press continue.... type in your requisites in the text box. thats it! LPP history: lslpp -h sar 1 10 bootinfo -b reports last device the system booted from bootinfo -k reports keyswitch position 1=secure, 2=service, 3=normal bootinfo -r reports amount of memory (/ by 1024) bootinfo -s (disk device) reports size of disk drive bootinfo -T reports type of machine ie rspc,rs6ksmp,rspc or chrp bootinfo -y reports your hardware arquitecture (32 bits or 64 bits) bootinfo -K reports if the kernel in memory is 32 bits or 64 bits You can submit/check a pSeries PMR via the web at: https://techsupport.services.ibm.com/ssr/ssr.slprob Force a user to change their password on their next login: pwdadm -f ADMCHG username Note that this works with some sshd's and not others Identifying hard disk issues: svmon -G vmstat 1 20 iostat -d hdisk0 1 20 ps avg | sort +3r -n | head -25 Maximum number of processes a user can have: lsattr -E -l sys0 -a maxuproc smitty chgsys Also allows one to change the max number of processes per user, among other things AIX and SNMP: by Host Resource you mean the AIX SNMP component that monitors system resources ?? if so, then there's a conf file for the daemon aixmibd named /etc/aixmibd.conf where you can configure the thresholds for many 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 5) A COMMITed software is installed and the only way to reject it is by uninstalling the software fileset while a APPLIED software is installed and the preview versions of filesets are installed too so if you REJECT the APPLIED software then those older versions will be active again. Checking on known maintenance levels: esmf04m-strombrg> oslevel -qr Known Recommended Maintenance Levels 5100-04 5100-03 5100-02 5100-01 esmf04m-strombrg> lppchk -v Dual booting AIX: >Okay you install AIX 5.1 on hdisk0 as example and boot your maschine. th= >an >you clone your rootvg to hdisk1 : >alt_disk_install -C hdisk1 >so you have hdisk0 with old_rootvg >and hdisk1 with alt_*rootvg > >bootlist -m hdisk0 hdisk1 (means you boot from hdisk0 first and hdisk1 >second) > >boot with AIX5.2 CD and install with Migartion Option from prompt on >hdisk0. > >now you have Aix5.2 on hdisk0 and aix5.1 on hdisk1 > >if you want to remove the alternate disk install: >alt_disk_install -X Installing an IBM maintenance release upgrade: Go to the IBM Support Fix Central site: http://www-912.ibm.com/eserver/support/fixes/fcgui.jsp * Server Select "Pseries family" or the series that your server is. * Product or fix type Select "AIX OS, java, compilers" * Ordering option Select "Mainteneance packages" * OS level Select "AIX 5.1" Select "continue" for next screen Current level Select "5100-04" Desired Level Select "5100-05" Select "go" Download "510405.tar.gz " at the bottom of the page Follow the instructions Locking an account: The following procedure can be used to lock a user's account; (1) smitty user (2) select, change the characteristics of a user (3) Expiration Date: input the effective date, when this account will be expiring / closing (4) Is this user account locked: false, use tab key to choose true (5) User can login:true, use tab key to change true to false (6) user can login remotely:true, use tab key to change true to false (7) Press enter key and account will be locked (8) for further security also change the password to permit the user to login after 30 days / specfied time revert the above fields to original values. 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 off Memory sizes 0 Network memory sizes 0 Kernel debugger off Real Time Kernel off HMT on ...but only if your hardware -supports- HMT! Definiing a virtual network interface: ifconfig en# alias xxx.xxx.xxx.xxx Checking if NFS is active: lssrc -a | egrep nfs biod nfs 20752 active nfsd nfs 21426 active rpc.mountd nfs 27888 active rpc.statd nfs 22730 active rpc.lockd nfs 24280 active nfso -o nfs_use_reserved_ports=1 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 2 4 2 open/syncd /mn/script # 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 40 80 2 open/syncd N/A hd8 jfslog 1 2 2 open/syncd N/A hd4 jfs 1 2 2 open/syncd / hd2 jfs 71 142 2 open/syncd /usr hd9var jfs 1 2 2 open/syncd /var hd3 jfs 2 4 2 open/syncd /tmp hd1 jfs 4 8 2 open/syncd /home hd10opt jfs 2 4 2 open/syncd /opt log1 jfslog 1 2 2 closed/syncd N/A paging01 paging 9 18 2 open/syncd N/A hd14 jfs 4 8 2 closed/syncd 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 to a toc overflow, please try adding: -Wl,-b -Wl,bigtoc ...to your $CC or $LDFLAGS bash-2.05b$ lsattr -El ent0 alt_addr 0x000000000000 Alternate ethernet address True busintr 553 Bus interrupt level False busmem 0xf8080000 Bus memory address False chksum_offload yes Enable hardware transmit and receive checksum True compat_mode no Gigabit Backward compatability True copy_bytes 2048 Copy packet if this many or less bytes True flow_ctrl yes Enable Transmit and Receive Flow Control True intr_priority 3 Interrupt priority False intr_rate 10000 Interrupt events processed per interrupt True jumbo_frames no Transmit jumbo frames True large_send yes Enable hardware TX TCP resegmentation True media_speed Auto_Negotiation Media speed True rom_mem 0xf8040000 ROM memory address False rx_hog 1000 RX buffers processed per RX interrupt True rxbuf_pool_sz 2048 Rcv buffer pool, make 2X rxdesc_que_sz True rxdesc_que_sz 1024 RX descriptor queue size True slih_hog 10 Max Interrupt events processed per interrupt True tx_que_sz 8192 Software transmit queue size True txdesc_que_sz 1024 TX descriptor queue size True use_alt_addr no Enable alternate ethernet address True # lsslot -c pci # Slot Description Device(s) U0.1-P1-I1 PCI-X capable, 64 bit, 133MHz slot Empty U0.1-P1-I2 PCI-X capable, 32 bit, 66MHz slot Empty U0.1-P1-I3 PCI-X capable, 32 bit, 66MHz slot pci9 lai0 U0.1-P1-I4 PCI-X capable, 64 bit, 133MHz slot Empty U0.1-P1-I5 PCI-X capable, 64 bit, 133MHz slot Empty U0.1-P1-I6 PCI-X capable, 64 bit, 133MHz slot Empty Operating System and Devices Split a Mirrored Disk from a Volume Group 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 prefer driftfile /etc/ntp.drift tracefile /etc/ntp.trace 3) Restart the xntp daemon To restart the xntpd daemon : startsrc -s xntpd 4) Check status of time synchronization To check the status of the time synchronisation, use the ntpq utility. ntpq -i : start ntpq interactively ntpq> peer remote refid st t when poll reach delay offset disp ======================================================================== ====== * .PPS. 1 u 863 1024 377 0.92 0.160 0.47 The "offset" field displays the difference (in milliseconds) between the system time and the reference time. Type "quit" to exit the ntpq utility. Kind of like ldd: dump -X32 -Tv /bin/ls Getting security notices from IBM: https://techsupport.services.ibm.com/server/pseries.subscriptionSvcs?mode=2 Changing prngd to listen on a socket, using chsys: esmfcws-root> chssys -s prngd -a '-f /dev/egd-pool -m 666 tcp/localhost:708' 0513-077 Subsystem has been changed. esmfcws-root> ps -ef | grep prng root 303186 1015878 0 19:19:43 pts/2 0:00 grep prng root 1007836 262212 0 19:04:42 - 0:01 /opt/freeware/sbin/prngd -f /dev/egd-pool -m 666 esmfcws-root> stopsrc -s prngd 0513-044 The prngd Subsystem was requested to stop. esmfcws-root> startsrc -s prngd 0513-059 The prngd Subsystem has been started. Subsystem PID is 852062. esmfcws-root> ps -ef | grep prng root 852062 262212 0 19:20:42 - 0:01 /opt/freeware/sbin/prngd -f /dev/egd-pool -m 666 tcp/localhost:708 root 1007846 1015878 0 19:20:54 pts/2 0:00 grep prng esmfcws-root> /usr/lo local lost+found esmfcws-root> /usr/local/sbin/gen-pas Not bad, using prngd for entropy cf4b01142c33d9bd06f1e50d6968f4da esmfcws-root> Or if prngd isn't already partially set up: esmf04m-root> mkssys -s prngd -p /opt/freeware/sbin/prngd -u root -a '-f /dev/egd-pool -m 666 tcp/localhost:708' 0513-071 The prngd Subsystem has been added. esmf04m-root> lssrc -s prngd Subsystem Group PID Status prngd inoperative esmf04m-root> esmf04m-root> for i in 1 2 3 4 5 6 7 8; do ssh esmf0${i}m "mkssys -s prngd -p /opt/freeware/sbin/prngd -u root -a '-f /dev/egd-pool -m 666 tcp/localhost:708'"; done 0513-071 The prngd Subsystem has been added. 0513-071 The prngd Subsystem has been added. 0513-071 The prngd Subsystem has been added. 0513-075 The new subsystem name is already on file. 0513-071 The prngd Subsystem has been added. 0513-071 The prngd Subsystem has been added. 0513-071 The prngd Subsystem has been added. 0513-071 The prngd Subsystem has been added. esmf04m-root> for i in 1 2 3 4 5 6 7 8; do ssh esmf0${i}m "stopsrc -s prngd"; done 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-044 The prngd Subsystem was requested to stop. 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-004 The Subsystem or Group, prngd, is currently inoperative. 0513-004 The Subsystem or Group, prngd, is currently inoperative. esmf04m-root> for i in 1 2 3 4 5 6 7 8; do ssh esmf0${i}m "startsrc -s prngd"; done 0513-059 The prngd Subsystem has been started. Subsystem PID is 25880. 0513-059 The prngd Subsystem has been started. Subsystem PID is 34508. 0513-059 The prngd Subsystem has been started. Subsystem PID is 30670. 0513-029 The prngd Subsystem is already active. Multiple instances are not supported. 0513-059 The prngd Subsystem has been started. Subsystem PID is 37450. 0513-059 The prngd Subsystem has been started. Subsystem PID is 21266. 0513-059 The prngd Subsystem has been started. Subsystem PID is 27662. 0513-059 The prngd Subsystem has been started. Subsystem PID is 42666. esmf04m-root> Don't forget /etc/prngd.conf Only JFS file systems can be large-file-enabled. If you use JFS2, they handle files greater than 2GB out of the box. Mike Badar Checking on whether the "Trusted Computing Base" is configured: tcbck please issue the following commands: fuser -c /mnt and check for any PID that maybe locking your CD device. If you have any, you can kill them all bye issuing fuser -ck /mnt and try to eject the CDROM. If this doesn't work at all, then check for the cdromd daemon (new feature ported for Solaris into AIX) with the following command: lssrc -a | grep cdrom if cdromd is running, then you should umount the cdrom device: cdmount cdumount /cdrom/cdXX cdeject Linux, by default, requires any NFS mount to use a reserved port below 1024. AIX, by default, uses ports above 1024. Use the following command to restrict AIX to the reserved port range: # /usr/sbin/nfso -o nfs_use_reserved_ports=1 Creating a subsystem: mkssys -s smbd -p /opt/freeware/sbin/smbd -u 0 -a "-D" -d -q -S -n 15 -f 9 -G tcpip But it's useless since smbd make fork. Sincerely, Lev AIX system firmware upgrade (pSeries?) : Sysplanar is something like motherboard in Intel domain, i.e. it is hardware. It is possible to upgrade firmware when in maintenance mode - when there is E1F1 on the LCD display right on the machine press key 1 (not on the numeric keyboard) if you have ASCII terminal. If you have graphical console press functional key 'F1' you will be directed to standalone diagnostics menu the firmware you can find here together with description: http://techsupport.services.ibm.com/server/mdownload2/download.html if you cannot boot and have the shell prompt you can do it according the paragraph 'Updating with the Diagnostic Service Aid Method' - see the description from the link mentioned above. in the diagnostics menu you can find 'current firmware as well (there is something like 'Display config' there') Diagnostics can be ran against a single device while online use the diag -d devicename bindprocessor -q ( will give you the number of proc. ) lscfg -v ( will give your system info. ) lsmcode -A ( will give you the proc. firmware + others ) chuser maxage=0 username Some good stuff on OpenMP and AIX (among other things): http://www.rz.rwth-aachen.de/ewomp03/OMPtools.html Someone on AIX-L indicated that this was a good vmtune for a database system: /usr/samples/kernel/vmtune -p 5 -P 20 ( to set the max perm and min perm values) Getting an AIX machine's serial number: esmf04m-root> uname -m 0020D3FA4C00 LoadLeveler upgrade PMR# 70374-227 - website only showing linux downloads of loadleveler, no AIX downloads From a post on AIX-L: IBM recommends the following formula to calculate the amount of paging space you need... For memories larger than 256 MB, the following is recommended: total paging space = 512 MB + (memory size - 256 MB) * 1.25 For 1024MB RAM = 1600MB Paging Space 1 LP = 64 MB = add 17 LP's to = 1600MB This is what we use while running AIX 5L. Changing a forgotten root password on AIX: 1. Insert the product media for the same version and level as the current installation into the appropriate drive. 2. Power on the machine. 3. When the screen of icons appears, or when you hear a double beep, press the F1 key repeatedly until the System Management Services menu appears. 4. Select Multiboot. 5. Select Install From. 6. Select the device that holds the product media and then select Install. 7. Select the AIX version icon. 8. Define your current system as the system console by pressing the F1 key and then press Enter. 9. Select the number of your preferred language and press Enter. 10. Choose Start Maintenance Mode for System Recovery by typing 3 and press Enter. 11. Select Access a Root Volume Group. A message displays explaining that you will not be able to return to the Installation menus without rebooting if you change the root volume group at this point. 12. Type 0 and press Enter. 13. Type the number of the appropriate volume group from the list and press Enter. 14. Select Access this Volume Group and start a shell by typing 1 and press Enter. 15. At the # (number sign) prompt, type the passwd command at the command line prompt to reset the root password. For example: 16. # passwd 17. Changing password for "root" 18. root's New password: Enter the 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 AIX filesystems and quotas: http://unix.derkeiler.com/Newsgroups/comp.unix.aix/2003-11/0744.html ///// bluesky's /home is JFS, not JFS2, according to the mount command on /home's NFS server. I also called IBM support to verify what we've been seeing on the web. The tech I reached indicated that: 1) JFS2 does not support quotas in AIX 5.1 or AIX 5.2 2) Many customers have been requesting quotas for JFS2 3) He has not heard of any plans to add quota support to JFS2 for AIX 5.3 4) He would not be surprised if quotas for JFS2 are added to the IBM AIX roadmap sometime soon, given the high demand ///// We now have reason to want to move from 5.1 to 5.3 (we want quotas on /ptmp, and we want /ptmp to be a bit under 2 terrabytes; JFS in AIX 5.1 does quotas, but not 1T+ filesystems, and JFS 2 on AIX 5.1 does 1T+ filesystems, but not quotas; I understand that 5.3's JFS2 does large filesystems as well as quotas). ///// The new piece of news is, that if we were to gateway lustre to AIX over SMB/CIFS, we -wouldn't- have to resort to "sharity", which was a product that IBM was unlikely to be able to support. It turns out that AIX 5.2 and up, include an SMB/CIFS client. So we could upgrade to AIX 5.3 (and we want to anyway, to get quotas in JFS2), and use IBM's implementation of an SMB/CIFS client, with samba on esmft2. ///// I'm shy to even try IBM's JFS, because it comes from OS/2 and not AIX. JFS really lacked a _lot_ of traditional UNIX capabilities in its first releases on Linux, unlike XFS. ///// The consensus on comp.unix.aix appears to be that JFS (1) will not allow one-large /ptmp like Charlie wants. Recall that we recently moved /ptmp from JFS2 to JFS to get quotas. It turns out that in AIX 5.3, JFS2 can do quotas. 2005-06-23 IBM informs me that PSSP is never going to be ported to AIX 5.3. There is a followon product like PSSP called "CSM", and it runs on recent AIX and Linux, but it is not going to support an SP2 switch, like the ESMF has. Redirect console messages to a specific file of your choosing: swcons /tmp/console.messages Checking if an AIX machine is still marketed and/or supported by IBM: http://www-306.ibm.com/common/ssi/OIX.wss Like tcpdump/ethereal? iptrace -e -i lo0 /tmp/iptrace.out, ( let it run for 5 minutes, kill it) ipreport /tmp/iptrace.out # lscfg -vp | grep -e "Memory DIMM" -e "Size" Memory DIMM: Size........................256 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 /dev/lv00 secondary /dev/sysdumpnull copy directory /var/adm/ras forced copy flag TRUE always allow dump TRUE dump compression OFF Wed Oct 26 13:43:31 From a IBM AIX partner: GIL is a kernel process, which does TCP/IP timing. It handles transmission errors, ACKs, etc. Normally it shouldn't consume too much CPU, but it can take quite a lot of CPU when the system is using the network a lot (like with NFS filesystems which are heavily used). . The kproc gil runs the TCP/IP timer driven operations. Every 200ms, and every 500ms the GIL thread is kicked to go run protocol timers. With TCP up (which is ALWAYS the case), TCP timers are called which end up looking at every connection on the system (to do retransmission, delayed acks,etc). In version 4 this work is all done on a multi-threaded kproc to promote concurrency and SMP scalability.gil. GIL is one of the kprocs (kernel processes) in AIX 4.3.3, 5.1 and 5.2. Since the advent of topas in AIX 4.3.3 and changes made to the ps command in AIX 5.1, system administrators have become aware of this class of processes, which are not new to AIX. These kprocs have no user interfaces and have been largely undocumented in base documentation. Once a kproc is started, typically it stays in the process table until the next reboot. The system resources used by any one kproc are accounted as kernel resources, so no separate account is kept of resources used by an individual kproc. . Most of these kprocs are NOT described in base AIX documentation and the descriptions below may be the most complete that can be found. . GIL term is an acronym for "Generalized Interrupt Level" and was created by the Open Software Foundation (OSF), This is the networking daemon responsible for processing all the network interrupts, including incoming packets, tcp timers, etc. . Exactly how these kprocs function and much of their expected behavior is considered IBM proprietary information. In the event of a power failure, from "jessie" on the AIX-L mailing list: check you error report for an entry that states EPOW_SUS_CHRP if there is an entry post it in detail to have a look at the Power status registers, and the sense data. If it is not a true failure such as a fan, or power supply then you would notice in the logs that the problem started after a shutdown, or power failure... "pstat -S will associate processor to process but not process to processor. It is a matter of opinion if this is what you want. " Superb page on AIX: 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 Lists current dump destination. sysdumpdev -e Estimates dumpsize of the current system in bytes. sysdumpdev -L Displays information about the previous dump. sysdumpdev -c <-- the system dump device will not be compressed when the next dump is taken sysdumpdev -p (dump device) -P Sets the default dump device, permanently sysdumpdev -P -s /dev/sysdumpnull <-- makes the secondary dump device a bit bucket (recommended) sysdumpstart -p Starts a dump and writes to the primary dump device. sysdumpstart -s Starts a dump and writes to the secondary dump device. (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 # ODM Delete Command easy Step to remove a Disk odmdelete -o CuDv -q name=hdisk1 # Check the status of a mksysb tape (Guessing tape drive is rmt0) chdev -l rmt0 -a clock_size=0 mt -t /dev/rmt0.1 fsf 3 lsmksysb -c -f //dev/rmt0.1 or restore -Tvf /dev/rmt0.1 -s4 # How to remove vpath rmdev -Rdl dpo # NIM showlog command example nim -o showlog -a full_log=yes -a log_type=nimerr 530TL4spot # Command to boot from network (provided maint boot enabled in the boot server) bootlist -m normal ent0 speed=auto duplex=auto gateway=X.X.X.X bserver=X.X.X.X client=X.X.X.X ( replace x with the real IPs and speed/duplex according to your network speed settings) # Remove a mksysb image from NIM Server nim -o remove -a rm_image=yes mksysbname # Create a image.data from mksysb image restore -xvqf /images/mksysb.image ./image.data # List all ODM Definitions odmget CuAt to see all the attributes odmget CuDv to see all the devices # To remove a mirror copy from a LV /usr/sbin/rmlvcopy fslv01 1 hdisk4 hdisk5 # Creating a spot from mksysb nim -o define -t spot -a source=mksysb1 -a server=master -a location=/export/spot spot1 # Restore a file from mksysb image restore -xvqf mksysb.image ./etc/passwd or restore -xvqf mksysb.image /etc/passwd # Create an lpp source from existing directory nim -o define -t lpp_source -a server=master -a location=/export/lpp_source/530TL5lpp 530TL5lpp # Create a spot from existing lpp source nim -o define -t spot -a server=master -a location=/export/spot/530TL5spot -a source=530TL5lpp 530TL5spot # How to update a lpp source from a downloaded file sets gencopy -X -b "-qv" -d /TMP_FOR_UPDATE_CD -t /export/lpp_source/530TL6lpp/ -f ALL 2>&1 # Learn 10 good UNIX usage habits from IBM http://www-128.ibm.com/developerworks/aix/library/au-badunixhabits.html # How to find a Tape is Mksysb or not Run this command to see the list of files. If it doesn't show anything then the tape is NOT MKSYSB chdev -l rmt0 -a clock_size=0 mt -t /dev/rmt0.1 fsf 3 lsmksysb -c -f //dev/rmt0.1 or restore -Tvf /dev/rmt0.1 -s4 # To define a mksysb resource custimgname in NIM nim -o define -t mksysb -a server=master -a location=/images/custimg.img custimgname # How to find out the Physical Location of a disk lsdev -Cc disk -l hdisk0 -F "name location" # Install all software from CD /usr/sbin/installp -aX -Y -d/dev/cd0 * all # Install Atape software from utility directory /usr/sbin/installp -aX -Y -d/utility Atape* # To display BOS installation status information while the installation is progressing, run the following command on the master: lsnim -a info -a Cstate ClientName or lsnim -l ClientName # To perform a base system installaion on a machine venus (if you don't want any bosinst_data, script, fbscript. image data then just don't use them in the command line) from the NIM Server then run this nim -o bos_inst -a source=rte -a spot=530ML7SP3spot -a lpp_source=530ML7SP3lpp -a bosinst_data=No_Prompt -a script=FTPSCR -a fb_script=Install_Drivers -a accept_licenses=yes -a preserve_res=yes -a no_client_boot=yes -a set_bootlist=no -a force_push=no venus or with fewer options nim -o bos_inst -a source=rte -a spot=530ML7SP3spot -a lpp_source=530ML7SP3lpp -a bosinst_data=No_Prompt -a script=FTPSCR -a fb_script=Install_Drivers -a accept_licenses=yes -a no_client_boot=yes -a force_push=no venus Now boot the client machine from the network # To resync a logival volume in AIX. Here is an example Note down the LV IDENTIFIER root@zeus lslv hd6 LOGICAL VOLUME: hd6 VOLUME GROUP: rootvg LV IDENTIFIER: 00c8411e00004c000000011731887e00.2 PERMISSION: read/write VG STATE: active/complete LV STATE: opened/stale TYPE: paging WRITE VERIFY: off MAX LPs: 512 PP SIZE: 128 megabyte(s) COPIES: 2 SCHED POLICY: parallel LPs: 2 PPs: 4 STALE PPs: 2 BB POLICY: non-relocatable INTER-POLICY: minimum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: N/A LABEL: None MIRROR WRITE CONSISTENCY: off EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO Now run this command on the STALE LV root@zeus lresynclv -l 00c8411e00004c000000011731887e00.2 Or this script will resync all the Logical Volume of all Volume Groups Modify this as per your requirement. This one I created for our test environment and so far seems to be working in test environment. Please test it in a test box before you use lsvg|while read VG do lsvg l $VG|awk '{print $1}' done|sed -e '/LV/d' -e '/\:/d'|while read LV do lslv $LV|grep 'LV IDENT'|awk '{print $3}' done|while read LVIDENT do lresynclv -l $LVIDENT done # To add all the filesets on /dev/cd0 to NIM lpp source 530TL5lpp nim -o update -a package=all -a source=/dev/cd0 530ML5lpp # To add all the filesets from a directory /utility/aixml to NIM lpp source 530TL5lpp nim -o update -a package=all -a source=/utility/aixml 530ML5lpp # How to create a NIM LPP Source from CD To create from an existing directory use the full path of the existing directory ex. /export/lpp_source/510ML2lpp instead of /dev/cd0 gencopy -X -b "-qv" -d /dev/cd0 -t /export/lpp_source/510ML8lpp -f file 2>&1 # How to create a lpp_source from existing directory i,e /export/lpp_source/520TL10SP2lpp nim -o define -t lpp_source -a server=master -a location=/export/lpp_source/520TL10SP2lpp 520TL10SP2lpp # NIM Network boot problem # smitty nim_control_boot ==> >> Limit Boot Image Creation to Defined Interfaces? >> It was currently set to "NO" # Booting a Client from NIM Server in diagnostics mode from the command line Follow this procedure for performing the diag operation from the master and client. To perform the diag operation from the client, enter: nimclient -o diag -a spot=SPOTName To perform the diag operation from the master, enter: nim -o diag -a spot=SPOTName MachineObjectName # How to restore a Customer non bootable mksysb image to Client M/C (Try to use the next procedure in NIM Server and try NIM load instead) Don't try restbyname in NIM Server. It will overwrite all the NIM server data with the tape Image. now either use tctl or mt ( Guessing we are using rmt0) If you want to restore in client M/C itself then tctl -f /dev/rmt0.1 rewind tctl -f /dev/rmt0.1 fsf 3 restbyname -xqf /dev/rmt0.1 # How to create a NIM Image from Customer mksysb Tape In NIM Server check a filesystem with at least 5-6 GB free space. I prefer seperate filesystem for this. Let us guess we are using /export/mksysb directory so cd to /export/mksysb and restore the image from tape for the Server venus cd /export/mksysb chdev -l rmt0 -a block_size=0 (To make sure it can read any block size) mt -t /dev/rmt0.1 fsf 3 dd if=/dev/rmt0.1 of=/images/mksysb.venus bs=4m and use this image. using 4m to avoid any dd buffer error. nim -o define -t mksysb -a server=master -a location=/export/mksysb.venus\ venus_mksysb # Now initiate the MKSYSB installation for the client venus nim -o bos_inst -a source=mksysb -a mksysb=venus_mksysb -a spot=530ML7SP3spot -a lpp_source=530ML7SP3lpp -a accept_licenses=yes -a no_client_boot=yes -a force_push=no venus All these informations might not be necessary. We normally use in our environment to allocate the mksysb and necessary lppsource & spots. In our NIM definition our bosinst.data is called No_Prompt, our Script is called as FTPSCR and FB Script is called Install_Drivers. These are just names but does lot more than then their names say. nim -o allocate -a source=mksysb -a mksysb=mksysb.venus -a lpp_source=530TL5lpp -a spot=530TL5spot -a bosinst_data=No_Prompt -a script=FTPSCR -a fb_script=Install_Drivers -a accept_licenses=yes -a boot_client=no venus # How to display NIM Machines lsnim -c machines # If NFS Mount failes to mount with following error message - RPC: 1832-019 Program not registered Then -> Run on the client. And if both the server & client is new then run on both uncomment portmap in /etc/rc.tcpip if not already done make sure rc.nfs is not commented out in /etc/inittab stopsrc -g nfs startsrc -s portmap /etc/rc.nfs Now it should mount. # Installing Aix when booting from a mksysb tape fails If a backup tape fails to boot, you can still install by using a mksysb image stored on the tape. Access the firmware command line prompt, which usually appears as an option in the SMS menus. At the firmware command line prompt, type following two commands: setenv real-base 1000000 reset-all The system will then reboot, and you will be able to boot from tape, assuming that you have an valid boot image on your tape media. # Create a Filesystem using command line mkvg -y testvg hdisk1 mklv -y testlv testvg 500 hdisk1 (500 is 500 LP ) chlv -t jfs2 testlv crfs -v jfs -a nbpi=16384 -A yes -d testlv -p rw -m /custimg crfs -v jfs2 -A yes -d testlv -p rw -m /custimg or Create aJFS2 filesystems on VG testvg with size 10MB mount point /fs1 with adding entry in /etc/filesystems crfs -v jfs2 -g testvg -a size=10M -m /fs1 -A yes # ODM command to delete network. odmdelete -q name = en0 -o CuAt odmdelete -q parent = en0 -o CuDv odmdelete -q name = en0 -o CuDv odmdelete -q name = en0 -o CuDep odmdelete -q dependency = en0 -o CuDep odmdelete -q value1 = en0 -o CuDvDr odmdelete -q value3 = en0 -o CuDvDr odmdelete -q name=inet0 -o CuAt # Etherchannel problem after loading the server from Customer mksysb tape You must remove the ODM entries first before you configure etherchannel run this on the correct network interface. Ex. en0 odmdelete -q name=en0 -o CuAt odmdelete -q name=inet0 -o CuAt # How to remove a failed Disk from ODM If you have been working with a PVID value rather than with an hdisk name, ensure that the PVID is removed from the ODM with the following command. The 32-digit value supplied consists of the PVID plus 16 zeros. For example: odmdelete -q value=0073659c2c6d26f10000000000000000 -o CuAt ( add 16 zeros) To get the PVID run lsvg -p vgname Then run rmlvcopy 1 0073659c2c6d26f1 (16 Digit PVID) # Restoring tar backup with absolute pathname to different directory A tar backup created using absolute path names can only be restored to the directory from which it was created. One way to restore it to a different directory is by using the pax command. For example, suppose you receive a tar tape created using absolute path names: tar -cvf /dev/rmt0 /work/* but want to restore it to the /test directory. The pax command would be: pax -rf /dev/rmt0 -s/work/test/p The -s/work/test/p does the directory change. # Determine the path to your system's error log file by running the following command: /usr/lib/errdemon -l # To change the maximum size of the error log file enter: /usr/lib/errdemon -s LogSize # To change the size of the error log device driver's internal buffer, enter: /usr/lib/errdemon -B BufferSize # To list all events for which logging is currently disabled, enter: errpt -t -F Log=0 # To list all events for which reporting is currently disabled, enter: errpt -t -F Report=0 # IBM 3494 Library testing commands mtlib -l /dev/lmcp0 -D -E mtlib -l /dev/lmcp0 -qM look man mtlib for more options # Vpaths not created for all hdisks of an AIX host or missing vpaths for some hdisks. In some cases a customer may notice that some hdisks are not associated with any vpaths. Or a customer may not see the expected number of vpaths for the number of hdisks that they have on their AIX host. In either case the problem could be caused by the fact that the hdisks with no vpath association are listed in a file called /etc/vpexclude. If this file exists a customer can remove the file and run cfgmgr and the hdisks will now be associated with vpaths. The only way that the vpexclude file can be created is if a customer runs a querysn command on the AIX host or if the customer manually edits the /etc/vpexclude file to include the hdisks. # Resetting the NIM state from the command line Follow this procedure for resetting the NIM state from the command line. To return a machine to the ready state, enter: nim -Fo reset MachineName To deallocate resources, enter: nim -o deallocate -a subclass=all MachineName # Recovering the /etc/niminfo file from the command line nimconfig -r # To list all duplicate and conflicting updates in the /myimages image source directory /usr/lib/instl/lppmgr -d /myimages -u # To remove all duplicate and conflicting updates in the /myimages image source directory, type: /usr/lib/instl/lppmgr -d /myimages -u -r # How to change the console to tty0 if tty0 not available smitty devices add a tty tty rs232 Asynchronous terminal sa0 in next screen select port to 0, baud rate to 9600 and Enable Login to enable and hit enter Now run smitty console and change the device from /dev/lft0 to /dev/tty0 # To attempt to boot through a gateway using Ethernet with Duplex & speed Auto, and then try other devices, enter: Bserver=Boot Server, may be your NIM Server too. Even if you don't have a gateway you need to mention it. In that case use 0.0.0.0 as gateway. And client is ther Server you want to load from NIM bootlist -m normal ent0 speed=auto duplex=auto gateway=192.168.0.1 bserver=192.168.0.10 client=192.168.0.45 hdisk0 rmt0 # ODMDELETE COMMAND TO DELETE NIM OBJECTS Suppose you want to delete the entry with TRYME mksysb and lsnim shows the name as mksysb.TRYME and you are unable to delete it normal way. MAKE SURE YOU BACKUP NIM DATABSE BEFORE THIS. READ THE LAST LINE TOO. OTHERWISE NIM SERVER WON"T WORK odmget nim_attr >/tmp/nim_attr.out vi /tmp/nim_attr.out and look for TRYME entry Note down the id no for Ex. id=1161733976 odmdelete -o nim_attr -q id=1161733976 Now Delete it from nim_objects odmget nim_objects >/tmp/nim_objects.out vi that file and note down the id for TRYME odmdelete -o nim_object -q id=1162344443 now from websm screen or smitty nim add the routing information to NIM MASTER object resources -> master ->properties ->nim interface. ( Add the interface again) # Extend a filesystem in AIX command line Suppose you want to extend /usr file system to 4GB chfs -a size=4G /usr or chfs -a size=4000M /usr or you want to add some more space like 2GB with existing size chfs -a size=+2G /usr You can extend the root file system same way. Suppose the new size you want is 2GB then chfs -a size=2G / or chfs -a size=2000M / # Sendmail Warning: .cf file is out of date: sendmail AIX5.3/8.13.4 supports version 10, .cf file is version 9 Solution : vi /etc/mail/sendmail.cf and change V9 to V10 # How to erase complete data from a disk on aix 5.2 TL6 and 5.3TL4 diag -d hdiskX -T format # How to make IP changes permanent from command line /usr/sbin/mktcpip -h'P550B_LP01' -a'30.3.0.120' -m'255.255.0.0' -i'en2' -g'30.3.0.120' # How to copy from one streaming tape to a another tape tcopy /dev/rmt0 /dev/rmt1 # How to check integrety of a tape tapechk # How to display all the VLAN Adapter lsdev -Cc adapter -t eth -s vlan # How to use BSD style network setting in AIX smit configtcp fast path and then select BSD Style rc Configuration. and configure the /etc/rc.bsdnet file using a standard text editor. # How to check the last fsck log of /utility filesystem /sbin/helpers/jfs2/fscklog /utility # How to check the inode status of a file or inode or to check last accessed time etc /sbin/helpers/jfs2/istat /etc/passwd or /sbin/helpers/jfs2/istat 40 /dev/hd4 ( to check inode 40 of /dev/hd4) # How to cleanup deleted ODM spaces /usr/samples/odm/odmclean -d CuDvDr # How to find which fileset contains a particular binary for example ls lslpp -w /usr/bin/ls # To display if the hardware is 32-bit or 64-bit, type: bootinfo -y # How to change AIX OS from 32 bit kernel to 64 Bit kernel ln -sf /usr/lib/boot/unix_64 /unix ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix bosboot -ad /dev/ipldevice shutdown -r # How to know if the kernel is 32-bit enabled or 64-bit enabled ? bootinfo -K # How to lock and unlock a user To unlock chuser account_locked=false user or chsec -f /etc/security/user -a account_locked=false -s user To lock chuser account_locked=true user or chsec -f /etc/security/user -a account_locked=true -s user # How to define whether the user name should be echoed on a port vi /etc/security/default stanza and change usernameecho = false or chsec -f /etc/security/login.cfg -s default -a usernameecho=false # How to change the password prompt for example chsec -f /etc/security/login.cfg -s default -a pwdprompt="Enter your Password now: # How to change login prompt from telnet session like it will display the words in quote chsec -f /etc/security/login.cfg -s default -a herald="Enter your user ID now: # How to supress the login messages touch .hushlogin # How to save current network parameter options for next boot /usr/sbin/tunsave -a -F nextboot -t no # How to reset a user as is failed login count chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s 'asis' # How to restore a file from a savevg backup /usr/bin/restorevgfiles -s -r -f'/dev/rmt0' -b'4096' -a'' /etc/passwd # How to preview information about a savevg backup with block size 4MB listvgbackup -l -f'/dev/rmt0' -b'4096' -a'' # What is the command to create VG on VPATH device mkvg4vp # What is the command to add a Datapath PV to a vg extendvg4vp # How to identify a PCI Slot at U1.5-P2-I8 drslot -c pci -i -s 'U1.5-P2-I8' # How to display all graphics adapters in a machine lsdisp # How to display all Read Write Optical Device List ( Optical Jukebox) lsdev -Cc rwoptical # How to add path to available Data Path Devices /usr/sbin/addpaths # How to define and configure all Data path Devices /usr/lib/methods/cfcallvpath # How to display all the vpath devices lsdev -Cc disk -s dpo -t vpath # How to display Data Path Device Configuration lsvpcfg # How to configure a defined tty mkdev -l tty0 # How to display the PMTU table pmtu display or netstat -in # How to display all locked users (including system users) usrck -l ALL (lowercase L) # How to generate hardware and software inventory of a server /usr/sbin/geninv -c or /usr/sbin/geninv -l # How to display and change setting of the core files lscore - to diplay settings chcore - to change settings # How to search for and correct physical partitions that are stale or unable to perform I/O operations on rootvg. ( Look manual for more options for this command) mirscan -v rootvg # How to determine the status of your system battery diag -B -c # How to run diggonostics on all SCSI devices without user action diag -S 5 -c # How to determine if the 64-bit kernel extension is loaded ? genkex |grep 64 # Restore a Backup by Name To restore a remote backup archive by name, use the following command: rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | restore -xvqdf- pathname # Restore a Backup by inode To restore a remote backup archive by inode, use the following command: rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | restore -xvqf- pathname # Restore a Remote cpio Archive To restore a remote archive created with the cpio command, use the following command: rsh remotehost "dd if=/dev/rmt0 ibs=blocksize obs=5120" | cpio -icvdumB # Restore a tar Archive To restore a remote tar archive, use the following command: rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | tar -xvpf- pathname # Restore a Remote Dump To restore a remote dump of the /myfs file system, use the following command: cd /myfs rrestore -rvf remotehost:/dev/rmt0 # Backup by Name To remotely create a backup archive by name, use the following command: find pathname -print | backup -ivqf- | rsh remotehost "dd of=/dev/rmt0 bs=blocksize conv=sync" # To remotely create a backup archive by inode, first unmount your file system then use the backup command. For example: umount /myfs backup -0 -uf- /myfs | rsh remotehost "dd of=/dev/rmt0 bs=blocksize conv=sync" # Create and Copy an Archive to Remote Tape To create and copy an archive to the remote tape device, use the following command: find pathname -print | cpio -ovcB | rsh remotehost "dd ibs=5120 obs=blocksize of=/dev/rmt0" # Create a tar Archive remotely : tar -cvdf - pathname | rsh remotehost "dd of=/dev/rmt0 bs=blocksize conv=sync" # Create a Remote Dump remotely. To create a remote dump of the /myfs file system, use the following command: rdump -u -0 -f remotehost:/dev/rmt0 /myfs # How to compare two directory dircmp /dir1 /dir1 # How to identify if a file is sparsely-allocated, for ex. /etc/passwd. fileplace -v /etc/passwd # How to display the placement of file blocks within logical or physical volumes Ex. fileplace -v /usr/bin/ls fileplace -p /usr/bin/ls ( Will display the PV it resides in) # How to verify the list of bootable PVs : ipl_varyon -i # How to display the filesystems in a volume group lsvgfs rootvg # How to display the jfs/jfs2 file systems, run lsjfs or lsjfs2 # How to clean up a failed software installation installp -C # How to unlock a rootvg putlvodm -K `getlvodm -v rootvg` # How to run 64BIT application on 32 bit kernel Smitty -> System Environments ->Enable 64bit Application environment or /etc/methods/cfg64 and run the following command mkitab "load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs" # How make AIX replying to broadcast ping run this command no -o bcastping=1 # How to out the Status of VGDA of rootvg and hdisk0 lqueryvg -g `getlvodm -v rootvg` -At -p hdisk0 # How to change a users attribute like pasword length chsec -f /etc/security/user -s sid -a minlen=8 or chuser minlen=8 sid # How to determine the tape block size Use the dd command to read a single block from the device and find out what block size is used for the archive: dd if=/dev/rmt0 bs=128k count=1 | wc -c This will return to you the size in bytes of the block being read. Assuming that your backup was made with the same physical block size, you can change your device to use this block size. or Use the tcopy command as follows to find out the block size: # tcopy /dev/rmt0 tcopy : Tape File: 1; Records: 1 to 7179 ; size:512 tcopy : Tape File: 1; End of file after :7179 records; 3675648 bytes # How to mirror a terminal portmir -t pts/0 ( To start) portmir -o (To stop) # How to restart inetd refresh -s inetd # How to identifying the current run level at the command line: # cat /etc/.init.state 2 or who -r # How to displays the names of the files added to the system during installation of the specified fileset. for Ex. openssh lslpp -f openssh.base.server # How to list all the softwares in a cdrom ( To display directory use the path) installp -L -d /dev/cd0 # How to configure STK L700 Library with AIX for Veritas Netbackup 6 You need to know two things first 1. Which fcs card you zoned the Fiber Robotic device For Example fcs0 or fcs1 2. FCID of the robot. Which you will find from the Fiber switch in the Zone it will look like 0x242DB1 Now you need to run 1) /usr/openv/volmgr/bin/driver/install_ovpass 2) mkdev -c media_changer -t ovpass -s fcp -p fscsi0 -w 0x0242DB1,0 (fcsi0 if connected to fcs0, fscsi1 if fcs1 , FCID from Fiber Switch, add ,0 after that) 3)/usr/openv/volmgr/bin/scsi_command -d /dev/ovpass0 -inquiry (will show the robot) 3)/usr/openv/volmgr/scan will give you details of the robot if added correctly Then run the netbackup Admin GUI #jnbSA& And discover everything from the main menu wizard. Don't go to device robot. Most of the types veritas discover devices including robots correctly