50324831 Aix

Embed Size (px)

DESCRIPTION

hmmm

Citation preview

  • 5/21/2018 50324831 Aix

    1/182

    LAST CHANGE : 07.01.2010OS 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_formhttp://publib16.boulder.ibm.com/pseries/en_US/infocenter/base/errorsearch.htmhttp://www.aixtips.com/AIXtip/http://www.rootunix.org/AIX/http://www.rootvg.net/ledlist.htmhttp://www.ibm.com/developerworks/aix/http://www.ibm.com/developerworks/forums/forum.jspa?forumID=747http://www.perzl.org/aix/

    ################ AIX 6 Support###############

    AIX V6.1 exclusively supports 64-bit Common Hardware Reference Platform(CHRP) machines with selected processors:PowerPC 970POWER4POWER5POWER6To 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

    POWER3604

    ######################## commandline or smitty#######################Wer sich nicht sicher ist, unterintern:http://uriel/austausch/betrieb/os/aix/doc/all_fast_path.txtextern:http://www.hdkutz.de/os/aix/all_fast_path.txtsind alle smitty-menues (Menue smitty Befehl) aufgelistet.

    Beispiel:Processes processAufruf smitty processDurch den smitty werden Kommandos teilweise automatisch vervollstaendigt, so dasein 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 andoslevel returns 4.3.3.0.

  • 5/21/2018 50324831 Aix

    2/182

    instfix -ik 4330-04_AIX_ML *checks* that all filesets are installedfor ML 04 on AIX 4.3.3 and returns a success / failure messageand instfix -ic | pg will list the fields keyword name, fileset name,required level, installed level, status, and short abstract for eachfileset installed - the status field allows you to identify whichfilesets 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 andML 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 the4330-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, youcan 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 -vroot@cws [~]# instfix -ik IX78215 -vIX78215 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

  • 5/21/2018 50324831 Aix

    3/182

    IY30887 SDK 1.3.1 32-bit PTF 1IY31033 SDK 1.3.1 32-bit PTF 0 : ca131w-20020404IY31312 CANNOT 2 COMPILE RPC WRAPPERS IN 64BIT ON AIX 5IY31879 SYS/SHM.H 2 HEADER SHOULD NOT DEFINE _ALL_SOURCEIY32007 STR() 2 OF OSTRSTREAM FREEZESIY32852 JULY 2 2002 C++ RUNTIME PTFIY33524 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 allemgr -l

    ID STATE LABEL INSTALL TIME ABSTRACT=== ===== ========== ================== ======================================1 S IY64691ML4 12/15/04 14:23:08 chvg -B causes corruption2 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 fixemgr -L 84597

    # installemgr -e IYxxx

    # show locks

    emgr -P

    # uninstallemgr -r -L LABELNAME

    ####### suma####### download TLsuma -x -a DLTarget=/export/fixes/530TL07 -a Action=Download -a RqType=TL -a RqName=5300-07

    # download specific fixessuma -x -w -a Action=Preview -a RqType=APAR -a RqName=IY70298Task ID 1 created.The download list contains one or more fixes known to cause a regression: U809929

    # download fixessuma -x -w -a Action=Download 1The 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

  • 5/21/2018 50324831 Aix

    4/182

    Download SUCCEEDED: /usr/sys/inst.images/installp/ppc/ICU4C.rte.5.3.0.60.bffDownload SUCCEEDED: /usr/sys/inst.images/installp/ppc/Java131.adt.includes.1.3.1.5.bff

    # unschedule tasksuma -u 1# delete task

    suma -d 1

    ########## oslevel########## oslevel -r -qKnown Recommended Maintenance Levels------------------------------------4330-084330-074330-064330-05

    4330-044330-034330-024330-014320-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=0274get 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.rpt-rw-r--r-- 1 root system 0 Feb 20 17:28 /tmp/lowerthanmaint.rpt

    ab 5.2smitty compare_report

    ##################### compare 2 machines##################### lslpp -qLc >/tmp/lslpp_machine1.outcopy 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)

  • 5/21/2018 50324831 Aix

    5/182

    ##################################### update script fuer ml oder patches####################################AIX 5regatta1:/> 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.# checkinstall_all_updates -pYcd.# doinstall_all_updates -Ycd.

    ############################## update rpm packages toolbox#############################

    updtvpkg

    ##################################### restore particular file from mksysb#####################################AIX 3tctl -f /dev/rmt0 fsf 3 < moves tape forward from the mksysb files>tar -xvf /dev/rmt0 /etc/passwd < extracts the file >AIX 4tctl -f /dev/rmt0 rewindrestore -s4 -xqvf /dev/rmt0.1 ./var/spool/cron/crontabs/root

    Tapeinhalt mksysb anschauen# restore -s4 -Tvqf /dev/rmt0.1 | tee filenameoder# restore -s4 -Tvqf /dev/rmt0 > file

    what command will eject tape from tapedrive ?tctl -f /dev/rmt0 rewofflmt -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 wayrather than attempting to read the tape directly with various backupcommand. Read a small portion of the tape using the "dd" command, then using

  • 5/21/2018 50324831 Aix

    6/182

    the "file" command to attempt to determine the format of the archive.

    For example :

    # dd if=/dev/rmt0 of=/tmp/tape.data count=44 + 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 talkto a tape device. But you can edit a copyof the script, or just butcher it, to achieve what you want. If youwant a bootable tape, you will have to emulate thescript 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, thebackup itself, with bs=1024.

    Techniques likersh 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) rshremote "chdev -l rmt0 -a block_size=1024"

    The above command often rewind the tape, so to avoid overwriting thefirst 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 accessjust now, so I've put ... . Make f the lastoption on backup, follow with space and - to direct backup output tostdout, 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 p2. 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 thatyou do not want backed up. Example:b508 spaldst /home/spaldst

    >cd /etcb508 spaldst /etc>ls -l exclude.rootvg

  • 5/21/2018 50324831 Aix

    7/182

    -rw-r--r-- 1 root system 54 Sep 13 07:36 exclude.rootvgb508 spaldst /etc>cat exclude.rootvg/mkcd/mksysb_image/mkcd/cd_fs/mkcd/cd_images/cdrom

    http://www-03.ibm.com/support/techdocs/atsmastr.nsf/84279f6ed9ffde6f86256ccf00653ad3/b75a2f3717807e9d86256fcd004ec329?OpenDocumenthttp://www.dvddemystified.com/dvdfaq.html#4.3Maxell DVD-RAM 4.7GB single sided,rewriteable mediaPart number 636070Script to write mksysb to DVDecho '************************************************************'

    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 rewindtctl -f /dev/rmt0.1 fsf 3dd if=/dev/rmt0.1 of=/mksysb/clone.image bs=

    ############### listvgbackup############### listvgbackup -l -f /mksys/maschine/mksys-maschine-050317VOLUME GROUP: rootvgBACKUP DATE/TIME: Thu Mar 17 23:30:03 NFT 2005UNAME INFO: AIX maschine 3 4 0045C95A4C00BACKUP OSLEVEL: 4.3.3.75

    MAINTENANCE LEVEL:BACKUP SIZE (MB):SHRINK SIZE (MB):VG DATA ONLY: no

    # listvgbackup -l -f /mksys/maschine/mksys-maschine-041130VOLUME GROUP: rootvgBACKUP DATE/TIME: Tue Nov 30 17:05:32 MEZ 2004UNAME INFO: AIX maschine 2 5 0055CCFA4C00BACKUP OSLEVEL: 5.2.0.40MAINTENANCE LEVEL: 5200-03BACKUP SIZE (MB): 29952SHRINK SIZE (MB): 16886

    VG DATA ONLY: no

    rootvg:

  • 5/21/2018 50324831 Aix

    8/182

    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINThd5 boot 1 1 1 closed/syncd N/Ahd6 paging 9 9 1 open/syncd N/Ahd8 jfs2log 1 1 1 open/syncd N/Ahd4 jfs2 1 1 1 open/syncd /hd2 jfs2 88 88 1 open/syncd /usrhd9var jfs2 33 33 1 open/syncd /var

    hd3 jfs2 32 32 1 open/syncd /tmphd1 jfs2 1 1 1 open/syncd /homehd10opt jfs2 1 1 1 open/syncd /optapp01LV jfs2 32 64 2 open/syncd /usr/app/oraclepaging00 paging 7 7 1 open/syncd N/Alocal01LV jfs2 10 10 1 open/syncd /usr/localaudit01LV jfs2 2 2 1 open/syncd /audithd7 dump 119 119 1 open/syncd N/Ahd77 dump 119 119 1 open/syncd N/Aapp02LV jfs2 80 160 2 open/syncd /usr/app/oracle/product/8.1.7app03LV jfs2 144 288 2 open/syncd /usr/app/oracle/pr

    oduct/9.2.0

    ###################### doing remote backup#####################Backup to a remote tape drive# rdump -fsystemwithdrive:/dev/rmt0 /data_to_backupOR# tar -cvBf - . | rsh hostname dd of=/dev/rmt0 ibs=20ORTO 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 RESTOREcd "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 first4KB block of a raw device, as the AIX Logical Volume Manager uses it. It isfaster to back up with a block size of larger than 4KB. A good block size to usewhen backing up to tape is 256KB. The following is a sample script that can beused 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

  • 5/21/2018 50324831 Aix

    9/182

    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 thecommands: 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 Scriptaustausch/betrieb/os/aix/scripte/vg_recoverygesichert.Die Dateien liegen dann unter /usr/local/vgdata/

    Diese Infos koennen dann ueberrestvg -q -f /usr/local/vgdata/vg01zurueckgeholt 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 upBacking up 10 filesBacking up to /usr/local/vgdata/ipasvgp05Cluster 51200 bytes (100 blocks).Volume 1 on /usr/local/vgdata/ipasvgp05a c 265 ./ata/vgdata.files38786a 265 ./tmp/vgdata/vgdata.filesa 3758 ./tmp/vgdata/ipasvgp05/filesystemsa 0 .a 4786 ./tmp/vgdata/ipasvgp05/ipasvgp05.dataa 18 ./tmp/vgdata/ipasvgp05/logipasvgp05.map

    a 2700 ./tmp/vgdata/ipasvgp05/lvipasinfopool.mapa 36 ./tmp/vgdata/ipasvgp05/testlv01.mapa 36 ./tmp/vgdata/ipasvgp05/testlv02.mapa 36 ./tmp/vgdata/ipasvgp05/testlv03.map

    total size: 11900Done 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 ontothe 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

  • 5/21/2018 50324831 Aix

    10/182

    reating list ofk upBacking up 8 filesBacking up to /usr/local/vgdata/ipasvgp04Cluster 51200 bytes (100 blocks).Volume 1 on /usr/local/vgdata/ipasvgp04a 191 ./tmp/vgdata/vgdata.files39186a 191 ./tmp/vgdata/vgdata.filesa / 3758 ./tmp/vgdasvgp04/filesystems

    a 0 .a 2936 ./tmp/vgdata/ipasvgp04/ipasvgp04.dataa 18 ./tmp/vgdata/ipasvgp04/logipasvgp04.mapa 90 ./tmp/vgdata/ipasvgp04/lvsironp01.mapa 90 ./tmp/vgdata/ipasvgp04/lvsironp11.map

    total size: 7274Done 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 ontothe 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 upBacking up 9 filesBacking up to /usr/local/vgdata/ipasvgp03Cluster 51200 bytes (100 blocks).Volume 1 on /usr/local/vgdata/ipasvgp03a 226 ./tmp/vgdata/vgdata.files34008a 226 ./tmp/vgdata/vgdata.filesa 3758 ./tmp/vgdata/ipasvgp03/filesystemsa 0 .a 4764 ./tmp/vgdata/ipasvgp03/ipasvgp03.dataa 17 ./tmp/vgdata/ipasvgp03/logipasvgp03.map

    a 6101 ./tmp/vgdata/ipasvgp03/lvipasp11.mapa 3528 ./tmp/vgdata/ipasvgp03/lvipasp12.mapa 1476 ./tmp/vgdata/ipasvgp03/lvipasp13.map

    total size: 20096Done 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 disks 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..

    Creatinglist of files to back upBacking up 9 filesBacking up to /usr/local/vgdata/ipasvgp02Cluster 51200 bytes (100 blocks).Volume 1 on /usr/local/vgdata/ipasvgp02a 226 ./tmp/vgdata/vgdata.files38848a 226 ./tmp/vgdata/vgdata.filesa 3758 ./tmp/vgdata/ipasvgp02/filesystemsa 0 .a 4743 ./tmp/vgdata/ipasvgp02/ipasvgp02.dataa 17 ./tmp/vgdata/ipasvgp02/logipasvgp02.mapa 5967 ./tmp/vgdata/ipasvgp02/lvipasp01.map

    a 3332 ./tmp/vgdata/ipasvgp02/lvipasp02.mapa 1394 ./tmp/vgdata/ipasvgp02/lvipasp03.map

    total size: 19663

  • 5/21/2018 50324831 Aix

    11/182

    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 ontothe 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/ipasvgp01Cluster 51200 bytes (100 blocks).Volume 1 on /usr/local/vgdata/ipasvgp01a 190 ./tmp/vgdata/vgdata.files34022a 190 ./tmp/vgdata/vgdata.filesa 3758 ./tmp/vgdata/ipasvgp01/filesystemsa 0 .a 2905 ./tmp/vgdata/ipasvgp01/ipasvgp01.dataa 17 ./tmp/vgdata/ipasvgp01/logipasvgp01.map

    a 833 ./tmp/vgdata/ipasvgp01/lvoraclep01.mapa 102 ./tmp/vgdata/ipasvgp01/lvuc4p01.maptotal 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 ontothe disks specified in the vgname.data file contained within the backup image,enter: restvg -f/usr/local/vgdata/ipasvgp01xipasp01#pwd/usr/local/vgdataxipasp01#lltotal 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

  • 5/21/2018 50324831 Aix

    12/182

    # u --> An older filer replaces newer# v --> verbose

    bash-2.03$ find . -depth -print |cpio -oc | /usr/local/bin/ssh -q [email protected] "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 40000ls -l /dev | grep rammkfs -V jfs /dev/ramdiskxmkdir /ramdiskxmount -V jfs -o nointegrity /dev/ramdiskx /ramdiskx

    where x is the logical RAM disk number. To remove a RAM disk, use the rmramdiskcommand. 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 app01VGInitializing 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 thecreation 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

  • 5/21/2018 50324831 Aix

    13/182

    /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

  • 5/21/2018 50324831 Aix

    14/182

    /usr/local/bin/tar -czvf /dev/rmt0 --files-from ./files.2000wobei files.2000 die Namen der zu sichernden Dateien enthaeltstandard-tarfind /data -name "200012*" -print > /tmp/tar.includetar -czvf /backup/backup.tgz -I /tmp/tar.includegtar -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 OptionsAutoAccounting/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 Ipersonnaly find that the emacs mode is much more user friendly for lineediting in ksh. One of its greatest interest is almost undocumented : youmay have aliases to use the arrow keys for line editing. Try these fivelines in your .kshrc (or whatever filename your ENV variable contains) :set -o emacsalias __A=^P # cursor upalias __B=^N # cursor downalias __C=^F # cursor right

    alias __D=^B # cursor leftThe first __ (double _) replaces the ^[ sent by the vt100 mode function keysin 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 thecommands history and through the lines. You may never wanna come back to vimode...

    ######################### ksh command completion########################

    ksh can do this too:esc + \ --> completes the commandesc + = --> gives a list of options with full path

  • 5/21/2018 50324831 Aix

    15/182

    ################ 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 tothe old level using: smitty reject

    ############################ install maintenance level###########################smitty update_all

    Einzelne Fixes installierensmitty update_by_fix

    Fixe auflistensmitty install_list_problems

    ################### login verhindern##################touch /etc/nologin

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

    # failed logins ermitteln#########################/usr/sbin/acct/fwtmp < /etc/security/failedlogin | more

  • 5/21/2018 50324831 Aix

    16/182

    oderwho /etc/security/failedloginsudo 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 [email protected]

  • 5/21/2018 50324831 Aix

    17/182

    SU 12/02 15:52 - pts/13 user05-rootSU 12/02 15:53 - pts/13 user05-rootSU 12/03 10:10 - pts/20 user08-rootSU 12/04 09:54 - pts/11 user06-rootSU 12/05 10:15 - pts/21 user03-rootSU 12/05 16:05 - pts/17 user08-rootSU 12/06 11:45 - pts/19 user03-root

    ############ chuser id###########chuser id=neue_id userfind / -user alte_id -exec chown name {} \;

    ################ chuser ulimit###############USER=/usr/bin/chuser fsize=-1 $USER

    /usr/bin/chuser core=0 $USER/usr/bin/chuser stack=-1 $USER/usr/bin/chuser data=-1 $USER

    ############################### root pw ermitteln per telnet##############################iptrace -a -e -p 23 /tmp/iptrace.log

    warten bis per telnet login erfolgt ist

    dannkill -15 `ps -ef|grep iptrace|awk '{print $2}'`

    ipreport -ns /tmp/iptrace.log |more

    ######################## copy PVID duplication#######################You can change the PVID when the VG is exported using "chdev -l hdiskX -a pv=clear; chdev -l hdiskX -a pv=yes", but there is no way to change the VGID on the disk.Changing it in the ODM database will just make it out of sync with the disk.

    If I were you, I'd start over. Create a new VG and use cplv to copy all of the logical volumes to the new VG, then edit the /etc/filesystems file to create moun

    tpoints for the filesystems using the new LV names that will be assigned.

    If you have no need to keep both VGs around, you might do just as well making abackup of the data, replacing the disks, remaking the VG and filesystems, thenrestoring the data. If you need help with that, check out either Storix, savevg(AIX command) or Sysback.

    ##################################### hdisk tausch anschliessend problem####################################root@KAH82:/>extendvg rootvg hdisk10516-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

  • 5/21/2018 50324831 Aix

    18/182

    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 rootvgPassword:kutz@KAH82 /home/kutz> sudo synclvodm -Pv rootvgsynclvodm: 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

  • 5/21/2018 50324831 Aix

    19/182

    orfind . | 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 nfsdchnfs -n for nfsdchnfs -b for biodThis will make the change instantly and for each subsequent re-bootstartsrc -s nfsd

    ####################### nfs export directory######################aixinstall0:/# /usr/sbin/mknfsexp -d '/export/conf' -t 'rw' -c 'aixinstall1,aixi

    nstall2,aixinstall3,aixinstall4,aixinstall5' -r 'aixinstall1,aixinstall2,aixinstall3,aixinstall4,aixinstall5' '-B'/export/conf root=aixinstall1:aixinstall2:aixinstall3:aixinstall4:aixinstall5,access=aixinstall1:aixinstall2:aixinstall3:aixinstall4:aixinstall5Exported /export/conf

    changekurzschlus:/#chnfsexp -d '/export/nim/scripts/aixinstall1.script' -c 'aixinstall1' -r 'aixinstall1' -B/export/nim/scripts/aixinstall1.script ro,root=aixinstall1,access=aixinstall1exportfs: 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 thetrick, 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 portbelow 1024 and AIX 4.3 does by default use ports above 1024. You can usethe nfso command to restrict AIX to the reserved port range as follows: nfso -o nfs_use_reserved_ports=1This comes from some AIX FAQ somewhere.

    check name resolution !!!

    # nfso -aportcheck= 0

  • 5/21/2018 50324831 Aix

    20/182

    udpchecksum= 1nfs_socketsize= 60000nfs_tcp_socketsize= 60000nfs_setattr_error= 0nfs_gather_threshold= 4096nfs_repeat_messages= 0nfs_udp_duplicate_cache_size= 0

    nfs_tcp_duplicate_cache_size= 0nfs_server_base_priority= 0nfs_dynamic_retrans= 1nfs_iopace_pages= 0nfs_max_connections= 0nfs_max_threads= 8nfs_use_reserved_ports= 0nfs_device_specific_bufs= 1nfs_server_clread= 1nfs_rfc1323= 0nfs_max_write_size= 0nfs_max_read_size= 0

    nfs_allow_all_signals= 0nfs_v2_pdts= 1nfs_v3_pdts= 1nfs_v2_vm_bufs= 1000nfs_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 restoreVG.

    'lspv' to make sure which PVs you want to restore yourvg 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.$ dateThu Dec 28 19:30:38 MST 2000

  • 5/21/2018 50324831 Aix

    21/182

    $ find src/ -name '*.c' -type f \( -mtime 12 -o -mtime 14 -o -mtime 20 \) -ls911362 4 Frw-rw-r-- 1 veblen 1000 3505 Dec 17 01:42 src/read/read.c913410 1 Frw-rw-r-- 1 veblen 1000 683 Dec 8 20:59 src/read/_archive/read.c911366 4 Frw-r--r-- 1 veblen 1000 3775 Dec 17 02:49 src/read/fsh.c2083 2 Frw-r--r-- 1 veblen 1000 1396 Dec 14 21:54 src/tcase_recv.

    c2086 2 Frw-r--r-- 1 veblen 1000 1363 Dec 14 21:54 src/tcase_send.c2085 1 Frw-r--r-- 1 veblen 1000 965 Dec 14 19:31 src/sigaction.c

    Finden von Dateiendie im letzten Jahr veraendert wurden (gestartet am 28.02.2001)undbilde 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 fcs0bus_intr_lvl 323 Bus interrupt level Falsebus_io_addr 0xdf800 Bus I/O address Falsebus_mem_addr 0xe8081000 Bus memory address Falseinit_link al INIT Link flags Trueintr_priority 3 Interrupt priority Falselg_term_dma 0x800000 Long term DMA Truemax_xfer_size 0x200000 Maximum Transfer Size True

    num_cmd_elems 200 Maximum number of COMMANDS to queue to the adapter Truepref_alpa 0x1 Preferred AL_PA Truesw_fc_class 2 FC Class for Fabric True

    # lsattr -El fcs0 -R -a max_xfer_size0x1000000x2000000x4000000x8000000x1000000

    # 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)

  • 5/21/2018 50324831 Aix

    22/182

    # 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 fscsi0attach switch How this adapter is CONNECTED Falsedyntrk no Dynamic Tracking of FC Devices Truefc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy Truescsi_id 0x10900 Adapter SCSI ID Falsesw_fc_class 3 FC Class for Fabric True

    # chdev -l fscsi0 -P -a fc_err_recov=fast_fail (default delayed_fail)

    # lsattr -El fcnet0enable_farp yes Use Fiber Channel Address Resolution Protocol Truenum_q_bufs 75 Maximum Number of HOST buffers to queue to adapter Truesw_fc_class 3 FC Class for Fabric True

    ################################# disk settings for fiberchannel################################# lsattr -El vpath0active_hdisk hdisk4/75235512325/fscsi2 Active hdisk False

    active_hdisk hdisk2/75235512325/fscsi0 Active hdisk Falseactive_hdisk hdisk3/75235512325/fscsi0 Active hdisk Falseactive_hdisk hdisk5/75235512325/fscsi2 Active hdisk Falsepolicy df Scheduling Policy Truepvid 00025eb562b8fd8d0000000000000000 Physical volume identifier Falseqdepth_enable yes Queue Depth Control True

    serial_number 75235512325 LUN serial number Falseunique_id 210C37523551232507210790003IBMfcp Device Unique Identification False

    ############################## network statistics loeschen############################## netstat -Zi

    ######################## flags bei netstat -nr

    #######################U Up.

  • 5/21/2018 50324831 Aix

    23/182

    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 -CRouting 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 0aix_52_test loopback UGHS 2 7 lo0 0 0127/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 valueroot@cws [~]# lsattr -El en0 -a netmask -F value

  • 5/21/2018 50324831 Aix

    24/182

    255.255.255.0

    ###################### interface erstellen#####################smitty mkinet1enoder

    NETADDR=10.50.11.22NETMASK=255.255.255.0BROAD=10.50.11.255chdev -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 hasbeen 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}'`

    dohost $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 downchdev -l en0 -a netaddr='10.0.0.1'ifconfig en0 up

    oder

    chdev -l en0 -a state=downchdev -l en0 -a state=detachchdev -l en0 -a netaddr='10.0.0.1'chdev -l en0 -a state=up

    oder ohne aenderung am interface aber mit aenderung in der ODMchdev -l en0 -P -a netaddr='10.0.0.1'

  • 5/21/2018 50324831 Aix

    25/182

    ############################################## interface andere geschwindigkeit einstellen#############################################ifconfig en? down detachchdev -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 iscorrect to bring it up.

    ################## vipa interfaces#################virtuelle interfaces welches ueber mehrere andere netzbeine gelegt wird.

    Beispiel:en0=192.168.1.xen1=192.168.2.xvi0=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 interfacesmkdev -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=en0INTERFACE=en1IP=BC=

    # gigabit

    chdev -l $INTERFACE -a netaddr=$IPchdev -l $INTERFACE -a netmask=255.255.255.0chdev -l $INTERFACE -a broadcast=$BC

  • 5/21/2018 50324831 Aix

    26/182

    chdev -l $INTERFACE -a tcp_nodelay=1chdev -l $INTERFACE -a tcp_recvspace=655350chdev -l $INTERFACE -a tcp_sendspace=655350chdev -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.10route add 10.42.1.10 loopback

    ####################################### routingtable flushen und neu anlegen

    ######################################route -fmkdev -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=$RRdone

    ###################### hostroute erstellen#####################

    chdev -l inet0 -a route=,-hopcount,,,,Beispiel:Einrichten einer Hostroute von 164.61.197.27 uerb Default-Gateway der MGI

  • 5/21/2018 50324831 Aix

    27/182

    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.19inet0 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 CuAtAnd 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 AddressHardware Address: 00:06:29:c3:49:07

    oderentstat ent0|grep "Hardware Address"|tr -d ":"oderentstat -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 thefollowing 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"

  • 5/21/2018 50324831 Aix

    28/182

    ################## shutdown script#################/etc/rc.shutdown is the place to put things for shutdown:

    ! su - dba

  • 5/21/2018 50324831 Aix

    29/182

    Model Architecture: chrp

    Model Implementation: Multiple Processor, PCI bus

    sys0 System Object sysplanar0 System Planar pci1 P2 PCI Bus

    Device Specific.(YL)........P2

    pci0 P2 PCI Bus

    Device Specific.(YL)........P2

    isa0 P2 ISA Bus

    Device Specific.(YL)........P2

    siokma0 P2/K1 Keyboard/Mouse Adapter

    Device Specific.(YL)........P2/K1

    sioka0 P2/K1 Keyboard Adapter sioma0 P2/K1 Mouse Adapter ppa0 P2/R1 CHRP IEEE1284 (ECP) Parallel Port Adapter

    Device Specific.(YL)........P2/R1

    sa0 P2/S1 Standard I/O Serial Port

    Device Specific.(YL)........P2/S1

    tty0 P2/S1-L0 Asynchronous Terminal sa1 P2/S2 Standard I/O Serial Port

    Device Specific.(YL)........P2/S2

    sa2 P2/S3 Standard I/O Serial Port

    Device Specific.(YL)........P2/S3

    ent0 P2/E1 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)

    Network Address.............000629C34902

    Displayable Message.........PCI Ethernet Adapter (23100020)Device Specific.(YL)........P2/E1

    ent1 P2-I4/E1 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)

    Serial Number...............11098048 FRU Number..................091H0397 Part Number.................091H0397 Network Address.............0004ACDE625B Displayable Message.........PCI Ethernet Adapter (23100020)

    Device Specific.(YL)........P2-I4/E1

    ent2 P2-I5/E1 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)

    Serial Number...............07012632 FRU Number..................091H0397

  • 5/21/2018 50324831 Aix

    30/182

    Part Number.................091H0397 Network Address.............000629FBAD95 Displayable Message.........PCI Ethernet Adapter (23100020)

    Device Specific.(YL)........P2-I5/E1

    ent3 P2/E2 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)

    Network Address.............000629C3C7BB Displayable Message.........PCI Ethernet Adapter (23100020)

    Device Specific.(YL)........P2/E2

    scsi0 P2/Z1 Wide/Ultra-2 SCSI I/O Controller

    Device Specific.(YL)........P2/Z1

    cd0 P2/Z1-A1 16 Bit SCSI Multimedia CD-ROM Drive (650 MB)

    Manufacturer................IBMMachine Type and Model......CDRM00203

    ROS Level and ID............1_04 Device Specific.(Z0)........058002028F000038 Part Number.................04N2964

    EC Level....................F73113FRU Number..................97H7796

    hdisk0 P2/Z1-A8 16 Bit LVD SCSI Disk Drive (18200 MB)

    Manufacturer................IBMMachine Type and Model......IC35L018UCDY10-0

    FRU Number..................00P3829ROS Level and ID............53323846

    Serial Number...............E2VM834C

    EC Level....................H32224Part Number.................08K0303Device Specific.(Z0)........000003029F00013A

    Device Specific.(Z1)........07N4972Device Specific.(Z2)........0068

    Device Specific.(Z3)........04105 Device Specific.(Z4)........0001 Device Specific.(Z5)........22 Device Specific.(Z6)........

    hdisk1 P2/Z1-A9 16 Bit LVD SCSI Disk Drive (18200 MB)

    Manufacturer................IBMMachine Type and Model......IC35L018UCDY10-0 FRU Number..................00P3829

    ROS Level and ID............53323846 Serial Number...............E2VM4SXC EC Level....................H32224

    Part Number.................08K0303Device Specific.(Z0)........000003029F00013A

    Device Specific.(Z1)........07N4972Device Specific.(Z2)........0068

    Device Specific.(Z3)........04083 Device Specific.(Z4)........0001 Device Specific.(Z5)........22

    Device Specific.(Z6)........

    ses0 P2/Z1-Af SCSI Enclosure Services Device

  • 5/21/2018 50324831 Aix

    31/182

    Manufacturer................IBMMachine Type and Model......HSBP04C RSU2SCSI

    ROS Level and ID............B019 Device Specific.(Z0)........0D00020232004000 FRU Number..................04N5209

    scsi1 P2/Z2 Wide/Ultra-2 SCSI I/O Controller

    Device Specific.(YL)........P2/Z2

    hdisk2 P2/Z2-A4 Other SCSI Disk Drive

    Manufacturer................COMPAQMachine Type and Model......BD14685A26Part Number.................3 Seagate Al

    ROS Level and ID............48504236 Serial Number...............3HY8D7YZ EC Level....................l rights r

    Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr Device Specific.(Z3)........ight

    Device Specific.(Z4)........c) 2 Device Specific.(Z5)........00

    hdisk3 P2/Z2-A5 Other SCSI Disk Drive

    Manufacturer................COMPAQMachine Type and Model......BD14685A26Part Number.................3 Seagate Al

    ROS Level and ID............48504236

    Serial Number...............3HY8DAC8 EC Level....................l rights r Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr Device Specific.(Z3)........ight

    Device Specific.(Z4)........c) 2 Device Specific.(Z5)........00

    hdisk4 P2/Z2-A8 Other SCSI Disk Drive

    Manufacturer................COMPAQ

    Machine Type and Model......BD14685A26Part Number.................3 Seagate Al ROS Level and ID............48504236 Serial Number...............3HY8CHDS EC Level....................l rights r Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr Device Specific.(Z3)........ight

    Device Specific.(Z4)........c) 2 Device Specific.(Z5)........00

    hdisk5 P2/Z2-A9 Other SCSI Disk Drive

    Manufacturer................COMPAQMachine Type and Model......BD14685A26

  • 5/21/2018 50324831 Aix

    32/182

    Part Number.................3 Seagate Al ROS Level and ID............48504236 Serial Number...............3HY8D88G EC Level....................l rights r Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr

    Device Specific.(Z3)........ightDevice Specific.(Z4)........c) 2

    Device Specific.(Z5)........00

    hdisk6 P2/Z2-Aa Other SCSI Disk Drive

    Manufacturer................COMPAQMachine Type and Model......BD14685A26Part Number.................3 Seagate Al

    ROS Level and ID............48504236 Serial Number...............3HY8C74D EC Level....................l rights r

    Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr Device Specific.(Z3)........ight

    Device Specific.(Z4)........c) 2 Device Specific.(Z5)........00

    hdisk7 P2/Z2-Ab Other SCSI Disk Drive

    Manufacturer................COMPAQMachine Type and Model......BD14685A26Part Number.................3 Seagate Al

    ROS Level and ID............48504236

    Serial Number...............3HY8D8K3 EC Level....................l rights r Device Specific.(Z0)........000003128B00013E Device Specific.(Z1)........ Device Specific.(Z2)........opyr Device Specific.(Z3)........ight

    Device Specific.(Z4)........c) 2 Device Specific.(Z5)........00

    L2cache0 L2 Cache mem0 Memory proc0 P1-C1 Processor

    Device Specific.(YL)........P1-C1

    proc1 P1-C1 Processor

    Device Specific.(YL)........P1-C1

    ############################ determing processor speed###########################Determining CPU Speed in AIX

    Contents

    About this document Procedure

  • 5/21/2018 50324831 Aix

    33/182

    About this document This document applies to AIX Versions 4.x.

    Procedure While there is not a direct command to determine processor speed in AIX, the best place to start is with the uname command. Executing

    uname -m produces output of the following form:

    xxyyyyyymmss The meanings of the placeholders are as follows: xx = 00 yyyyyy = Unique CPU ID mm = Model ID

  • 5/21/2018 50324831 Aix

    34/182

    IBM,7025-F40 7025-F40 166/233 PowerPC IBM,7025-F50 7025-F50 See Note 4. PowerPC IBM,7026-H10 7026-H10 166/233 PowerPC IBM,7026-H50 7026-H50 See Note 4. PowerPC IBM,7026-H70 7026-H70 340 RS64-II IBM,Model 7042/7043 (ED) 7043-140 166/200/233/332 PowerPC

    IBM,Model 7042/7043 (ED) 7043-150 375 PowerPC IBM,Model 7042/7043 (ED) 7043-240 166/233 PowerPC IBM,7043-260 7043-260 200 Power3 IBM,7248 7248-100 100 PowerPersonal IBM,7248 7248-120 120 PowerPersonal IBM,7248 7248-132 132 PowerPersonal IBM,9076-270 9076-SP Silver Node See Note 4. PowerPC

    J-Series, R-Series, and G-Series systems: You can determine the processor speed in an MCA SMP system from the FRU number of the CPU card by using the following command:

    lscfg -vl cpucard0 | grep FRU This will produce the following output: FRU Number..................C1D FRU Number Processor Type Processor Speed E1D PowerPC 601 75 FRU Number Processor Type Processor Speed E1D PowerPC 601 75 C1D PowerPC 601 75 C4D PowerPC 604 112 E4D PowerPC 604 112 X4D PowerPC 604e 200 E-Series and F-30 systems:

    For the E-series and F-30 systems, use the following process to determine CPU speed. Execute: lscfg -vp | more Look for the following stanza: procF0 CPU Card Part Number.................093H5280 EC Level....................00E76527 Serial Number...............17700008 FRU Number..................093H2431 Displayable Message.........CPU Card Device Specific.(PL)........ Device

    Specific.(ZA)........PS=166,PB=066,PCI=033,NP=001,CL=02,PBH Z=64467000,PM=2.5,L2=1024 Device Specific.(RM)........10031997 140951 VIC97276 p; Power 10 7013-530 25 Power 10 7016-730 25 Power 11 7013-540 30 Power 14 7013-540 30 Power 18 7013-53H 33 Power 14 7013-540 30 Power 18 7013-53H 33 Power 1C 7013-550 41.6 Power 20 7015-930 25 Power

    2E 7015-950 41 Power 30 7013-520 20 Power 31 7012-320 20 Power

  • 5/21/2018 50324831 Aix

    35/182

    34 7013-52H 25 Power 35 7012-32H 25 Power 37 7012-340 33 Power 38 7012-350 41 Power 41 7011-220 33 RSC

    43 7008-M20 33 Power 43 7008-M2A 33 Power

    46 7011-250 66 PowerPC 47 7011-230 45 RSC 48 7009-C10 80 PowerPC 4C See Note 1. 57 7012-390 67 Power2 57 50 Power 76 7012-365 50 Power 77 7012-350 41 Power 77 7012-355 41 Power 77 7013-55L 41.6 Power 79 7013-591 77 Power2 77 7013-55L 41.6 Power

    79 7013-591 77 Power2 79 9076-SP2 Wide 77 Power2 80 7015-990 71.5 Power2 81 7015-R24 71.5 Power2 89 7013-595 135 P2SC

    89 9076-SP2 Wide 135 P2SC94 7012-397 160 P2SC94 9076-SP2 Thin 160 P2SCA0 7013-J30 75 PowerPC

    A1 7013-J40 112 PowerPC A3 7015-R30 See Note 2. PowerPC A4 7015-R40 See Note 2. PowerPC A4 7015-R50 See Note 2. PowerPC

    A4 9076-SP2 High See Note 2. PowerPC A6 7012-G30 See Note 2. PowerPC A7 7012-G40 See Note 2. PowerPC C0 7024-E20 See Note 3. PowerPC C0 7024-E30 See Note 3. PowerPC C0 7024-E30 See Note 3. PowerPC C4 7025-F30 See Note 3. PowerPC F0 7007-N40 50

    for Bull machine - with bull_rspc architecture-id (i.e. Escala E and Escala T, not sure about EPCs): The command /usr/bin/lsresid available in fileset Bull.tools.dump displays

    in VPD paragraph a line like: ProcessorHz = xxxxxxxxx.

    oder

    miraculix:/#lscPlease wait while we determine the processor megahertz rate ...attribute value descriptionarchitecture PowerPC Processor architectureimplementation PowerPC_604 Processor Implementationversion PowerPC_604 Processor versionclock_speed 77.4 CPU clock speed in MHz (approximation)width 32 Processor width (bits)ncpus 1 Number of CPUs

    realmem 262144 Amount of usable real memory (Kilobytes)cache_attrib 1 Split instruction and data cacheicache_size 16 L1 instruction cache size (Kilobytes)

  • 5/21/2018 50324831 Aix

    36/182

    icache_asc 4 L1 instruction cache Associativityicache_block 32 L1 instruction cache block size (bytes)icache_line 32 L1 instruction cache line size (bytes)dcache_size 16 L1 data cache size (Kilobytes)dcache_asc 4 L1 data cache Associativitydcache_block 32 L1 data cache block size (bytes)dcache_line 32 L1 data cache line size (bytes)

    L2_cache_size 1024 L2 cache size (Kilobytes)L2_cache_asc 1 L2 cache associativitytlb_attrib 1 Split instruction and data TLBitlb_size 128 Instruction TLB size (entries)itlb_asc 2 Instruction TLB associativitydtlb_size 128 Data TLB size (entries)dtlb_asc 2 Data TLB associativityresv_size 32 Size of reservation (bytes)priv_lck_cnt 0 Spin lock count in supervisor modeprob_lck_cnt 0 Spin lock count in problem statertc_type RTC_POWER_PC RTC typevirt_alias 0 Hardware aliasing not supported

    cach_cong 0 Number of page bits for cache synonymXint 1250000 Used in time base conversionXfrac 20773 Used in time base conversion

    oder

    mhz

    ######################## seriennummer auslesen#######################/mksysb # uname -uIBM,014423C2B

    oder

    /mksysb # lscfg -vp|grep "Machine/Cabinet Serial" Machine/Cabinet Serial No...4423C2B

    oder

    /mksysb # lsattr -El sys0 | grep systemidsystemid IBM,014423C2B Hardware system identifier False

    oder

    # uname -u|cut -c7-30655CCFA

    ####################### number of processors####################### bindprocessor -qThe available processors are: 0 1 2 3

    root@kerp-sas001:/> lparstat -iNode Name : kerp-sas001

    Partition Name : SASPartition Number : 2Type : Dedicated-SMT

  • 5/21/2018 50324831 Aix

    37/182

    Mode : CappedEntitled Capacity : 2.00Partition Group-ID : 32770Shared Pool ID : -Online Virtual CPUs : 2Maximum Virtual CPUs : 2Minimum Virtual CPUs : 1

    Online Memory : 7936 MBMaximum Memory : 8192 MBMinimum Memory : 128 MBVariable Capacity Weight : -Minimum Capacity : 1.00Maximum Capacity : 2.00Capacity Increment : 1.00Maximum Physical CPUs in system : 2Active Physical CPUs in system : 2Active CPUs in Pool : -Unallocated Capacity : -Physical CPU Percentage : 100.00%

    Unallocated Weight : -

    ########################## cpu runs at which speed########################## /usr/bin/pmcyclesThis machine runs at 1201 MHz

    ######## pwdck#######check /etc/passwdlist problems:

    pwdck -n -l ALLrepair 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

  • 5/21/2018 50324831 Aix

    38/182

    qEND

    GRUPPE=entwfor i in `lsgroup $GRUPPE|awk '{print $4}'|cut -f2 -d"="|sed '1,$s/,/ /g'`do

    lsuser -a rlogin $i

    done

    ########################### ed einfuegen einer zeile##########################ed - kutest die user die kein rsh duerfen

    #################################### schauen ob dump geschrieben wurde#################################### sysdumpdev -L0453-039

    Device name: /dev/lv00Major device number: 10Minor device number: 9Size: 29359616 bytesDate/Time: Sat Oct 28 10:34:37 DFT 2000Dump status: -2dump device too small

    Einstellungen dump# sysdumpdev -lprimary /dev/lv00secondary /dev/sysdumpnull

    copy directory /var/adm/rasforced copy flag TRUEalways allow dump TRUE

  • 5/21/2018 50324831 Aix

    39/182

    dump compression OFF

    dump-device aendernsysdumpdev -P -p /dev/hd5primary /dev/hd5secondary /dev/sysdumpnullcopy directory /var/adm/ras

    forced copy flag TRUEalways allow dump FALSE

    size of dump-deviceroot@cws [~]#sysdumpdev -e0453-041 Estimated dump size in bytes: 36700160

    ###################################### dump im laufenden Betrieb forcieren#####################################sysdumpstart

    oder

    echo "hans-dieter kutz" >/dev/kmem

    ######################## dump-device erstellen#######################erstelllen mitmklv -t sysdump -y setzen mitsysdumpdev -P -p /dev/hd7

    Check it if this command run and did change:

    sysdumpdev -l

    # sysdumpdev auf /dev/sysdumpnull stellensysdumpdev -P -p /dev/sysdumpnullsysdumpdev -P -s /dev/sysdumpnull

    # zurueckstellen auf hd-devicessysdumpdev -P -p /dev/hd7sysdumpdev -P -s /dev/hd77

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

    # paging-device verkleinern###########################- make new psmkps -a -n -s 30 rootvg hdisk0

    - change actual pschps -a n hd6

    - Change the paging space entry in the /sbin/rc.boot file from:swapon /dev/hd6toswapon /dev/paging00 (created bei mkps command)

    - list actual dump-settingssysdumpdev -l

  • 5/21/2018 50324831 Aix

    40/182

    - change ps to new pssysdumpdev -P -p /dev/paging00

    - bosboot erstellenbosboot -d /dev/hdisk0 -a

    - reboot

    shutdown -Fr

    - alten pagingspace loeschenrmps hd6

    - neuen ps erstellenmklv -t paging -y hd6 rootvg 30

    - dump settings umstellensysdumpdev -P -p /dev/hd6

    - Change the paging space entry in the /sbin/rc.boot file from:

    swapon /dev/paging00toswapon /dev/hd6 (created bei mklv command)

    - bosbootbosboot -d /dev/hdisk0 -a

    - activate hd6 as pschps -a y hd6

    - deactivate paging00chps -a n paging00

    - rebootshutdown -Fr

    - temp ps paging00 loeschenrmps 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 DestinationPhysicalVolumemigratepv -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 volumehd2 to hdisk5, type:

  • 5/21/2018 50324831 Aix

    41/182

    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#################################### lslicenseMaximum 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 Falsemaxbuf 20 Maximum number of pages in block I/O BUFFER CACHE Truemaxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS Truemaxuproc 256 Maximum number of PROCESSES allowed per user Trueautorestart false Automatically REBOOT system after a crash Trueiostat false Continuously maintain DISK I/O history Truerealmem 262144 Amount of usable physical memory in Kbytes Fal

    seconslogin enable System Console Login Falsefwversion IBM,L99071 Firmware version and revision levels Falsemaxpout 0 HIGH water mark for pending write I/Os per file Trueminpout 0 LOW water mark for pending write I/Os per file Truefullcore false Enable full CORE dump Truepre430core false Use pre-430 style CORE dump Tru

    ertasversion 1 Open Firmware RTAS version Falsemodelname IBM,9076-WCN Machine name Falsesystemid IBM,010078023 Hardware system identifier Falseboottype disk N/A FalseSW_dist_intr false Enable SW distribution of interrupts Truecpuguard disable CPU Guard True

    ######################## einstellungen adapter

  • 5/21/2018 50324831 Aix

    42/182

    ######################## lsattr -El en1mtu 1500 Maximum IP Packet Size for This Device Trueremmtu 576 Maximum IP Packet Size for REMOTE Networks Truenetaddr 192.168.10.239 Internet Address Truestate up Current Interface Status Truearp on Address Resolution Protocol (ARP) True

    netmask 255.255.255.0 Subnet Mask Truesecurity none Security Level Trueauthority Authorized Users Truebroadcast 192.168.10.255 Broadcast Address Truenetaddr6 N/A Truealias6 N/A Trueprefixlen N/A Truealias4 N/A Truerfc1323 N/A Truetcp_nodelay N/A Truetcp_sendspace N/A Truetcp_recvspace N/A True

    tcp_mssdflt N/A True# lsattr -El ent1busio 0x7fffc00 Bus I/O address Falsebusintr 6 Bus interrupt level Falseintr_priority 3 Interrupt priority Falsetx_que_size 8192 TRANSMIT queue size Truerx_que_size 256 RECEIVE queue size Truerxbuf_pool_size 384 RECEIVE buffer pool size Truemedia_speed Auto_Negotiation Media Speed Trueuse_alt_addr no Enable ALTERNATE ETHERNET address Truealt_addr 0x000000000000 ALTERNATE ETHERNET address Trueip_gap 96 Inter-Packet Gap True

    ################# mtu veraendern################chdev -l en1 -a mtu=new-value

    ###################### adapter unconfigurem##################### rmdev -l atm0atm0 Defined# rmdev -d -l atm0atm0 deleted

    ############################ adapter aus odm entfernen############################ rmdev -d -l atm0atm0 deleted

    ##################### adapter aktivieren##################### mkdev -l 'ssa0'ssa0 Available

    ############################## timeout setzen bei sessions#############################

  • 5/21/2018 50324831 Aix

    43/182

    You should check if environment variable TMOUT is set either in .profile or /etc/environment.

    TMOUT=3600readonly TMOUTexport 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 andto 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 becalled via shell scripts and then linked to /usr/sbin/mkrr_fs (for creatingthe Rock Ridge format image) and /usr/sbin/burn_cd (for writing to the CD-Rdevice). Both links are called from the mkcd command.Some sample shell scripts are included for different vendor-specificroutines. You can find these scripts in /usr/samples/oem_cdwriters.

    ######## sdiff

    #######vergleicht 2 Dateien gegenuebersdiff lslpp_machine1.out lslpp_machine2.out|grep -v "\|" # ohne gleiche inhaltesdiff lslpp_machine1.out lslpp_machine2.out|grep "|" # nur gleiche inhaltesdiff lslpp_machine1.out lslpp_machine2.out|grep ">" # filtert nur rechtssdiff lslpp_machine1.out lslpp_machine2.out|grep "

  • 5/21/2018 50324831 Aix

    44/182

    ----------------------------------------------------------- /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:455.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_pack

    ages/5.2.0.0' -f'all' -t'/export/nim/customize/zusaetzliche_packages/5.2.0.0/bff' '-X'

  • 5/21/2018 50324831 Aix

    45/182

    oder per gencopygencopy -b "-qvX" -d . -t /tmp/inst.images -f File 2>&1wobei 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>&

    1File: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 thenetwork(s) to exclude, and the last line points at your socks servermachine

    i.e.

    207.146.170.0/24 NONE0.0.0.0/0 mysocksserver.comMy friend offered me the binaries for rtelnet, rftp, rwho and otherutilities, and I had to exportSOCKS_SERVER=mysocksserver.com

    Then I could use these utilities to go outside the firewall.

    # firewall port blockinghttp://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'

  • 5/21/2018 50324831 Aix

    46/182

    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 kutzkutz:

    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 # umbenennennamerslv -e # Ruecknahme umbenennennamerslv -a -i {IP-Adresse} -D {Domain} -S {Search List} # Nameserver eintragen

    namerslv -a -i 172.31.64.227namerslv -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 alower value, but you should also try and change RES_RETRY variable whichoverrides the default value for the retry, which is 4. This value is thenumber of times the resolver tries to query the name servers before givingup.

    Hence for default values of RES_TIMEOUT=5 secand RES_RETRY=4 sec and for each retrythe inital RES_TIMEOUT is multiplied by 2RES_TIMEOUT=5RES_RETRY=4=> 5 + 10 + 20 + 40 = 75 seconds

    RES_TIMEOUT=2RES_RETRY=4=> 2 + 4 + 8 + 16 = 30 secondsRES_TIMEOUT=5RES_RETRY=2=> 5 + 10 = 15 secondsRES_TIMEOUT=3RES_RETRY=2=> 3 + 6 = 9 secondsSo, change also the RES_RETRY value. Afterwards it should work.

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

    # status ethernet-adapter#########################entstat -d ent0

  • 5/21/2018 50324831 Aix

    47/182

    ################### check linkstatus##################netstat -v |grep RJ45

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

    # check collisions##################root@cws [/tmp]#netstat -I en0Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Collen0 1500 link#2 2.60.8c.2f.c3.ec 3403525 0 3655451 0 0en0 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 exampleof a shell queue. It will execute the submitted scripts sequentially.

    ----- /etc/qconfig ----bsh: discipline = fcfs device = bshdevbshdev: 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 3typeset -L$len2 CPL # Fixing length of $CPL to len2 left truncatedCPL=$X

    Beware: -L$len2 WITHOUT space....

    ########## iptrace#########iptrace -i en1 -s some.address.com -b /tmp/ftp.outiptrace: 0827-877 setsockopt -: There is not enough buffer space for the requested socket operation.Solution:no -o sb_max=1310720

    #################### lvcb ueberpruefen###################

    getlvcb -AT

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

  • 5/21/2018 50324831 Aix

    48/182

    # console ueberpruefen####################### lscons/dev/lft0To 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/tty3To 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: [email protected] (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 -Preboot

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

    # I lost the root password, what should I do?#############################################From: [email protected] (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?#################################

  • 5/21/2018 50324831 Aix

    49/182

    Preferably from a backup. If you don't have a backup, at least onecompany, Compunix, claims to have a product that will recover deletedfiles. More information is available at .

    From: [email protected]

    [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 composingthat file still exist, but are no longer allocated. As long as no newfiles are created or existing files extended within the same filesystem,the blocks will remain untouched. It is possible to reallocate theblocks 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 ...

    [email protected]

    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.

  • 5/21/2018 50324831 Aix

    50/182

    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 tothe 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)

  • 5/21/2018 50324831 Aix

    51/182

    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 withthe 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 $NAMEuname -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 backin, 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, therepeat rate is also reset to some slow value (11, according to the man

  • 5/21/2018 50324831 Aix

    52/182

    page). If the user is in X, you need to open an hft window. Do thiswith "xopen /bin/csh". Once you have an hft window, run "chhwkbd -r30".

    [Editor's note: By unplugging & plugging a keyboard/mouse on a livesystem 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 livesystem 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 SystemDCR - design change request Someone asked to change something.LPP - Licensed Program ProductODM - 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 FixSMIT - System Management Interface ToolSMITTY - 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.2JFS JFS JFS JFS2 JFS JFS2

    AIX Kernel 32/64 32/64 32 Bit 64 Bit 32/64 32 Bit 64 BitMaximum SupportedFile Size 64 GB 64 GB 1 TB 1 TB 64 GB 1 TB 16 TBFilesystem Size 1 TB 1 TB 1 TB 1 TB 1 TB 1 TB 16 TB

    ######################################## Make and Back Up a Snapshot of a JFS2###############