AIX local FAQ



Picture conversion

... convert (encapsulated) PostScript to JPEG

Let's assume a PostScript file pet01.eps. Apparently it should contain a "showpage" instruction. Then:
gs -sDEVICE=jpeg -r300x300 -sOutputFile=pet01.jpeg pet01.eps
GS> quit
will create a JPEG file pet01.jpeg. The -r flag controls the resolution. Alternatively:
gs -sDEVICE=jpeg -r300x300 -sOutputFile=pet01.jpeg pet01.eps -c showpage
GS> quit
Sometimes this helps:
gs -sDEVICE=jpeg -sPAPERSIZE=a4 -r300x300 -sOutputFile=pet01.jpeg pet01.eps -c showpage
GS> quit

... convert (encapsulated) PostScript to TIFF

Let's assume a PostScript file pet01.eps. Apparently it should contain a "showpage" instruction. Then:
gs -sDEVICE=tiffg3 -r300x300 -sOutputFile=pet01.tiff pet01.eps
GS> quit
will create a TIFF file pet01.tiff. The -r flag controls the resolution. Alternatively:
gs -sDEVICE=tiffg3 -r300x300 -sOutputFile=pet01.tiff pet01.eps -c showpage
GS> quit
Sometimes this helps:
gs -sDEVICE=tiffg3 -sPAPERSIZE=a4 -r300x300 -sOutputFile=pet01.tiff pet01.eps -c showpage
GS> quit

... convert (encapsulated) PostScript to XBM

This requires two steps, first conversion to TIFF (via Ghostscript), then to XBM (via xview). Let's assume a PostScript file survival.eps. Apparently it should contain a "showpage" instruction. Then, for example:
gs -sDEVICE=tiffg3 -g1024x768 -r100x100 -sOutputFile=survival.tiff survival.eps
GS> quit
will create a TIFF file survival.tiff. The -r flag controls the resolution.
Then run
xview survival.tiff
to load and save the picture as X11 bitmap.

... convert (encapsulated) PostScript to PDF

Let's assume a PostScript file acs.ps. Apparently it should contain a showpage instruction. Then:
gs -sDEVICE=pdfwrite -sOutputFile=acs.pdf acs.ps -c showpage
GS> quit
will create a PDF file acs.pdf.

... extract graph data from publications in PDF

Sometimes ancient publications, available only as PDF, contain interesting figures/graphs. To extract the values of data points, the following procedure I found useful:
  1. Display the respective page with e.g.
    acroread publication.pdf
    
  2. Grab the pixels within the reader window. After typing the command below click the mouse in the desired window. A pixel dump file will be generated.
    xwd -out /tmp/page.xwd
    
  3. Use the xv utility to convert the pixel data into an X11 bitmap file:
    xv /tmp/page.xwd
    
    You may use the "Grab" function to cut off unwanted junk around the figure. Then store the image as "X11 bitmap", e.g. as figure1.xbm
  4. Use the gd progam to pickup the data points:
    gd
    
    then, at the command prompt
    gimage figure1.xbm
    gd / nospace xmin(...) xmax(...) ymin(...) ymax(...) noaxis
    
    a cursor rectangle will appear which lets you define the x- and y-axis on the figure. You will have to specify the axis limits. Use xlog, ylog where appropriate.
    Now you may pickup the data points via mouse/cursor and save the data:
    gpos /loop
    gsave figure1.gd
    

TeX/LaTeX

... include pictures in LaTeX

There's a lengthy write-up

... make A0 posters (as of 28-Jun-99)

There are a couple of stylefiles/packages available to produce Posters in A0 with arbitrarily aligned text boxes (including pictures), all in colour.
The basic principle is to use \minipage's and \parbox'es for correct placement and alignment. The \parbox'es may comprise inbedded PostScript pictures as well as their caption. Several macros provide a rich set of different colours. In addition, you might define your own colours.
Creating a poster is done best in three steps: A draft in format A3 which can be viewed on screen, a draft in A3 which is printed on a suitable printer and the final printout on an A0 printer.

An example for use with the old LaTeX system (which should no longer be used, however) can be found in oldposter.tex The example has 9 boxes 8.5cm each realized by minipages, distance 1 cm.

A more recent example using colours and included pictures can be found here and how the result looks like there

Here are the three steps:

  1. Draft in size A3
    In the LaTex source file
    \textwidth  30.0cm
    \textheight 40.0cm 
    
    define an A3 page. On the UNIX command line
    latex poster ; dvips -t a3 poster; gv poster.ps -magstep -3 &
    
    processes your LaTeX source file and displays it on screen (-magstep -3 allows to view the whole poster).

  2. Printing in size A3
    In the LaTex source file still:
    \textwidth  30.0cm
    \textheight 40.0cm 
    
    For printing you need extra
    \voffset -3cm
    \hoffset -2cm 
    
    otherwise the printout would be shifted towards the lower right corner and hence doesn't fit on the A3 media anymore. For printing you obviously need on A3-capable printer. At GSI you might query those guys by:
    man printer | grep lps
    
    which currently ( 28-Jun-1999 ) yields
       p16        wps,lps,wpd,gps,gpd RZ Maschinensaal
       p28        wps,lps             Grossmontage Lager
       p30        wps,lps             UHV Jacoby 3.004
       p50        lps                 Mittelspange Nordbau
       p54        lps                 Pauserei 2.210
       p66        wps,wpd,lps         EE-Labor
       p77        lps,wps             Be.-Labor 2.118
       p78        lps,wps             Be.-Labor 2.116
    
    where according to GSI convention 'lps' stands for "White paper, ascii/postscript, DIN A3, single sided".
    For processing and printing you use e.g. the UNIX line command
    latex poster ; dvips -t a3 poster; lpr -Pp16lps poster.ps &
    
    or, alternatively
    latex poster ; dvips -t a3 poster;  pop -p16lps poster.ps &
    
  3. Printing in size A0
    For printing you have to remove/comment out the extra offsets in the LaTeX source file:
    %\voffset -3cm
    %\hoffset -2cm 
    
    For processing and creating a print-ready PostScript file (poster.ps) you use the UNIX line command
    latex poster.tex ; dvips -t a0 -x2650 poster
    
    The "-t a0" is necessary to define the bounding box of the poster. If omitted it would be cut off at DIN A4 size. The "-x 2650" defines magnification by 1000.
    Then you use another command
    pop -p51 -l 1200 poster.ps
    
    to print on the specified printer (p51pcs) with a paperlength of 1200 mm

... make tables

A LaTeX example you find here and how it looks like there.


Dealing with M$ world

MS-DOS file exchange

can be accomplished via 3.5" diskettes and the UNIX-commands (so-called mtools)

... get rid of the nasty carriage returns (^M) from MS-DOS generated files

You might use the standard tr (translate) command:
tr <inputfile >outputfile -d '\r'
Caution !!! Input and output file must be different !!!

Importing MS data formats

With the "word2txt" utility (<= MS Word 97)

Given an MS-Word file, e.g. word.doc, then on any biori6*-Machine, central AIX-machine or central Linux-Machine:
word2txt word
will convert the word.doc into a readable ASCII file word.txt. Note, however, that word.doc must reside in your home file system (which is the normal case).

With the Laola OLE::Storage packet (MS Word 6 + 7)

This a Perl-based PD software. It comprises a couple of line commands to handle MS files. In cases of trouble
export LANG=C
might help.

With the commercial "Applixware" for AIX

This is a commercial GUI-oriented Office Software for UNIX (including AIX). We (bio) have 4 license only so not all people may use it at the same time. On any command line just type
ax
be patient and the Applix Menu will pop up.
Then choose "Words"-"File"-"Import" and go ahead. Do not forget to exit Applixware when done !

With the antiword freeware

Example:
antiword msword.doc > ascii.txt

MS Word 8 file format ...

is described here

Exporting M$ file formats

With the commercial "Applixware" for AIX

This is a commercial GUI-oriented Office Software for UNIX (including AIX). We (bio) have 4 licenses only so not all people may use it at the same time. On any command line just type
ax
be patient and the Applix Menu will pop up.
Then choose "Words" to edit and "Export" to select the output format.

With the commercial "WordPerfect" for AIX

Only RTF format. Choose "Save As" and select the desired option.

File handling

... archive files with ADSM

Example:
dsmc archive -subdir=yes -archsyml=no -archmc=totape "ftp.software.ibm.com/*"
will archive the specified directory (and all its subdirectories) onto tape media, symbolic links will be store as such, i.e. not as files.

... restore a file with ADSM

Most often this is necessary after accidental deletion of a file. You might have to specify the complete path and the destination.
To execute the restore commands login as the file owner on the machine where the file resides (or resided), or use the virtualnodename parameter.
Examples:

... restore a specific version of a file with ADSM

  1. login as the file owner on the machine where the file resides (or resided). For "normal" user files you have (for now) to use the central AIX machines, e.g. via
    rlogin aix.pool
    
    or
    telnet aix.pool
    
  2. to restore a file you have to specify the complete path. You start the ADSM client in a select mode. Example: user "feinbein"'s login profile:
    dsmc restore -pick -inactive /userfs/userb01/feinbein/.profile
    dsmc restore -pick -inactive -virtualnodename=biopw7z /userfs/userb01/feinbein/.profile "/tmp/"
    
  3. A selection panel appears with different versions, type the number and then "o" to exit.

... query files backed up with ADSM

Example, on central machine clri6m:
dsmc q backup -subdir=yes -inactive "/userfs/userb01/gunzert/Anna/Gamma-Spektoskopie/OKT05/Gauss-Fit-Datenblaetter/*"
On other machines you need a password and:
dsmc q backup -subdir=yes -inactive -virtualnodename=clri6b "/userfs/userb01/gunzert/Anna/Gamma-Spektoskopie/OKT05/Gauss-Fit-Datenblaetter/*"

... remove selected files recursively

find ./ !  -name "*,v" -exec \rm {} \;
removes all files not ending with ,v from the current directory and all directories below. Directories themselves are not deleted.

... access a remote tape

for a tape archive e.g.:
tar -cvf - dir1 dir2 | rsh biori6z dd of=/dev/rmt0
archives directories dir1 and dir2 to tape /dev/rmt0 at machine biori6z

... make a ISO filesystem

Sometimes it is convenient to mount an ISO image rather than burning it to CD/DVD.
This supported on AIX >=6.1. Example:
loopmount -i /d/bioimages/texlive2011-20110705.iso -o "-V cdrfs -o ro" -m /cdrom
mounts the specified ISO file as if it were a CD/DVD ROM.
Requires root privileges.

... make a ISO filesystem

mkisofs [-U] -o <outputfile> <inputpath>
Example(s):
mkisofs -U -o test.iso phd
mkisofs -D -U -rock -iso-level 3 -o test.iso phd # ignore directory nesting limit, allow symlinks
generates an ISO image test.iso comprising all files in directory phd. The image test.iso is ready to be transferred to CD with cdrecord.
The -U option causes filenames to be left unchanged, which violates the ISO norm, but is better suited for UNIX filenames.

... burn a CD/DVD

Example:
cdrecord dev=1,0 image.iso    # for CDs
readcd -w dev=1,0 f=image.iso # for DVDs
burns the (disk-resident) ISO image file image.iso on CD/DVD writer /dev/cd1 More hints (CD recording seems to be heavy magic):

sometimes the message appears: "readcd: Invalid argument. Cannot send SCSI cmd via ioctl" This can be ignored, just re-issue the command.

Depending on host hardware, cdrecord version and type of CD writer, explicitly specifying writing speed might help:

cdrecord ... speed=4 ...

... synchronize filesystems

E.g.:
rsync        -v -r -l -S -p -o -g -t -u [-n] [--delete] /mnt/$user/           /userfs/userb01/
rsync -e ssh -v -r -l -S -p -o -g -t -u [-n] [--delete] /mnt/$user/ user@node:/userfs/userb01/
copies all newer files from /mnt/$user to /userfs/userb01/$user, preserving permissions, ownerships and times.
The second line uses ssh services to copy to a remote node (and will prompt a password)
-n selects a (recommended) "dry run" without actually doing something.
--delete deletes all files in the target directory(ies) which do not exist in the source directory. Use it with care !

... format a disk

Use smitty
Problem Determination - Hardware diagnostics - Current Shell Diagnostics - Resource Selection
Select the disk to format (take care !), use F7 to commit.
In Task Selection choose Format Media, then Format and certify disk. Think twice and go ahead. Be patient, it may take an hour or so.

... deal with system backup tapes

list an AIX backup archive

(512 byte records)
restore -T -f /dev/rmt0

copy archives

dd if=/dev/rmt0 ibs=512   of=/tmp/rmt0.dd
dd if=/dev/rmt0 ibs=10240 of=/tmp/rmt0.dd  # alternative ?

list an installation tape

installp -l -d /dev/rmt0 >/tmp/rmt0.log 2>&1

list a mksysb tape

lists contents of the backup tape at /dev/rmt0 into file /tmp/rmt0.log.
Single file restore can be accomplished in a similar fashion.

... move file system to another Volume Group (VG)

Unlike moving contents of a complete VG, this is not that straightforward.
Assume a filesystem, fs, and associated logical volume (LV), /dev/lv, to be moved to another VG, newvg.
  1. If not yet existing, create the target VG, as described e.g. here.
  2. Create the new LV (with the same attributes) on the target VG, as described e.g. here, or via command line
    mklv -y newlv newvg number_of_physical_partitions
    
    In any case:
    chlv -t copy newlv      # flags that it will receive a copy
    
  3. If not yet existing (e.g. because no other filesystem has been created yet on the target VG), create a JFS log device:
    mklv -t  jfslog newvg 1 # for a jfs LV
    mklv -t jfs2log newvg 1 # for a jfs2 LV
    logform /dev/loglv00    # assuming this is the JFS log, insert the actual name here
    
  4. If the filesystem is exported for NFS, unexport and unmount it first.
    exportfs -u fs
    umount      fs
    
    If, as usual, this can't be accomplished because somebody is using the filesystem, use
    fuser /dev/lv
    # or:
    lsof
    
    to discover and kill -9 the offending processes.
    Brute force version:
    fuser -kxuc /dev/lv
    
    kills everything associated with /dev/lv
  5. Then
    cplv -e newlv -f lv # copy old to new LV, may take looong, so be patient!
    chlv -n oldlv lv    # swap LV names ...
    chlv -n lv newlv    # swap LV names ...
    
  6. Change filesystem attributes:
    chfs -a dev=/dev/lv fs       # the new LV it resides on
    chfs -a log=/dev/loglv00 fs  # the new JFS log it uses, use the actual JFS log name here !!!
    
  7. Remount fs.
  8. If applicable, i.e. if the filesystem has NFS clients: re-export it: exportfs fs. It might be necessary to un/remount on the client side:
    umount -f client_mountpoint_for_fs
    
  9. If you're sure everything works fine, use smitty to remove old LV oldlv.

... move file system to another file server

  1. Create a new filesystem /fsnew on the target file server, as described here, but delay NFS access until later.
  2. Replicate the old filesystem content on the new server. Since no files should be left out, root access should be available on both the old and the new file system. Use:
       # for a dry run
       rsync -e ssh -v -r -l -S -p -o -g -t -u -n /fsold/ root@target:/fsnew
       # for real
       rsync -e ssh -v -r -l -S -p -o -g -t -u    /fsold/ root@target:/fsnew
    
    mind the trailing slash (/), it's significant!!
    For a transfer on the same machine one may alternatively use:
       cp -h -r -p /fsold/ /fsnew/
    
    One may verify the successful transfer by comparing filesystem sizes:
       du -g -s /fsold/ 
       du -g -s /fsnew/
    
    however, this is only a crude estimate since some filesystem types offer compression. Alternatively, the number of files in both filesystems can be compared via
       find /fsold/ |wc
       find /fsnew/ |wc
    
    where the first two numbers (lines, words) should be approximately equal.
  3. if applicable, enable NFS access.
  4. unexport the old file system:
    smitty
    Communications Applications and Services - NFS - Remove a Directory from Exports List
    # command line:       
    /usr/sbin/rmnfsexp -d '/fsold' '-B'
    
  5. unmount the file system, if no longer needed:
    smitty
    System Storage Management - File Systems - Unmount a File System
    # command line:
    /usr/sbin/umount /fsold      
    
  6. remove the file system, if no longer needed (removes logical volume as well):
    smitty
    System Storage Management 
    - File Systems - Delete File Systems
    - [Enhanced] Journaled File Systems
    - Remove a[n Enhanced] Journaled File System
    # command line:       
    /usr/sbin/rmfs /fsold
    
  7. If TSM backup is being enabled, remove the file system from backup definition, /usr/tivoli/tsm/client/ba/bin/dsm.opt

User interface

... change the dtterm window title

echo "\033]1;my_title\007"                  # changes the icon title 
echo "\033]2;my_title\007"                  # changes the window title 
echo "\033]0;my_title\007"                  # changes both
or, simpler, with a special of command of our own:
wt my_title

... configure the mouse for left-handers

In any shell window:
xmodmap -e 'pointer = 3 2 1'
will swap the left and right mouse button
xmodmap -e 'pointer = default'
reverts to the old state.

... use a german keyboard w/ english AIX

If you do not want to remap all the keycodes to fully reflect the german keyboard, you might leave things as they are. A problem occurs with the '|' and the '\'. To circumvent it in the X environment, in /usr/lpp/X11/defaults/xmodmap/en_US/keyboard
 keycode 50 =   backslash       bar             NoSymbol
!keycode 50 =   NoSymbol        NoSymbol        NoSymbol
then run
   xmodmap /usr/lpp/X11/defaults/xmodmap/en_US/keyboard

HTML/Web issues

... validate a webpage conforming to an HTML standard

Go to "http://validator.w3.org" and you can submit your page for verification.

... wget usage examples

           # mirror a site in background:
nohup wget -m -e robots=off http://www.huge.site/ &
           # mirror a site, don't go up in tree, exclude a directories 
      wget -m -e robots=off --no-parent --exclude-directories=notthis http://www.huge.site/

... use wget against ftp-sites protected with user/passwd

Assume a remote <ftp-site> with a required account <account> with password <passwd>. Then
wget -r -e robots=off --user=<account> --password=<passwd> ftp://<account>@<ftp-site>
will let you access the files as usual.

System configuration

... increase the ftp timeout

permanently for a single machine

As root edit the system file /etc/inetd.conf
ftp     stream  tcp     nowait  root    /usr/sbin/ftpd         ftpd -t 1800
After refresh of the inetd subsystem the timeout will be 1800 seconds. Refreshing is accomplished by the line command
refresh -s inetd
or by the smitty - Processes & Subsystems - Subsystems - Refresh a Subsystem menu selection.

temporarily for an existing ftp session

As normal user the ftp subcommand
site idle 1800
will do the job. The currently valid timeout can be queried by the ftp subcommand
site idle 

... re-start printer queues

This requires printq-privileges which are currently available for the accounts bio and stephan. You use the smit tool on the command line:
smitty
then walk through the menus
Print Spooling - Manage Print Queues - Start a Print Queue 
Fill in the required information and press enter.

... configure multimedia services

  1. run
    /usr/lpp/UMS/defaults/mime/setup_ums_mime
    

... configure an HP DAT drive

see http://www.hp.com/tape/unix-dds/c_ibm.html

... fix maintenance level issues

Use
oslevel -r
to determine current OS maintenance level. If not as expected sth like
instfix -ciqk 5200-09_AIX_ML | grep ":-:" | pg
might tell you which filesets are missing to reach e.g. AIX 5.2 ML-09

... switch 32- / 64-bit kernel

bootinfo -y tells the 32/64-bit capability of the system.
bootinfo -K tells the 32/64-bittedness of the currently active kernel.
From 32 to 64 bit:
ln -fs /usr/lib/boot/unix_64 /usr/lib/boot/unix
ln -fs /usr/lib/boot/unix_64 /unix
From 64 to 32 bit:
ln -fs /usr/lib/boot/unix_up /usr/lib/boot/unix # for uni-processor machines
ln -fs /usr/lib/boot/unix_up /unix
ln -fs /usr/lib/boot/unix_mp /usr/lib/boot/unix # for multi-processor machines
ln -fs /usr/lib/boot/unix_mp /unix
Then in both cases:
bosboot -a -l /dev/hd5 -d /dev/hdisk0
bosboot -a -l /dev/hd5 -d /dev/hdisk1  # for a mirrored disk
bootlist -m normal hdisk0 hdisk1       # paranoia
bootlist -m normal -o                  # paranoia
shutdown -Fr

... create an AIX LPP / BFF package

Howto create an AIX LPP / BFF package

... change display / gfx adapter

Needs LFT/HFT console: login root via command line. Then
chdisp -d bbl0   # temporarily switch to graphics adapter "bbl0"
chdisp -p bbl0   # permanently switch to graphics adapter "bbl0"
Needs reboot / X11 restart.

... determine which CPU am I running on ?

lsattr -El proc0
should give CPU architecture and clock frequency (in Hz) for CPU proc0

... list software on media

Either use smitty, then Software Installation/Maintenance, or on the command line e.g.:
/usr/lib/instl/sm_inst list_filesets -l -f _all_available -d '/dev/cd0' >/tmp/content.txt 2>&1
will list the software on CD/DVD in drive /dev/cd0 into file /tmp/content.log. For multi-volume sets it is sufficient to list the first CD/DVD of the set.
Requires root rights.

... list contents of a (mksysb) backup

Either use smitty, then System Storage Management - System Backup Manager, or on the command line e.g.:
/usr/sbin/restore -s 4 -Tqv  -f /dev/rmt0.1; tctl -f /dev/rmt0.1 rewind
This command sequence skips the first four tape files (-s 4 -q) and positions the tape at the fifth, which is the real backup. The files in the backup are then listed (-Tv). The tape special file has to be "non-rewinding" (/dev/rmt?.1) to avoid rewinding after one of the first four EOF's. Finally, tctl repositions the tape at its load point.
Requires root rights.

AIX trouble shooting

LoadLeveler Scheduler Daemon won't start

Symptoms: LoadL_schedd process doesn't start up properly, burns useless CPU cycles, is marked as "down" in xloadl and fills /var/loadl/log/SchedLog with messages like:
LoadLeveler: JobQueue::scan(int (*)(Job *)): Error retrieving Job StepList from Queue.  Unable to route step type
Probable Reason: some corrupted remnants from previous jobs.
Cure: Cleanup /var/loadl/spool:
   rm /var/loadl/spool/jobxxxxxx.ickpt.0  # offending job relics
                                          # sometimes this is needed in addition:
   rm /var/loadl/spool/history				       
   rm /var/loadl/spool/job_queue.dir				       
   rm /var/loadl/spool/job_queue.pag				       
and restart LoadLeveler on the respective node.

nfs mount hangs / slow transfer (AIX 4.2)

It seems AIX 4.2.1 NFS client has problems negotiating the protocol version with its server. Remedy: force vers=2 wherever applicable:
mount -o vers=2  ... # when mounting manually

automountd does not (re)start

corresponds to messages such as:
nfs_mount: 109 error while mounting (.....): Function not implemented
Cure:
ypbind must be started, then:
login as root, then:
stopsrc -s automountd
stopsrc -g nfs
/etc/rc.nfs            # should start ypbind services

amd-mounted filesystems are not available

e.g. after fileserver upgrades. Probably amd considers them still as being mounted.
Cure: login as root, then:
logout all users using the respective filesystems, then:
cd /local/etc/amd   # assuming this is where amd is installed
amd_umount
amd_stop
amd_start

Mail doesn't arrive

If mail is rejected like:
From: MAILER-DAEMON@biori6m.gsi.de (Mail Delivery Subsystem)
Subject: Returned mail: Cannot send message for 3 days
To: 

  --- The transcript of the session follows ---
bellmail: lockf(/usr/spool/mail/kehr): The file access permissions do 
not allow the specified action.
the permissions in the mail folder ( /var/spool/mail/* ) are not correct.
Cure: login as root, then:
chmod g+w /var/spool/mail/* 

Netscape (ns) doesn't display PostScript files

This may have two reasons:
  1. Your browser isn't configured properly.
    Choose Options-Preferences-Helpers, there should be a line
    application/postscript /usr/local/bin/ghostview -safer %s
    
    if not, choose "New" or "Edit" and insert this line

  2. When called with the GSI-script "ns" the file /etc/profile must exist and should contain the lines
    if [ -x /local/bin/profile ]
    then
      . /local/bin/profile
    fi
    
    where /local/bin/profile is a system-wide profile copied from GSI's central AIX cluster. Both files must be world-executable (chmod a+x).

ApplixWare (ax) has license troubles

(obsolete info, update to follow soon)
This may have two reasons:
  1. You ran out of licenses. At present there's only a single license.
  2. After changes to the license file /bioapps/APPLIXE/axlocal/axlicensedat some daemons have to be killed and restarted. Login biori6b as root, get the respective process IDs with:
    ps uag | grep BIOAPPS
    ps uag | asterxd
    
    and kill the processes in that order (!). Then restart
    /bioapps/APPLIXE/axdata/axnlmgrd -c /bioapps/APPLIXE/axlocal/axlicensedat >/tmp/axnlmlog &
    

NIS server not responding for domain xxx

(with e.g. xxx=BIO_NIS)
This message (or similar ones) occurs in the console window during boot when the TCP/IP configuration is incorrect.
Recipe (root privileges required):
  1. boot in maintenance mode. You can achieve this by
  2. Try to get into a maintenance shell, e.g. by selecting "single user mode".
  3. vi /etc/rc.nfs
    
    and disable ypbind. Depending on the nature of the trouble it may be necessary to disable other components to.
    It might also be necessary to define the terminal type before using vi
    export TERM=lft
    
  4. re-boot in normal mode
  5. to correct the TCP/IP config:
    smitty
    
    and choose communications-TCP/IP-mimimum configuration.
    Enter the correct IP-address, subnet mask (e.g. 255.255.192.0, 255.255.240.0) etc.
  6. Choose the changes to be active now and at restart.
  7. Re-enable the changes in /etc/rc.nfs
  8. Reboot

CDE (dt) actions fail

even exiting might not possible
Inspect $HOME/.dt/startlog for more info.
Maybe caused by filesystem /var full.
Possible cure:
rm /var/adm/wtmp

Maintenance work w/o root login

Sometimes it may be necessary to access a system for maintenance work, bypassing the usual root login. For example when the root password is lost or the boot or login process hangs due to unavailable resources.
You will need some OS media, either bootable AIX CD of the same version as is installed (versions >=4), the infamous boot diskettes (version 3), or the Install/Maintenance floppy (version 2).

AIX >=3

  1. Boot in maintenance mode.
  2. Follow the menus until access to "Maintenance Shell" or "limited function shell" is offered. Choose it.
  3. getrootfs hdisk0
    ksh; export TERM=lft      # try, if "vi" is to be used
                              # if unsuccessful, "vi" runs in "open" mode, 
                              # i.e. use "l" and "h" to navigate right and left, respectively
    #
    # ... actions to be done to fix the problem 
    #
    sync; sync; sync          # force writing changes to disk
    shutdown -Fr
    # or:
    reboot
    

AIX 2 (RT PC)

  1. Insert the AIX V.2.x Install/Maintenance floppy.
  2. Power on the machine, it will boot off the floppy.
  3. A SYSTEM MANAGEMENT menu will be offered, choose Start the Standalone Shell (Item 3).
  4. To access the root filesystem, use:
       mount /dev/hd0 /mnt
    
    then the /etc/ directory for example will be accessible as /mnt/etc/ .
  5. When done,
       umount /mnt
    
    and leave the shell with CTRL-D. The menu will allow you to reboot into normal AIX.

root password lost

You can't get it back. Either assign a new one or temporarily (!) remove it. Follow the procedure maintenance work w/o root login to have access to the password file.

AIX >=3

In the limited function shell:
   vi /etc/security/password
and remove the root password.

AIX 2

The standalone shell has very limited capabilities only, use:
   cd /mnt/etc/security/
   dd if=passwd of=passwd.save # for security (there's no cp)
   ed passwd                   # enter very primitive line editor 
In ed, type consecutive line numbers until the line for the root password appears. Then
   s/<encryption>//g  # remove password. Use \/ if the encryption contains a / 
   w passwd                 # write edit buffer to file
   q                        # leave the editor
Leave the shell and reboot:
   sync; sync; sync         # write disk buffers
   CTRL-D                   

boot/login hangs

Could have many reasons, of course.
Often enough caused by unavailable network resources (NIS,NFS). In this case proceed as in maintenance work w/o root login to have access to the configuration files.
Emergency actions:
vi /etc/inittab
and outcomment (place a colon, :, before the line) the offending line which invokes /etc/rc.nfs.
Once reboot/login is possible, fix the true cause of the problem.

ssh/telnet login refused

Could have many reasons, of course. The sshd daemon might not be active or not even installed, telnet services might be disabled via inetd.conf etc.
A less obvious source of trouble are tcpwrappers configuration file(s), /etc/hosts.deny, /etc/hosts.allow, which by default reject any access.

enlarge X memory pool

Symptoms:
Memory hungry X apps (browsers et al.) crash, nedit refuses cut&paste, etc
Working hypothesis: X hits a 128MB memory limit.
My work around: use a modified X executable with larger heap.
  1. as root:
    cd /usr/bin/X11
    cp -p X X.save  # save original X  
    cp -p X X.large # the new X
                    # tell the executable to use 1GB heap space 
    /usr/bin/echo '\0100\0\0\0' | dd of=X.large bs=4 count=1 seek=19 conv=notrunc
    ln -sf X.large X      
    
  2. logout the desktop and kill the "X" process. It should restart immediately and the desktop login should appear.

swap a dead (mirrored) harddisk

Assume a mirrored volume group, one disk (hot swappable, e.g. hdisk5) is dead.
  1. "Break" the mirror:
    smitty - System Storage Management - Logical Volume Manager
           - Volume Groups - Unmirror a Volume Group
    
      PHYSICAL VOLUME names                              [hdisk5] # specify dead disk                      +
    
  2. Remove the dead disk from the VG:
    smitty - System Storage Management - Logical Volume Manager
           - Volume Groups - Set Characteristics of a Volume Group
           - Remove a Physical Volume from a Volume Group
    * PHYSICAL VOLUME names                              [hdisk5]                      +
    
  3. Remove the dead disk from the system:
    smitty - Devices - Fixed Disk - Remove a Disk
    
      Disk                                                hdisk5
      KEEP definition in database                         no                     +
    
    
    then remove it physically from the machine.
  4. Insert the spare disk and configure it:
    smitty - Devices - Install/Configure Devices Added After IPL
    
  5. It should now be available as hdisk5.
  6. Add it to the VG in question:
    smitty - System Storage Management - Logical Volume Manager 
           - Volume Groups - Set Characteristics of a Volume Group 
           - Add a Physical Volume to a Volume Group
    * PHYSICAL VOLUME names                              [hdisk5]                +
    
  7. Reestablish the mirror:
    smitty - System Storage Management - Logical Volume Manager 
           - Volume Groups - Set Characteristics of a Volume Group 
           - Mirror a Volume Group
      PHYSICAL VOLUME names                              [hdisk5]                +
      Number of COPIES of each logical                    2                      +
        partition
    
    (be patient, might take several minutes)

Last Update: 10-Dec-2013, M.Kraemer