A I X
H i n t s & T i p s
Frequently Asked Questions (FAQ) from the AIX User and System Administrator Courses.
If you don't find it here, try the comp.unix.aix FAQ or the comp.unix.questions FAQ.
If you don't find it there post a question at the comp.unix.aix newsgroup, the Tek-Tips AIX Technical forum, or the ROOTVG.NET Forum. Any other Forums? Let us know: firstname.lastname@example.org
A I X U s e r Q & A
( = click for more information, links with are outside of ROOTVG.NET)
|Q:||How to change the prompt?|
|A:||Add in $HOME/.profile : export PS1=`hostname`:'$PWD# ' (don't forget the ' before the $).|
|Q:||How to activate history inline editing in the Korn shell (using vi)?|
|A:||Add in $HOME/.profile: set -o vi (then you can use <esc>k [up], <esc>j [down], <esc>l [right] and <esc>h [left]).|
|Q:||How to use alias in the Korn shell?|
|A:||Add in $HOME/.kshrc
alias l='ls -l'
Add in $HOME/.profile: export ENV=$HOME/.kshrc
|Q:||How to go to the previous directory (Korn shell)?|
|A:||# cd - or # cd ~- (this is called tilde-substitution, ~- is replaced by the $OLDPWD variable).|
|Q:||How do I change my default print queue?|
environment variable can be set to your default print queue.
Add in $HOME/.profile: export LPDEST=<print queue name>
S y s t e m M a n a g e m e n t Q & A
|Q:||Where do I find the latest browser version of Netscape?|
|A:||Download at AIX Netscape 7.0 has graduated.|
|Q:||Who is in a filesystem and which proces (PID) is using a file?|
|A:||# fuser -u <filesystem name>|
|# fuser <filename>|
|Q:||How to get the runlevel?|
|A:||# who -r|
|Q:||What version of AIX is used?|
|A:||# uname -a
|Q:||How to view/change the bootlist?|
|A:||View: # bootlist
1) # bootlist -m normal/service cd0 rmt0 hdisk0
2) # diag
3) use the SMS menu (reboot and F1)
|Q:||To which fileset belongs a command?|
(the which_fileset command is part of the bos.rte.install fileset, also install bos.content_list)
topas (AIX 4.2.1+), tprof, svmon, filemon are in perfagent.tools
|Q:||Which performance commands are available (AIX 4.3)?|
|Q:||Where can I find nmon ?|
|A:||The nmon (and nmon analyser) tool is helpful in
presenting all the important performance tuning information on one screen
and dynamically updating it. The tool works on any dumb screen, telnet
session, or even dial-up line. In addition, the tool is very efficient. It
does not consume many CPU cycles, usually below 2%. On newer machines, CPU
usage is well below 1%. It collects a lot more performance information
The nmon tool can also capture the same data to a text file for later analysis and graphing for reports (spreadsheet format .csv).
The nmon tool was developed to support benchmarks and performance tuning for IBM internal use but by popular demand is given away to deserving friends.
Download at http://www-106.ibm.com/developerworks/eserver/articles/analyze_aix/.
|Q:||Where can I find monitor for AIX ?|
|A:||1) download the monitor
program: AIX 4.3: monitor.2.1.8.tar.Z.
For other AIX versions: UCLA
Public Domain Software Library
2) uncompress: zcat monitor.2.1.5.tar.Z | (cd /; tar xvpf -)
3) add /usr/local/bin to your path (or PATH)
The newest version you find at http://www.mesa.nl: monitor-2.1.9.
|Q:||Where can I find perfpmr ?|
|A:||perfpmr is a
package for collecting the data needed to analyze a AIX performance problem (isn't
part of AIX BOS).
One of the tools in the package is lsc. This command gives info on Processor architecture, Processor Implementation, Processor version, CPU clock speed in MHz (approximation), Processor width (bits), Number of CPUs, Amount of usable real memory, types and size of cache.
Download from ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr
|Q:||Why is the maximum number of PP's per PV for a normal VG 1016 ?|
|A:||1016 is the number of bits per PV in the stale partition bitmap which is kept in the VGSA on all disks in a volume group. It is used to track the staleness of PP's. Let's assume that it is desirable (for efficiency reasons) to keep this bitmap within a page (4KB). 1016 bits + 8 bits used for something else (?) = 1024 bits per PV = 128 bytes * 32 PVs / VG = 4KB.|
|Q:||Is there a way to go beyond 1016 PP's/PV ?|
|A:||# chvg -t
1016 PP's * factor * #PV's is always 32512 max (which is the maximum of PP's for a standard VG).
# chvg -t 4 rootvg gives you 1016*4=4064 PP's/PV and 32/4=8 PV's/VG.
If you want more disks in the VG you can make it big:
# chvg -B rootvg (undocumented -G[igantic] flag does the same in AIX 4.3.3.)
Now you have 4*32512 PP's/VG (128 PV's with 1016 PP's/PV), but it is said you will have a lower performance (mapping size!). You can use the -t flag combined with -B.
|Q:||Anonymous ftp - how to change the standard welcome message?|
|A:||you can use dspcat /usr/lib/nls/msg/$LANG/ftpd.cat to unroll the ftp.cat into a ASCII msg file, edit the file and, then use gencat to roll it back up.|
|Q:||ftp - how to specify local user names (for example root) that cannot be used by remote FTP clients?|
|A:||The /etc/ftpusers file contains a list of local user names that the ftpd server does not allow remote FTP clients to use. This file can be edited with the ruser command or using smit ruser.|
|Q:||How to keep user's out of the system ?|
|A:||An easy option is to create /etc/nologin with (or without) a message you want displayed to all non-root users when they attempt to login. The file is removed on a reboot. It prevents non-root users from logging in but does not affect users already logged in. /etc/nologin is removed automatically after a reboot.|
|Q:||How to install the man pages (AIX 4.3.2/4.3.3) ?|
|A:||Man pages are not
installed by default.The following filesets from the AIX Base
Documentation CD must be installed:
bos.html.en_US.topnav.navigate - Top Level Navigation
bos.html.en_US.nav - Online Navigation
bos.html.en_US.cmds.cmds1 - AIX Commands Reference 1
bos.html.en_US.cmds.cmds2 - AIX Commands Reference 2
bos.html.en_US.cmds.cmds3 - AIX Commands Reference 3
bos.html.en_US.cmds.cmds4 - AIX Commands Reference 4
bos.html.en_US.cmds.cmds5 - AIX Commands Reference 5
bos.html.en_US.cmds.cmds6 - AIX Commands Reference 6
The following filesets are for AIX system calls and C library functions:
bos.html.en_US.techref.base - AIX Base Tech Ref
bos.html.en_US.techref.commo - AIX Commo Tech Ref
|Q:||What are the disk space requirements for AIX?|
a look in the release notes AIX V4
Take a look in the release notes AIX V5
|Q:||How much is one Terabyte (AIX5L JFS2 maximum filesize)?|
|A:||1 Kilobyte (KB) is
bytes (2 to the 10th power)
1 Megabyte (MB) is 1024 KB is 1 048 576 bytes (2 to the 20th power)
1 Gigabyte (GB) is 1024 MB (2 to the 30th power)
1 Terabyte (TB) is 1024 GB
1 Petabyte is 1024 TB
1 Exabyte ... etc
1 Zettabyte ...
1 Yottabyte ...
But we will never need that much space, will we?
|Q:||How to determine CPU speed in AIX?|
|A:||There's no direct command to determine CPU
speed in AIX V4. Follow this
In AIX V5.1 you can use the pmcycles command (perfagent.tools fileset).
You can also use the lsc command (isn't in the documentation Library). lsc is part of the perfpmr package.
In AIX V5.2 you can also use the prtconf command.
|Q:||What is the function of Inventory Scout?|
|A:||Inventory Scout searches the
user's system for microcode levels and compares those levels with an IBM
database of latest levels. When used with Web-based Microcode Discovery
Service, an html report is generated for the user and includes links to
the latest levels of microcode for the system (with the exception of SP
Inventory Scout gathers Vital Product Information (VPD) from the user's machine and, when used with Web-based VPD Capture Service, uploads it to the IBM MRPD database. This VPD is useful in determining the correct components to ship when a Miscellaneous Equipment Specification (MES) upgrade is ordered.
Inventory Scout User's Guide and invscout command (AIX V5).
|Q:||How to determine if hardware is 64-bit enabled?|
|A:||Hardware bit mode:
AIX V5.2: getconf HARDWARE_BITMODE or prtconf
AIX V5.1 and AIX V4.3: bootinfo -y (-y flag is not documented)
You can also take a look at Machine Type Models if you know the model number.
Kernel bit mode:
AIX V5.2: getconf KERNEL_BITMODE
AIX V5.1: bootinfo -K
AIX V4.3: no 64-bit kernel available ...
User process bit mode:
$ file prog
returns: executable (RISC System/6000) or object module not stripped,
or 64-bit XCOFF executable or object module not stripped
Hardware, kernel, and user process relationships
If the hardware bit mode is 32-bit:
1) 64-bit user processes cannot run on the 32-bit kernel
2) the 64-bit kernel cannot run on the 32-bit hardware
If the hardware bit mode is 64-bit:
1) both 32- and 64-bit user processes can run regardless of the kernel type
2) 64-bit user processes performance can be slightly degraded on the 32-bit kernel
3) 64-bit application programs developed on AIX V4.3 are source-compatible with AIX V5 but not binary-compatible: they must be recompiled on AIX V5.
See also: 32 vs. 64-bit kernel
|Q:||How to configure the InfoPrint 20 network printer?|
|A:||1) install the
infoprint 20 fileset: printers.ibm4320.rte
2) install the IBM network printer attachment: printers.ibmNetPrinter.attach
3) select "Add a Print Queue" in smit
4) select the ibmNetPrinter and then Printer Type ibm4320 (IBM InfoPrint 20)
5) select "Do NOT make this system a BOOTP/TFTP server"
6) define the PCL 5E Emulation-queue name (ascii queue)
7) define the PostScript-queue name (ps queue)
Example: do use the PostScript queue to print from Netscape!
|Q:||How to setup and use the Disk Quota System?|
|A:||Install the fileset bos.sysmgt.quota and then read Disk Quota Setup|
|Q:||Can you colorize file listings (ls command)?|
|A:||Standard the ls command won't color do color, but with the GNU version of ls it is possible ! The SWExpert magazine shows you how|
|Q:||How to read/write dos formatted diskettes?|
|A:||Install the fileset
bos.dosutil and then read Dos
or use mtools, download at Bull's Large Freeware and Shareware Archive for AIX.
|Q:||How do you use smit fast path?|
|A:||You can access SMIT
tasks (in submenu's) directly by using a fast path.
Example: smit mkuser takes you directly to the menu Add a User.
At any menu in SMIT, you can show the fast path to that menu by pressing the F8 key.
List of all fast paths
|Q:||Howto create a JFS filesystem on a floppy diskette?|
formatted floppy into drive
# mkfs -V jfs /dev/fd0
# mount -o nointegrity /dev/fd0 /mnt
|Q:||Creating a ram filesystem (RAM disk) in AIX|
8 RAM disks can be created with up to 2 GB memory (in 512 byte blocks)
allotted for each RAM disk (the size of a RAM disk cannot be changed after
it is created and they are pinned in memory).
# mkramdisk 16384 (blocks of 512 B = 8 MB)
# ls -l /dev | grep ram
# mkfs -V jfs /dev/ramdiskx
# mkdir /ramdiskx
# mount -V jfs -o nointegrity /dev/ramdiskx /ramdiskx
where x is the logical RAM disk number.
To remove the RAM filesystem:
# unmount /ramdiskx
# rmramdisk /dev/ramdiskx
|Q:||Is the AFS filesystem available for AIX?|
|A:||Yes, it is an Open source project . You can find all information at Open AFS .|
|Q:||Resolving DNS names on local host before attempting remote DNS|
|A:||Add IP address and
host name entries in the /etc/hosts file.
Create /etc/netsvc.conf and add in netsvc.conf: hosts=local,bind
|Q:||Are the KDE and Gnome desktop environments available for AIX ?|
|A:||Yes, they are part of the AIX Toolbox for Linux . You can read more on how to install it in the Running Linux Applications on AIX Redbook.|
|Q:||When does AIX/Unix run out of date ?|
important date for Unix is:
$ perl -le 'print scalar localtime(0xffffffff >> 1)'
Mon Jan 18 20:14:07 2038
As you can see you will have a 2038 problem ...This is when the Epoch (=1 Jan 1970 for Unix) time_t value (which is a signed long integer) overflows.
|Q:||Is booting possible from a mirrored rootvg using SSA drives ?|
restrictions apply if you want to boot off of an SSA disk drive:
Last two points are key. If you are
mirroring rootvg, with BOTH drives being SSA drives, then you must put
each drive in a separate loop
|Q:||Is it possible to make a system backup with DVD-ram on aix 4.3.3?|
document describes which parameters have to be changed and which software
is needed to make a system backup on
Contribution of Jurjen Jonkheer
C o m m o n D e s k t o p E n v i r o n m e n t ( C D E ) Q & A
|Q:||How do I get CDE (the desktop GUI) to read my .profile?|
|A:||The default profile
file for the CDE is $HOME/.dtprofile (not $HOME/.profile). It
controls whether your .profile is read or not. Uncomment (remove the
leading '# ') the line that contains "DTSOURCEPROFILE=true", then $HOME/.profile will be
The default editor for the desktop is dtpad, so you have to add in $HOME/.profile: export EDITOR=/usr/bin/vi to be able to use history inline editing.
|Q:||How to change the greeting on the login screen of the CDE?|
/usr/dt/config/$LANG/Xresources /etc/dt/config/$LANG/Xresources (the
2) vi /etc/dt/config/$LANG/Xresources
3) find the line: !! Dtlogin*greeting.labelString: Welcome to %LocalHost%
4) remove comment (!! ), and update login greeting
5) logout to test
|Q:||How to change the login logo of the CDE?|
1) download the xv
program (xv.3.10a.tar.Z) for your version of AIX: UCLA
Public Domain Software Library
|Q:||What CDE books and publications are recommended?|
|A:||See also: CDE
Addison-Wesley provides the following:
"User's Guide", 1995, 370 pages, ISBN 0-201-48951-9
"Advanced User's & Sys Admin Guide", 1995, 320 pages, ISBN 0-201-48952-9
"Programmer's Overview", 1995, 112 pages, ISBN 0-201-48953-9
"Programmer's Guide", 1995, 208 pages, ISBN 0-201-48954-9
"Help System Author's and Programmer's Guide", 1995, 320 pages, ISBN 0-201-48955-9
"ToolTalk Messaging Overview", 1995, 176 pages, ISBN 0-201-48956-9
"Desktop KornShell User's Guide", 1995, 128 pages, ISBN 0-201-48957-9
"Application Builder User's Guide", 1995, 176 pages, ISBN 0-201-48958-9
|Q:||The CDE is not starting because the name server is not reachable|
|A:||When using a name server name resolving is done by the DNS server only (/etc/hosts is not used). You can resolve DNS names on your local host before attempting remote DNS by adding IP address and host name entries in the /etc/hosts file and by creating /etc/netsvc.conf, and adding in netsvc.conf: hosts=local,bind|