Useful AIX build scripts/commands

timallen

timallen

Well Known Member
I have just completed the hardest part of an installation on an RS6000/AIX system. I had to learn some things to be able to do this, as I had only done Windows installations before.

Here are some useful things I used. These mainly helped me when I was doing the server package build and wanted to know when I was going to be able to go home, but there was at least one show-stopper that I learned about (ulimit, see point 2):

1) I created a script to show me my tasks called /home/jde/bin/p. This was really useful, because I could see, for example, which BSFN was being compiled by cc (p | grep cc) or which builddll is running. I modified it to see which services owned by jde are running. This script as is would have to be run by the user "jde", but could be modified to be run from another user by replacing $USER with jde.

#/bin/sh
# Just show processes owned by jde, not his brother jdeb7332
# Tim Allen : <[email protected]>
if [ "$1" = "-a" ]; then
ps -ef | egrep "(PID| $USER )"
elif [ "$1" = "-s" ]; then
ps -ef | egrep "(PID| $USER )" | egrep "(PID|jdenet|jdequeue)"
elif [ "$1" = "-h" ]; then
echo "usage: $0 [-a|-s|-h]"
echo " : show build tasks owned by $USER"
echo "-s : show jdenet/jdequeue services owned by $USER"
echo "-a : show all tasks owned by $USER"
echo "-h : show usage message"
else
ps -ef | egrep "(PID| $USER )" | egrep -v "(jdenet|ksh|jdequeue|tail|more|runque)"
fi

2) I checked my maximum allowed file size with "ulimit". I found it to be 2097152. Since ulimit list the file size in 512 byte blocks, this corresponds to a limit of 1GB, which is the default. In "smit->security & users->Users-> Change / Show Characteristics of a User" I changed "Soft file size" to -1 (unlimited). You have to do this as root, so you may need to request this from your systems administrator. The default file size limit is 1GB (measured in 512b blocks), which will cause an unexpected error when you do server full package builds, as the GBRSPEC.DDB is bigger than 1GB. Thanks for this, Gerd.

3) Added the following line to the ".profile" file in my home directory:

set -o vi

This lets you use vi commands for command-line editting. This will seem ridiculous, but not being able to edit the command lines will make you nuts after a while.

4) Learned that the DLL contents are listed in files like /ow/jdedwardsoneworld/b7333/packages/DV7333F001/text/CCORE.txt. This was handy when I wanted to know how much longer it was going to be before the package build finished.

5) I had to modify the /ow/jdedwardsoneworld/b7333/system/bin32/rmics.sh program slightly. It looks for IPCs owned by the user running it with this line:

ipcs | grep $USER

which failed for us. We were running as "jde", and we had another user named "jdeb7332", so the grep matched both of them. I changed the line to this:

ipcs | grep " $USER "

which only finds IPCs owned by (BTW, I couldn't find a word-boundary character for the grep regular expression in AIX-- \b didn't work. Anyone know this?) They use this line in three places in the rmics.sh, so look for all three.

Sorry if this is a bit disjointed, but hope that it is helpful to someone doing an AIX install. -tim
 
Seems like you're learning Unix from scratch.

Most Windows people like "BASH" - Bourne Again Shell - type bash at the command prompt and you'll have a command prompt that acts like the DOS prompt under NT (Up Arrow, Left Arrow, Backspace etc etc)

Ask your unix administrator to enable "bash" if it doesn't seem to work.
 
Back
Top