Table of Contents
1. AIX
1.0 General concepts
1.1 SMIT, system administration
1.2 Backups, tape
1.3 Memory and process management
1.4 Shells, commands, man pages, InfoExplorer
1.5 Video, Graphics, X11
1.6 Networks and communications
1.7 LVM
1.8 AIX 4.x
1.9 Miscellaneous
HTML-ized and updated: Fri Oct 1 10:41:04 EDT 1999
General Info about this FAQ
This posting contains frequently asked questions and answers about the IBM RS/6000 series workstations and AIX versions 3 and 4. All input is very welcome, The list is split into five articles to pass thru most mailers. I’ll usually try to post them once a month to comp.unix.aix, news.answers, and comp.answers. Please let your input continue as I am most thankful for all of it.
Please make a note of the fact that these sites contain more than just the AIX FAQ and would probably be worth consulting before you post questions to any of the usenet groups. If you see a From: line it means that whatever follows is either an unabridged or slightly edited version of the input I have received, and that I may not have verified its contents. If there is no From: line, I probably know what I am talking about, and the entry is edited from various sources. All entries are numbered with major and minor subject number, e.g. 2.11. If the subject is preceded by an asterisk, that entry has been changed or added since the last posting. The comp.unix.aix group is for AIX on all IBM platforms -- RT, PS/2, 370, RS/6000 and mainframes (ESA based on OSF/1), but the traffic has evolved to discuss predominantly AIX 3.x and the RS/6000. The newsgroups comp.sys.ibm.pc.rt and comp.sys.ibm.ps2.hardware cover the RT, mostly hardware and AOS 4.3, and on PS/2 hardware respectively. Mark Whetzel posts FAQ lists about RTs in the rt and *.answers groups. There are few to non-existent discussions on AIX/370 and AIX/ESA.
If you post questions to comp.unix.aix, please be sure to indicate: the machine type and brief configuration, e.g. Model 540, 64 MB RAM, 48 MB swap space (this is actually bad), 1.2 GB XYZ hard drive, etc. Note: There are now three classes of RS/6000s - the original, RS or POWER, RS/2 or POWER2, and PowerPC. the exact AIX version number, i.e. AIX 3.1 is NOT sufficient, whereas AIX 3.1.5 or AIX 3.1 with the 3005 update is. With 3.2 you should mention any significant ptfs using the U4xxxxx numbers. I am doing this on my own time. Please do not ask me questions that should be asked to IBM. If you suspect you have software defect problems call IBM-SERV. If you have hardware problems call IBM-SERV.
1.0 General concepts
Subject: 1.000: The AIX operating system - what is it?
This is best answered by reading the text files in /usr/lpp/bos. The README file there contains general information and the bsd file contain useful information if you know BSD and/or System V. The last release for the RT PC is 2.2.1. The latest release for PS/2s
and Intel architecture machines is AIX 1.3; for PS/2s only, 1.2.1. For the RS/6000, there are three major levels, 3.2, 4.1, 4.2, and various intermediate levels. IBM has dropped support for 3.1. For those who don’t have a copy of /usr/lpp/bos/README or bsd, I’ll sumarize: IBM tried to follow IEEE, POSIX 1003.1, ANSI C, FIPS and then X/Open Issue 3. Beyond that, AIX is a combination of System V and BSD.
------------------------------
Subject: 1.001: I know neither Unix nor AIX
- where do I find more information?
If you are new to Unix, you should look at the other newsgroups in the comp.unix hierarchy, in particular comp.unix.questions. There are FAQs more most of these groups as well. If you need information about C programming, try comp.lang.c or comp.std.c, the latter for Standard ANSI C issues. comp.lang.c has a FAQ posting.
------------------------------
Subject: 1.002: What is the Object Database?
AIX stores most of the system management information in /etc/objrepos, /usr/lib/objrepos, and /usr/share/lib/objrepos. Files (also referred to as system object classes) in these directories are adminstered by the Object Database Manager, ODM, which is a set of library routines and
programs providing basic object oriented database facilities. Under most circumstances, only SMIT or the commands SMIT call (see 1.100) should be used to change the contents of the system object classes. A harmless way to look at the object database is to use odmget where is one of the files in /etc/objrepos. Experienced users can use the ODM editor, odme, to navigate the database in detail. Modifying the database should only be attempted if you know exactly what you are doing.
------------------------------
Subject: 1.003: How do I get rid of the verbose error messages?
Many of the messages from the Unix commands are available in different languages. This is controlled by the LANG environment variable, the default being En_US meaning English in the US. All the default messages have a message number associated with them, e.g.: $ cat no-such-file cat: 0652-050 Cannot open no-such-file. If you prefer the terser Unix-looking error message, set your environment variable LC_MESSAGES to C, and you will get: $ cat no-such-file cat: Cannot open no-such-file. By default LC_MESSAGES is the same as your environment LANG. Setting LANG does also work, but should be avoided since it changes app-defaults lookup etc. See locale(): LC_ALL
------------------------------
Subject: 1.004: Which release of AIX or other products do I have?
New with 3.2.5: The oslevel command shows OS and component levels.
Run oslevel -help to see options
The command ’lslpp -h bos.obj’ will show all lines referring to the BOS, Basic Operating System. E.g.: Fix Id Release Status Action Date Time User Name
------- --------------- --------- ---------- ---------- -------- ---------
Path: /usr/lib/objrepos bos.obj
03.02.0000.0000 COMPLETE COMMIT 12/31/69 18:00:00 root
U401864 03.02.0000.0000 COMPLETE COMMIT 11/12/92 20:09:35 root
U401968 03.02.0000.0000 COMPLETE COMMIT 11/12/92 23:18:21 root
U401969 03.02.0000.0000 COMPLETE COMMIT 11/12/92 23:18:20 root
U418349 03.02.0000.0000 COMPLETE COMMIT 08/28/93 15:34:13 root
U419950 03.02.0000.0000 COMPLETE COMMIT 08/28/93 15:34:11 root
For AIX 3.2, you may come across discussions on 3.2.0, 3.2.1, 3.2.2, 3.2.3 extended, 3.2.4 and 3.2.5. There is no absolute way to tell which of these you are running since the newer releases are simply 3.2.0 with some sets of PTFs added. See above example listing. These selective fixes could mean there are literally thousands of slightly different variations of 3.2 in use. Please see section 6 to request some useful faxes to help with this number game.
AIX 3.2.4 and later attempts to resolve this confusion. The OS is broken down into subsystems so that updates can be applied to an entire subsystem. lslpp also sports a new option; use ’lslpp -m bos.obj’ to show what level and update the system is running. You can also use the new oslevel command. Unless you have a pressing need (such as applications unsupported on > 3.2.3), it is recommended that you update to this level. Also see 1.128.
------------------------------
Subject: 1.005: What hardware do I have? What is availible? WITS?
The wits script is unfortunately no longer maintained. I just don’t have the time, and I’m not sure it is a realistic proposition anymore. There are so many different models that have the same model-ID that it’s impossible to be "definitive." [Editor’s note: I’ve deleted the source to the wits program from the FAQ,but it is listed as being part of the aix.tools.1.3.0.0.exe archive at Bull’s freeware download site . Press the "Download" button once the top page loads, then look for "The Large AIX Freeware and Shareware Archive" link.]
------------------------------
Subject: 1.006: Is IBM "dropping" AIX? AIX 3 discontinued.
No. IBM sells and supports AIX 4. However, on January 31, 1997 IBM will "withraw AIX 3.2.5 from marketing." That is, you won’t be able to purchase AIX 3.2.5 anymore. On December 31, 1997, IBM will "discontinue Program Services" for AIX 3.2.5. Translation: they will no longer respond to (most) defect reports for AIX 3.2.5. The US announcement letter can be read via . Pick the US as region, look for "Announcement Letters," then search for document number 996-245. 1.1 SMIT, system administration
------------------------------
1.1 SMIT, system administration
Subject: 1.100: I am used to Unix systems programming, why should I learn SMIT?
Using SMIT is probably very different from your normal way of doing system administration, but could prove very useful in the long run. In some areas, in particular TCP/IP, NFS, etc., you can also do things the normal way, but it is unfortunately difficult to know exactly when the normal way works. Again, always using SMIT is probably your best way
to go, even when you have to learn a new tool. What SMIT actually does is build up commands with all required options to perform the functions requested and execute them. The commands called and the output they produce are stored in the files smit.script and smit.log in your home directory. Looking in smit.script may teach you more about system administration.
------------------------------
Subject: 1.101: How do I turn off the "running man" in smit?
Use smitty, the standard curses version or add this line to your .kshrc file: alias smit="smit -C"
------------------------------
Subject: 1.102: How do I import an /etc/passwd or /etc/group file from another box?
If the other box is non-AIX, copy the password and group entries for the non-system users into AIX’s /etc/passwd and /etc/group files. Then run /bin/pwdck -t ALL. This will create the proper entries in the shadow password file (/etc/security/users). You should also run usrck and grpck. To duplicate the password and group entries from another AIX box, copy /etc/passwd, /etc/group, /etc/security/passwd, /etc/security/group, /etc/security/user, /etc/security/limits, /etc/security/environ. The last three are optional unless you modified them. If you modified /etc/security/login.cfg, you should also copy that file.
------------------------------
Subject: 1.103: Cleaning up utmp, who, and accounting problems
The best way to fix this problem is to fix the programs which are causing the behavior in the first place. The short answer is to call software support and ask for the "UTMPFIX" collection of PTFs. Virtually all of these problems should be fixed in the 3251 PMP and the only one I’ve been able to prove is still broken is using ALT-F4 to close an aixterm. This applies if you are running an X11R5 xterm on 3.2. Add this to the top of X11R5 mit/clients/xterm/main.c:
#ifdef AIXV3
#define USE_SYSV_UTMP
#define HAS_UTMP_UT_HOST
#define WTMP_FILENAME "/var/adm/wtmp"
#endif
And your utmp problems should go away. If you want xterminal sessions to go into the wtmp file you need to define -DWTMP in the Imakefile and be sure the WTMP_FILENAME is set to the right place. Section 8.02 contains a small C program that you can use until the PTFs arrive. The program must be run as root and will periodically clean up old entries. Another utmp program was posted to comp.sources.unix, volume 25, issue 96 by David W. Sanderson that also works on AIX 3.1.
------------------------------
Subject: 1.104: How to fsck the root filesystem
You can run fsck either in maintenance mode or on mounted filesystems.
Try this:
1. boot from diskette (AIX 3 only --- AIX 4 boot from CD or tape)
2. select maintenance mode
3. type /etc/continue hdisk0 exit (replace hdisk0 with boot disk if
not hdisk0)
4. fsck /dev/hd4
------------------------------
Subject: 1.105: How can I unmount /usr to run fsck on it?
In order to fsck /usr, it has to be unmounted. But /usr cannot be unmounted because /bin is symbolically linked to /usr/bin. Also /etc/fsck is symbolically linked to /usr/sbin/fsck. To work around this, when you boot from the boot/maintenance diskettes and enter maintenance mode, enter "getrootfs hdisk0 sh" instead of "getrootfs hdisk0" where hdisk0 is the name of the boot disk. Then run "fsck /dev/hd2".
------------------------------
Subject: 1.108: How do I see/change parameters like number of processes per user?
You can use SMIT as described below or simply use lsattr/chdev. The former will list the current setting as in:
# lsattr -E -l sys0 -a maxuproc
maxuproc 40 Maximum # of processes allowed per user True and you can then increase the maxuproc parameter:
# chdev -l sys0 -a maxuproc=200
sys0 changed
If you just type ’lsattr -E -l sys0’ you will get a list of all parameters, some of which can be changed but not others. If you want to use smit, do as follows: smit
System Environments and Processes
Change / Show Operating System Parameters
- on this screen you can change by overtyping the following fields:
- Maximum number of PROCESSES allowed per user
- Maximum number of pages in block I/O BUFFER CACHE
- Maximum Kbytes of real memory allowed for MBUFS
- toggle fields exist for:
- Automatically REBOOT system after a crash (false/true)
- Continuously maintain DISK I/O history (true/false)
Info 1.30 erroneously suggests that in AIX 3.2.5 you can set different limits for different users.
------------------------------
Subject: 1.109: How do I shrink the default paging space on hd6?
1) create a paging space to use temporarily
mkps -s 20 -a rootvg
2) change default paging space hd6 so it is not used at next reboot
chps -a n hd6
3) For AIX 3.1, edit /etc/rc.boot4 and change swapon /dev/hd6; for AIX 3.2 and 4.x, edit /sbin/rc.boot and change swapon /dev/hd6 swapon /dev/paging00
3a)Since the default system dump device is /dev/hd6 in 4.1.x, it has to be changed to the temporary swap device before you remove the old swap device.
sysdumpdev -p /dev/paging00
4) Update information in boot logical volume
bosboot -a (3.1)
bosboot -a -d hdisk0 (3.2 & 4)
5) shutdown and reboot
6) remove current hd6 and create a new one of smaller size
rmps hd6
mklv -y hd6 -t paging rootvg 7) Re-edit /etc/rc.boot4 (3.1), /sbin/rc.boot (3.2) to swap to /dev/hd6
swapon /dev/hd6
7a)On AIX 4, change the dump device back to hd6:
sysdumpdev -p /dev/hd6
8) Update information in boot logical volume
bosboot -a (3.1)
bosboot -a -d hdisk0 (3.2 & 4.1)
9) change current paging device (paging00) so it is inactive at next boot
chps -a n /dev/paging00
10) shutdown, reboot, remove paging00 using the command:
rmps paging00
You can check your paging space with ‘lsps -a‘
------------------------------
Subject: 1.110: The swapper seems to use enormous amounts of paging space, why?
When you run ps, you may see a line like:
USER PID %CPU %MEM SZ RSS TT STAT TIME CMD
root 0 0.0% 14% 386528 8688 - S 17:06 swapper
This is normal behavior, the swapper looks to ps like it has the entire paging space plus real memory allocated.
------------------------------
Subject: 1.111: How much paging space do I need?
See answer 2 in question 1.300.
------------------------------
Subject: 1.112: How do I mount a floppy disk as a filesystem?
You can build a filesystem on a floppy and mount it, however the filesystem will be read only. The reason that the filesystem will be read only is because AIX Version 3.1.5 cannot create a journal log on a diskette. The intended use is for temporary access to read only data. The diskette file system must be unmounted after use and during system backup procedures or errors could occur. To make the read only filesystem on a floppy:
1. Make a subdirectory on an existing filesystem and place all of the files that the diskette will contain into this subdirectory.
2. Enter the following command to create a prototype file containing information about the new filesystem, in the example /dir_struct is the pathname of the subdirectory created in step 1, and proto_filename is the name of the prototype file to be created. proto /dir_struct > proto_filename
3. Place a formatted floppy into the drive.
4. Edit the prototype file and replace the first line with the following: 0 0
5. Enter the following command to make the filesystem on your floppy:
mkfs -p proto_filename -V jfs /dev/fd0
6. Create the directory upon which you will mount the floppy based filesystem, or you can use /mnt. Mount the filesystem:
mount -r -V jfs /dev/fd0 /your_mount_point
7. To unmount the filesystem:
umount /dev/fd0
Since the filesystem is read-only it may be of limited use but if you are going to use it for utility programs and other data that does not change much, it may still be useful. If you need to change the data, you can copy the directory from the floppy into another directory, make your modifications, and remake the filesystem using this procedure.
------------------------------
Subject: 1.113: How do I remove a committed lpp?
AIX 3.2.5: you can get rid of COMMITTED lpps/ptfs by installing with the force option and then rejecting the package.
AIX 4.1 users: installp has a new option, uninstall (-u) which can be
used to remove lpps.
------------------------------
Subject: 1.114: How can I recover space after installing updates?
Note: If you are a /usr server, do not use this because the files mentioned below are needed by /usr clients and cannot be deleted. Installp creates numerous files in /usr to clean up after failed/rejected installs and also for de-installing uncommitted lpps. Once you have COMMITted packages you can remove these files safely. Depending on your installation activity the numbers can be significant: hundreds-to-thousands of files, megabytes of data. Files eligible for removal are associated with each "product" you have installed; the largest collection being due to bos. After COMMITting bos lpps, you may safely remove all files of the form:
/usr/lpp/bos/deinstl*
/usr/lpp/bos/inst_U4*
/usr/lpp/bosadt/deinstl*
and /usr/lpp/bosadt/inst_U4*
You may repeat this for all additional COMMITted products (e.g., bostext1, bosnet, xlc) you have on your system. This problem of lingering install files is a known defect in installp. If you have installed PTF U411711 (or any superseder of it: U412397, U413366, U413425) the deadwood in /usr will not be quite as prevalent. No single PTF currently available completely corrects this problem. On my own 320, the following freed up 12.4M in /usr:
# rm -R /usr/lpp/bos/deinstl*
# rm -R /usr/lpp/bos/inst_U4*
------------------------------
Subject: 1.115: Where are the AIX log files kept?
AIX logs messages as specified in /etc/syslog.conf. Here’s an example
*.err;kern.debug;auth.notice;user.none /dev/console
*.err;kern.debug;daemon,auth.notice;mail.crit;user.none /var/adm/messages
lpr.debug /var/adm/lpd-errs
*.alert;kern.err;daemon.err;user.none operator
*.alert;user.none root
*.emerg;user.none *
for loghost machines, to have authentication messages (su, login, etc.) logged to a file, un-comment out the following line and adjust the file name as appropriate. if a non-loghost machine chooses to have such messages sent to the loghost machine, un-comment out the following line.
auth.notice /var/log/authlog
mail.debug /var/log/syslog
following line for compatibility with old sendmails. they will send messages with no facility code, which will be turned into "user" messages by the local syslog daemon. only the "loghost" machine needs the following line, to cause these old sendmail log messages to be logged in the mail syslog file.
user.alert /var/log/syslog
non-loghost machines will use the following lines to cause "user" log messages to be logged locally.
user.err /dev/console
user.err /var/adm/messages
user.alert ‘root, operator’
user.emerg *
------------------------------
Subject: 1.116: How can I log information about ftp accesses to a file?
1) In /etc/syslog.conf, add the line: daemon.debug /tmp/daemon.log
2) # touch /tmp/daemon.log
# refresh -s syslogd
3) Modify your inetd.conf so that ftpd is called with the "-l" flag. You may also want the "-d" flag. This can be done with ’smit inetdconf’. All the syslog messages from various system daemons should now appear in the file "/tmp/daemon.log".
------------------------------
Subject: 1.117: How do I find a file name from the inode number?
ncheck -i nnnn /mntpoint
------------------------------
Subject: 1.118: How do I set up postscript accounting?
Ephraim Vider originally wrote this program to configure postscript page accounting. It acts as a backend wrapper which logs accounting information in /etc/qconfig and can be ftp’d from utpapa.ph.utexas.edu in /pub/aix/psacct.tar.Z.
Compile with:
cc pswrap.c -o pswrap -lqb
and then make this program suid root:
chown root pswrap
chmod u+s pswrap
If this step is not done, the printer will hang.
Then start up SMIT and go to :
Spooler
Manage Local Printer Subsystem
Local Printer Queue Devices
Change / Show Characteristics of a Queue Device
0 评论:
发表评论