home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / misc / aix1025.zip / AIX_FAQ.2 < prev    next >
Internet Message Format  |  1993-10-27  |  65KB

  1. Path: nlbbs!jaxsat!pagesat!decwrl!uunet!cs.utexas.edu!mavrick!basto@cactus.org
  2. From: basto@cactus.org (Luis Basto)
  3. Newsgroups: comp.unix.aix,news.answers,comp.answers
  4. Subject: AIX Frequently Asked Questions (Part 2 of 3)
  5. Summary: This posting contains a list of Frequently Asked Questions and thei
  6.  answers about AIX, IBM's version of Unix.
  7. Keywords: AIX RS/6000 questions answers
  8. Message-ID: <1463@mavrick.UUCP>
  9. Date: 25 Oct 93 06:04:24 GMT
  10. Expires: 15 Nov 93 01:23:45 GMT
  11. Sender: luis@mavrick.UUCP
  12. Reply-To: basto@cactus.org (Luis Basto)
  13. Followup-To: comp.unix.aix
  14. Lines: 1589
  15. Approved: news-answers-request@MIT.Edu
  16. Supersedes: <1460@mavrick.UUCP>
  17.  
  18. Archive-name: aix-faq/part2
  19. Last-modified: October 25, 1993
  20. Version: 2.42
  21.  
  22.  
  23. Version: $Id: aix.faq,v 2.42 93/10/25 basto $
  24.  
  25. Frequently Asked Questions to AIX 3.x and IBM RS/6000
  26. _____________________________________________________
  27.  
  28. 1.201: How do I do remote backup?
  29.  
  30. There seems to be several ways of doing this. I found the following works:
  31.  
  32.   tar -b1 -cf - . | rsh REMOTEHOST "dd ibs=512 obs=1024 of=/dev/TAPEDEVICE"
  33.  
  34.  
  35. From: kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer)
  36.  
  37. mksysb will not back up to remote tape devices. The following script
  38. will do remote backups.
  39.  
  40. [Ed.: I've verified this script works fine. However, it may be slow for
  41.  large filesystems since it creates a temp file of filenames in /tmp.]
  42.  
  43. #!/bin/ksh
  44. # @(#) Create a backup tape of the private user data.
  45. #=================================================================#
  46. #   Script :  usave.sh                                            #
  47. #   Author :  F. Kraemer                                          #
  48. #   Date   :  92/02/19                                            #
  49. #   Update :  92/10/29                                            #
  50. #   Info   :  the ultimative backup script                        #
  51. #   Example:  usave.sh /dev/rmt0      -  save to local tape       #
  52. #             usave.sh /save/save.me  -  save to local file       #
  53. #             usave.sh /tmp/pipe      -  save to remote tape      #
  54. #-----------------------------------------------------------------#
  55. PS4="(+) "
  56. #set -x
  57. PROG=$(basename $0)
  58. HOST=$(hostname)
  59. TODAY=$(date +%H:%M:%S)
  60. #-----------------------------------------------------------------#
  61. # cleanup                                                         #
  62. #-----------------------------------------------------------------#
  63. cleanup ()
  64. {
  65. ec=$1
  66. error=$2
  67. case "$ec"
  68. in
  69.    "$USAGE_EC")    # usage error
  70.      error="Usage:\t$PROG DeviceName\n" 1>&2
  71.     ;;
  72.    "$NOTAP_EC")    # Tape error
  73.      error="error:\t$PROG: $DEVICE is not available on the system.\n" 1>&2
  74.     ;;
  75.    "$LISTE_EC")    # list error
  76.      error="error:\t$PROG: could not create tar list for $LOGNAME.\n" 1>&2
  77.     ;;
  78.    "$NOTAR_EC")    # tar command error
  79.      error="error:\t$PROG: tar command failed.\n" 1>&2
  80.     ;;
  81.    "$PIPEP_EC")    # pipe error
  82.      error="error:\t$PROG: mknod command failed.\n" 1>&2
  83.     ;;
  84.    "$NORSH_EC")    # rsh error
  85.      error="error:\t$PROG: rsh - Remote Shell command failed.\n" 1>&2
  86.     ;;
  87.    "$RHOST_EC")    # remote host error
  88.      error="error:\t$PROG: Remote Host unknown.\n" 1>&2
  89.     ;;
  90.    *)
  91.    ;;
  92. esac
  93. case "$DEVICE"
  94. in
  95.     #
  96.     # Fix the block size if $DEVICE is a tape device
  97.     #
  98.     /dev/rmt[0-9]*)
  99.         echo "\n\t$PROG: Rewinding tape to begin.........(please wait)\n"
  100.         tctl -f $DEVICE rewind 2>/dev/null
  101.         ;;
  102.     *) ;;
  103. esac
  104. rm -f ${LIST} ${PIPE} 2>/dev/null
  105. [ -n "$error" ] && echo "\n${error}\n"
  106. trap '' 0 1 2 15
  107. exit "$ec"
  108. }
  109. #-----------------------------------------------------------------#
  110. # Variables.                                                      #
  111. #-----------------------------------------------------------------#
  112. USAGE_EC=1                         # exit code for usage error
  113. NOMNT_EC=2                         # exit code wrong device name
  114. NOTAP_EC=3                         # exit code no tape available
  115. LISTE_EC=4                         # exit code backup list error
  116. NOTAR_EC=5                         # exit code for wrong tar
  117. TRAPP_EC=6                         # exit code for trap
  118. PIPEP_EC=7                         # exit code for pipe
  119. RHOST_EC=8                         # exit code for bad ping
  120. NORSH_EC=9                         # exit code for bad rsh
  121. DEVICE="$1"                        # device to tar into
  122. LIST="/tmp/.tar.$LOGNAME.$$"       #
  123. REMOTEH=""                         # Remote host for backup
  124. REMOTET=""                         # Remote tape for backup
  125. tapedev=                           #
  126. PIPE="/tmp/pipe"                   # Pipe for remote backup
  127. #-----------------------------------------------------------------#
  128. # main()                                                          #
  129. #-----------------------------------------------------------------#
  130. tput clear
  131. echo "\n\t$PROG started from $LOGNAME@$HOST on $TERM at $TODAY.\n"
  132. rm -f $LIST 2>/dev/null
  133. #-----------------------------------------------------------------#
  134. # Trap on exit/interrupt/break to clean up                        #
  135. #-----------------------------------------------------------------#
  136. trap "cleanup $TRAPP_EC \"Abnormal program termination. $PROG"\"  0 1 2 15
  137. #-----------------------------------------------------------------#
  138. # Check command options                                           #
  139. #-----------------------------------------------------------------#
  140. [ "$#" -ne 1 ]  &&  cleanup "$USAGE_EC" ""
  141. #-----------------------------------------------------------------#
  142. # Check device name                                               #
  143. #-----------------------------------------------------------------#
  144. [ `expr "$DEVICE" : "[/]"` -eq 0 ] && cleanup "$NOMNT_EC" \
  145.         "$PROG: Backup device or file name must start with a '/'."
  146. #-----------------------------------------------------------------#
  147. # Check tape device.                                              #
  148. #-----------------------------------------------------------------#
  149. case "$DEVICE"
  150. in
  151.     #
  152.     # Fix the block size if $DEVICE is a tape device
  153.     #
  154.     /dev/rmt[0-9]*)
  155.         #
  156.         echo "\n\t$PROG: Verify backup media ($DEVICE)............\n"
  157.         #
  158.         # see if a low or high density tape device was specified
  159.         # (eg rmt0.1)
  160.         density="`expr $DEVICE : \
  161.                 "/dev/rmt[0-9]*\.\([0-9]*\)"`"
  162.         #
  163.         # strip /dev/ from device name and
  164.         # get the base name (eg translate:
  165.         # /dev/rmt0.2 to rmt0)
  166.         #
  167.         tapedev="`expr $DEVICE : \
  168.                 "/dev/\(rmt[0-9]*\)[\.]*[0-9]*"`"
  169.         #
  170.         # Check if the tape is defined in the system.
  171.         lsdev -C -c tape -S Available -F "name" | grep $tapedev >/dev/null 2>&
  172.         rc=$?
  173.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  174.         #
  175.         # Restore old tape name.
  176.         #
  177.         [ "${density:-1}" -lt 4 ] && density=1 || density=5
  178.         DEVICE="/dev/${tapedev}.${density}"
  179.         echo "\n\t$PROG: Insert a tape in ($DEVICE)........(press enter)\n"
  180.         read TEMP
  181.         echo "\n\t$PROG: Rewinding tape to begin...........(please wait)\n"
  182.         tctl -f $DEVICE rewind 2>/dev/null
  183.         ;;
  184.     #
  185.     # Backup is done on remote host. The remote shell facility
  186.     # must be set up and running.
  187.     #
  188.     ${PIPE}*)
  189.         #
  190.         echo "\n\t$PROG: Assuming remote backup via network.\n"
  191.         echo "\t$PROG: Enter name of Remote Host   ===> \c"
  192.         read REMOTEH
  193.         echo "\n\t$PROG: Pinging Remote Host to test connection.\n"
  194.         ping ${REMOTEH} 1 1 >/dev/null 2>&1
  195.         rc=$?                                    # give up unknown host
  196.         [ "$rc" -ne 0 ] && cleanup "$RHOST_EC" ""
  197.         JUNK=$(rsh ${REMOTEH} "/usr/sbin/lsdev -C -c tape -S Available")
  198.         rc=$?                                    # give up rsh failed
  199.         [ "$rc" -ne 0 ] && cleanup "$NORSH_EC" ""
  200.         echo "\t$PROG: Available Tapes on ${REMOTEH} are :\n\n\t\t${JUNK}\n"
  201.         echo "\t$PROG: Enter name of Remote Tape (e.g. /dev/rmt0) ===> \c"
  202.         read REMOTET
  203.         echo "\n\t$PROG: Insert tape on ${REMOTEH} in ${REMOTET}..(pres
  204.  enter)"
  205.         read TEMP
  206.         echo "\t$PROG: Rewinding Remote Tape ${REMOTET} on ${REMOTEH}.\n"
  207.         rsh ${REMOTEH} "tctl -f ${REMOTET} rewind"
  208.         rc=$?                                    # give up rsh failed
  209.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  210.         rm -f ${PIPE} 2>/dev/null
  211.         mknod ${PIPE} p
  212.         rc=$?                                    # give up mknod failed
  213.         [ "$rc" -ne 0 ] && cleanup "$PIPEP_EC" ""
  214.         cat ${DEVICE} | rsh ${REMOTEH} "dd of=${REMOTET} obs=100b 2>/dev/null
  215.  &
  216.         ;;
  217.     *)  ;;
  218. esac
  219. #-----------------------------------------------------------------#
  220. # Prepare the list.                                               #
  221. #-----------------------------------------------------------------#
  222. echo "\n\t$PROG: Create list of files to be saved...."
  223. find $HOME -print > $LIST
  224. rc=$?
  225. [ "$rc" -ne 0 ] &&  cleanup "$LISTE_EC" ""
  226. #-----------------------------------------------------------------#
  227. # tar the files.                                                  #
  228. #-----------------------------------------------------------------#
  229. echo "\n\t$PROG: Changing current directory to (/)...."
  230. cd / > /dev/null 2>&1
  231. echo "\n\t$PROG: Running tar format backup from user ($LOGNAME)...."
  232. tar -cvf "$DEVICE" -L "$LIST"
  233. rc="$?"
  234. [ "$rc" -ne 0 ]  && cleanup "$NOTAR_EC" ""
  235. #-----------------------------------------------------------------#
  236. # Backup completed                                                #
  237. #-----------------------------------------------------------------#
  238. TODAY=$(date +%H:%M:%S)
  239. echo "\n\t$PROG ended at $TODAY............................\n\n"
  240. cleanup 0
  241. #-----------------------------------------------------------------#
  242. # EOF                                                             #
  243. #-----------------------------------------------------------------#
  244.  
  245.  
  246. 1.202: How do I backup a multi-disk volume group?
  247. From: pack@acd.ucar.edu (Daniel Packman)
  248.  
  249. [ Ed.: I have not verified this procedure. I would actually recommend
  250.   NOT to have one volume group span multiple disks unless you really
  251.   need such big logical volumes. ]
  252.  
  253.   1. If you have a set of three or more disks in a volume group
  254.      (typically 3 for 5xx machines with three internal drives;
  255.      with only two, the procedures outlined here have to be modified
  256.      to ignore the fact that you don't have a quorum in the volume group)
  257.  
  258.   2. If one drive has failed (usually only one fails at a time :-) )
  259.  
  260. It is possible to go through a service boot (the volume group is called
  261. rootvg and one of the 2 good disks on it is called hdisk0):
  262.  
  263.   importvg -y rootvg hdisk0
  264.   varyonvg -f -n -m1 rootvg
  265.  
  266. These commands will work, but give error messages. If you wish to mount
  267. a user filesystem, say /u on logical volume /dev/lv00, then
  268.  
  269.   mount -f /dev/lv00 /v
  270.  
  271. will work only if jfslog, the journaled file system log device, is not
  272. on the damaged disk. If it is, you must (and can in any case) mount the
  273. filesystem read-only:
  274.  
  275.   mount -f -r /dev/lv00 /v
  276.  
  277. This crucial and rather obvious point baffled several level 3 support
  278. personnel at Austin as well as myself for almost a week. Once the file
  279. system(s) of interest are available, they can be saved to tape for
  280. restoration later. Of course, one can expect only about two thirds of a
  281. filesystem to be recoverable if it spans all 3 physical disks. One
  282. other point to remember is that the standard boot procedure from floppy
  283. includes the restore command but does not include the backup command.
  284.  
  285. *****************************************************************************
  286. * If you do not have other RS6000 machines at your site it is imperative    * 
  287. * that you either build a bootable tape which includes either restore or    * 
  288. * tar or cpio (a bootable floppy set will not have enough space) or at the  *
  289. * very least copy onto a spare floppy backup, cpio, or tar.  The floppy     *
  290. * should be created with backup -ivq so that its contents can be read into  *
  291. * the memory resident system after booting.                                 *
  292. *****************************************************************************
  293.  
  294. All is not lost if tar, cpio or backup are available on an undamaged
  295. disk that can be mounted. Since tar and cpio are in /bin, they may both
  296. very well be unavailable.
  297.  
  298. It is a very good idea for those who have tape devices to build a
  299. bootable tape with their desired extra commands in it. Follow the
  300. instructions from IBM but add your desired commands to the following
  301. three files:
  302.  
  303.     /usr/lpp/bosinst/tape2
  304.     /usr/lpp/bosinst/diskette/boot2
  305.     /usr/lpp/bosinst/diskette/inslist
  306.  
  307. If you have anything other than a minimum memory configuration, you
  308. should be able to add many commands.
  309.  
  310.  
  311. 1.203: How do I put multiple backups on a single 8mm tape?
  312. From: kerm@mcnc.org (Cary E. Burnette)
  313.  
  314. There are two possible solutions to this, both of which use /dev/rmt0.1
  315. which is non-rewinding.
  316.  
  317. SOLUTION #1
  318. -----------
  319.  
  320. To put multiple backups on a single tape, use /dev/rmt0.1, which is a
  321. no-rewind device, using either rdump or backup (both by name & inode
  322. work). Using rdump or backup "byinode" both generate the message that
  323. the tape is rewinding but actually do not. This is an example that
  324. works on my system:
  325.  
  326. # rsh remote1 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  327. # rsh remote2 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  328. # tctl -f /dev/rmt0.1 rewind       # rewinds the tape
  329.  
  330. where I am implementing the command from host.
  331. To restore a table of contents of the first I would use 
  332.  
  333. # restore -f /dev/rmt0.1 -s1 -tv
  334.  
  335. where the -s1 flag tells restore to go to the first record on the tape. 
  336. Type the exact command again to get the second record. The -s(Number)
  337. means go to Number record from this spot. It works pretty well.
  338.  
  339.  
  340. SOLUTION #2
  341. -----------
  342.  
  343. Steve Knodle
  344. Educational Resources Center
  345. Clarkson University
  346.  
  347. I use:
  348. ------------------- Dump.sh --------------------
  349. CONTENTSFILE=`date |dd conv=lcase |sed -e 's/19//' |awk '{print $6 $2 $3}'`
  350. set -x
  351. LEVEL=$1
  352. shift
  353.  
  354. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /
  355. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /usr
  356. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /u
  357. tctl -f /dev/rmt0 rewind
  358.  
  359. touch /usr/local/dumps/Contents.$CONTENTSFILE
  360. echo "Dumping /" >>/usr/local/dumps/Contents.$CONTENTSFILE
  361. restore -t -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  362. echo "Dumping /usr" >>/usr/local/dumps/Contents.$CONTENTSFILE
  363. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  364. echo "Dumping /u" >>/usr/local/dumps/Contents.$CONTENTSFILE
  365. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  366. tctl -f /dev/rmt0 rewind
  367.  
  368. I process the table-of-contents first by a little program that does
  369. common prefix encoding, and then compress.
  370.  
  371. This gives a table of contents file I can keep on-line until the tape
  372. is reused.
  373.  
  374.  
  375. 1.204: How can I make an exact duplicate of a tape over the network?
  376.  
  377. The challenge here is not to have to create a temporary file (disk space
  378. limitation) and work across heterogeneous networks.
  379.  
  380. This script might work:
  381.  
  382. LOCAL=/dev/tape_dev
  383. REMOTE=/dev/tape_dev
  384. dd if=$LOCAL ibs=64k obs=512 | rsh remote_host dd ibs=512 obs=64k of=$REMOTE
  385.  
  386.  
  387. From: pack@acd.ucar.edu (Daniel Packman)
  388.  
  389. Daniel provides the following perl script to convert from the known
  390. world's function codes to AIX for compatibility.
  391.  
  392. #!/bin/perl
  393. # Wrapper to convert input rmt requests to
  394. # AIX 3.2 ioctl numbers.  We pass on all commands we don't understand
  395. # I0 MTWEOF -> I10  STWEOF write and end-of-file record
  396. # I1 MTFSF  -> I11  STFSF  forward space file
  397. # I2 MTBSF  -> I12  STRSF  reverse space file
  398. # I3 MTFSR  -> I13  STFSR  forward space record
  399. # I4 MTBSR  -> I14  STRSR  reverse space record
  400. # I5 MTREW  -> I6   STREW  rewind
  401. # I6 MTOFFL -> I5   STOFFL rewind and unload tape
  402. # I7 MTNOP  -> I0   (no-op? should ignore following count)
  403. # I8 MTRETEN-> I8   STRETEN retension tape, leave at load point
  404. # I9 MTERASE-> I7   STERASE erase tape, leave at load point
  405. #I10 MTEOM (position to end of media ... no ibm equivalent?)
  406. #I11 MTNBSF  (backward space file to BOF ... no ibm equivalent?)
  407. @iocs = (10,11,12,13,14,6,5,0,8,7);
  408. open(RMT,"|/usr/sbin/rmt") || die "Can't open pipe to rmt\n";
  409. select(RMT);
  410. $| = 1;
  411. while (<STDIN>) {
  412.   s/(^I)(\d$)/I$iocs[$2]/;
  413.   exit 0 if $_ =~ /^[Qq]/;
  414.   print RMT $_ ; }
  415. exit 0;
  416.  
  417. ______________________________________________________________________________
  418. 1.300: Some info about the memory management system
  419. From: Michael Coggins (MCOG@CHVM1.VNET.IBM.COM).
  420.  
  421. 1. Does AIX use more paging space than other unix systems?
  422.  
  423. Under many scenarios, AIX requires more paging space than other unix
  424. systems. The AIX VMM implements a technique called "early allocation of
  425. paging space". When a page is allocated in RAM, and it is not a
  426. "client" (NFS) or a "persistent" (disk file) storage page, then it is
  427. considered a "working" storage page. Working storage pages are commonly
  428. an application's stack, data, and any shared memory segments. So, when
  429. a program's stack or data area is increased, and RAM is accessed, the
  430. VMM will allocate space in RAM and space on the paging device. This
  431. means that even before RAM is exhausted, paging space is used. This
  432. does not happen on many other unix systems, although they do keep track
  433. of total VM used.
  434.  
  435. Example 1: 
  436. Workstation with 64mb RAM is running only one small application that
  437. accesses a few small files. Everything fits into RAM, including all
  438. accessed data. On AIX, some paging space will already be used. On
  439. other unix systems, paging space will be 100% free. Clearly, this is an
  440. example that shows where we use more paging space than the other machines.
  441.  
  442. Example 2:
  443.  
  444. Same machine as above, except we are running in an environment where
  445. many applications are running with inadequate RAM.  Also, in this
  446. environment, the system is running applications that are started, run,
  447. left idle, and not in constant use.  A session of FRAME running in a
  448. window, for example.  What happens is that eventually (theoretically)
  449. all applications will be paged out at least once.  On the AIX system and
  450. the other systems the total paging requirements will be the same
  451. (assuming similar malloc algorithm).  The major difference is that the
  452. AIX system allocated the paging space pages before they were actually
  453. needed, and the other systems did not allocate them until they were
  454. needed.  However, most other systems have an internal variable that gets
  455. incremented as virtual memory pages are used.  AIX does not do this. 
  456. This can cause the AIX system to run out of paging space (virtual
  457. memory), even though malloc() continues to return memory.  This
  458. "feature" allows sparse memory segments to work, but requires that all
  459. normal users of malloc() (sbrk()) know how much virtual memory will be
  460. available (actually impossible), and to handle a paging space low
  461. condition.  A big problem.  There are some pretty obvious pros and cons
  462. to both methods of doing Virtual Memory.
  463.  
  464. 2. How much paging space do I need?
  465.  
  466. Concerning the rule of thumb of having 2 times RAM for paging space:
  467. this is rather simplistic, as are most rules of thumb.  If the machine
  468. is in a "persistent storage environment", meaning that they have a few
  469. small programs, and lots of data, they may not need even as much as 1
  470. times RAM for paging space.  For example, a 1GB database server running
  471. on a 6000 with 256MB of RAM, and only running about 50MB of "working"
  472. storage does not need 512MB of paging space, or even 256MB.  They only
  473. need the amount of paging space that will allow all their working
  474. storage to be paged out to disk.  This is because the 1GB database is
  475. mostly "persistent storage", and will require little or no paging space. 
  476. Excessive paging space may simply mean wasted disk space.  However,
  477. avoid insufficient paging space.  Tip: Don't have more than one paging
  478. space per disk.  Tip: Put lots of RAM in your system - it will use it.
  479.  
  480. 3. Why does vmstat show no free RAM pages?
  481.  
  482. AIX uses RAM as a possibly huge disk buffer.  If you read a file in the
  483. morning, that file is read into RAM, and left there.  If no other
  484. programs need that RAM, that file will be left in RAM until the machine
  485. is halted.  This means that if you need the file again, access will be
  486. quick.  If you need that RAM, the system will simply use the pages the
  487. file was using.  The pages were flushed back to disk earlier.  This
  488. means that you can get a huge speedup in disk access if you have enough
  489. RAM.  For example, a 200MB database will just ease into RAM if you have
  490. a 256MB system.
  491.  
  492. 4. Since vmstat shows no free RAM pages, am I out of RAM?
  493.  
  494. Probably not.  Since disk files will be "mapped" into RAM, if vmstat
  495. shows lots of RAM pages FREE, then you probably have too much RAM (not
  496. usual on a RISC System/6000)!
  497.  
  498. 5. Shouldn't the "avm" and the "fre" fields from vmstat add up to something?
  499.  
  500. No.  The "avm" field tells you how much "Active Virtual Memory" AIX
  501. thinks you are using.  This will closely match the amount of paging
  502. space you are using.  This number has *ABSOLUTELY* nothing to do with
  503. the amount of RAM you are using, and does *NOT* include your mapped
  504. files (disk files). 
  505.  
  506. 6. Why does the "fre" field from vmstat sometimes show lots of free
  507.    RAM pages?
  508.  
  509. This will happen after an application that used a lot of RAM via
  510. "working" storage (not NFS storage, and not disk file or "persistent"
  511. storage) exits.  When RAM pages that were used by working storage (a
  512. program's stack and data area) are no longer needed, there is no need to
  513. leave them around.  AIX completely frees these RAM pages.  The time to
  514. access these pages versus a RAM page holding a "sync'd" mapped file is
  515. almost identical.  Therefore, there is no need to periodically "flush"
  516. RAM.
  517.  
  518. 7. Is the vmstat "fre" field useful?
  519.  
  520. The vmstat "fre" field represents the number of free page frames.  If
  521. the number is consistently small (less than 500 pages), this is normal. 
  522. If the number is consistently large (greater than 4000 pages), then you
  523. have more memory than you need in this machine.
  524.  
  525.  
  526. 1.301: How much should I trust the ps memory reports?
  527. From: chukran@austin.VNET.IBM.COM
  528.  
  529. Using "ps vg" gives a per process tally of memory usage for each running
  530. process.  Several fields give memory usage in different units, but these
  531. numbers do not tell the whole story on where all the memory goes.
  532.  
  533. First of all, the man page for ps does not give an accurate description
  534. of the memory related fields.  Here is a better description:
  535.  
  536. RSS - This tells how much RAM resident memory is currently being used
  537. for the text and data segments for a particular process in units of
  538. kilobytes.  (this value will always be a multiple of 4 since memory is
  539. allocated in 4 KB pages).
  540.  
  541. %MEM - This is the fraction of RSS divided by the total size of RAM for
  542. a particular process.  Since RSS is some subset of the total resident
  543. memory usage for a process, the %MEM value will also be lower than actual.
  544.  
  545. TRS - This tells how much RAM resident memory is currently being used
  546. for the text segment for a particular process in units of kilobytes. 
  547. This will always be less than or equal to RSS.
  548.  
  549. SIZE - This tells how much paging space is allocated for this process
  550. for the text and data segments in units of kilobytes.  If the executable
  551. file is on a local filesystem, the page space usage for text is zero. 
  552. If the executable is on an NFS filesystem, the page space usage will be
  553. nonzero.  This number may be greater than RSS, or it may not, depending
  554. on how much of the process is paged in.  The reason RSS can be larger is
  555. that RSS counts text whereas SIZE does not.
  556.  
  557. TSIZ - This field is absolutely bogus because it is not a multiple of 4
  558. and does not correlate to any of the other fields.
  559.  
  560. These fields only report on a process text and data segments.  Segment
  561. size which cannot be interrogated at this time are:
  562.  
  563.        Text portion of shared libraries (segment 13)
  564.  
  565.        Files that are in use. Open files are cached in memory as
  566.        individual segments.  The traditional kernel cache buffer
  567.        scheme is not used in AIX 3.
  568.  
  569.        Shared data segments created with shmat.
  570.  
  571.        Kernel segments such as kernel segment 0, kernel extension
  572.        segments, and virtual memory management segments.
  573.  
  574. Speaking of kernel segments, the %MEM and RSS report for process zero
  575. are totally bogus for AIX 3.1.  The reason why RSS is so big is that the
  576. kernel segment zero is counted twice.  For AIX 3.2, this has been
  577. changed, but the whole story is still not known.  The RSS value for
  578. process 0 will report a very small number of the swapper private data
  579. segment.  It does not report the size of the kernel segment 0, where the
  580. swapper code lives.
  581.  
  582. In summary, ps is not a very good tool to measure system memory usage. 
  583. It can give you some idea where some of the memory goes, but it leaves
  584. too many questions unanswered about the total usage.
  585.  
  586. ______________________________________________________________________________
  587. 1.400: How do I make an informative prompt in the shell?
  588.  
  589. In the Korn Shell (ksh), the PS1 variable is expanded each time it is
  590. printed, so you can use:
  591.  
  592. $ myhost=`hostname`
  593. $ PS1='$LOGNAME@$myhost $PWD \$ '
  594.  
  595. to get, e.g. 
  596.  
  597. bengsig@ieibm1 /u/bengsig $
  598.  
  599. In the C-shell, use:
  600.  
  601. % set myhost=`hostname`
  602. % alias cd 'chdir \!* > /dev/null; set prompt="$LOGNAME@$myhost $cwd % "'
  603. % cd
  604.  
  605. to get, e.g.
  606.  
  607. bengsig@dkunix9 /u/bengsig/aixfaq %
  608.  
  609. There is no easy solution in the Bourne Shell.  Use the Korn Shell instead.
  610.  
  611.  
  612. 1.401: How do I set up ksh for emacs mode command line editing?
  613. From: scotte@cdsac.uucp (L. Scott Emmons)
  614.  
  615. The ksh has an undocumented way of binding the arrowkeys to the emacs
  616. line editing commands. In your .kshrc, add:
  617.  
  618. alias __A=^P
  619. alias __B=^N
  620. alias __C=^F
  621. alias __D=^B
  622. alias __H=^A
  623.  
  624. Note that "^P" (et al) must be the actual control sequence.
  625.  
  626. Type "set -o emacs" or put this line in your .profile.
  627.  
  628. Also, you MUST have PTF U406855 for this to work in AIX 3.2.  The APAR #
  629. for the problem is IX25982, which may have been superceded.
  630.  
  631.  
  632. 1.402: Listing files with ls causes a core dump
  633. From: John F Haugh II
  634.  
  635. Scenario: a directory that is shared by N users (N >= 200).
  636. Run 'ls -l' in that directory.  It goes for a while, then
  637. Seg fault(coredump)!
  638.  
  639. It only occurs when the usernames are displayed (almost every file is
  640. owned by a different person).  The -g and -n options work fine; only -l
  641. and -o (which shows owner and not group) cause it. 
  642.  
  643. I believe that this problem was corrected by U407548.  If you have that
  644. many users that you are having core dump problems (it took over 200),
  645. you might also want to look into getting the PTF that fixes IX31403. 
  646. That APAR deals with large numbers of accounts and performance problems
  647. associated with looking them up.
  648.  
  649.  
  650. 1.403: How do I put my own text into InfoExplorer?
  651.  
  652. With AIX 3.1, you cannot do it.  AIX 3.2 has a product called
  653. InfoCrafter that allows you to do that.
  654.  
  655.  
  656. 1.404: InfoExplorer ASCII key bindings 
  657. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  658.  
  659. If you just press 'Return' when it starts up, with 'Basic Screen
  660. Operations' highlighted, you'll get some help.
  661.  
  662. If you look long enough, you'll find a page named 'Using Keys and Key
  663. Sequences in the InfoExplorer ASCII Interface'.  It describes the key
  664. sequences and actions.  Here are a few to get you started.
  665.  
  666. Keys       Action
  667.  
  668. Ctrl-W     Moves between the Navigation screen and the Reading screen.
  669. If the Navigation screen is displayed, you can press Ctrl-W to display
  670. the Reading screen.  If the Reading screen is displayed, you can press
  671. Ctrl-W to display the Navigation screen.
  672.  
  673. Ctrl-O     Makes the menu bar active or inactive.  If your text cursor is
  674. located in the text area of the screen, you can press Ctrl-O to make the
  675. menu bar active.  If the menu bar is already active, you can press
  676. Ctrl-O to make it inactive, which moves the text cursor to the text area.
  677.  
  678. Tab     Moves to the next menu bar option in the menu bar.  If a pull-down
  679. menu is not displayed and you press the Right Arrow key, the next menu
  680. bar option is displayed in reverse video.
  681.  
  682.  
  683. 1.405: How can I add new man pages to the system?
  684. From: horst@faui63.informatik.uni-erlangen.de (Horst Luehrsen)
  685.  
  686. Put the man pages in /usr/man, e.g. /usr/man/man1/tcsh.1 for the tcsh
  687. man page.  Unter AIX 3.1.10, /usr/lib/makewhatis can be used to update
  688. the makewhatis-database /usr/man/whatis so apropos and whatis know about
  689. the added manpages.  /usr/lib/makewhatis should be available on all 3.2
  690. versions.
  691.  
  692. ______________________________________________________________________________
  693. 1.500  Which release of X11 do I have?
  694.  
  695. Run 'lslpp -h X11rte.obj'.
  696. If your output has a line similar to:
  697.  
  698.             01.02.0000.0000 COMPLETE   COMMIT     03/04/93   02:05:11 root
  699.  
  700. you have X11 R4.  If your output has a line similar to:
  701.  
  702.     U491068 01.02.0003.0000 COMPLETE   COMMIT     07/28/93   12:50:42 root
  703.  
  704. you have X11 R5.
  705. Some people also call these AIXwindows 1.2.0 and 1.2.3.
  706.  
  707.  
  708. 1.501: How to prevent ctrl-alt-backspace from killing the X session
  709.  
  710. Start X with 'xinit -T' to disable ctrl-alt-backspace from stopping X.
  711.  
  712.  
  713. 1.502: Who has a termcap/terminfo source for the HFT console?
  714.  
  715. The console used on the RISC System/6000, PS/2 and RT can be used as a
  716. terminal on another system with the termcap below.  You can find this
  717. and other termcaps in /lib/libtermcap/termcap.src, including IBM
  718. specific ones.  The terminfo sources are stored in /usr/lib/terminfo/*.ti.
  719. This termcap can also be used from an aixterm window.
  720.  
  721. hf|hft|hft-c|ibm8512|ibm8513|IBM_High_Function_Terminal:\
  722.         :co#80:li#25:am:ht:\
  723.         :cm=\E[%i%d;%dH:ti=\E[25;1H:te=\E[20h:\
  724.         :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\
  725.         :bs:sf=\E[S:ec=\E[%dX:\
  726.         :cl=\E[H\E[J:cd=\E[J:ce=\E[K:\
  727.         :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\
  728.         :im=\E[4h:ei=\E[4l:mi:\
  729.         :dm=\E[4h:ed=\E[4l:\
  730.         :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:\
  731.         :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
  732.         :as=^N:ae=^O:sc=\E[s:rc=\E[u:\
  733.         :kl=\E[D:kb=^H:kr=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\
  734.         :kn#10:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\
  735.         :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\
  736.         :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J:
  737.  
  738.  
  739. 1.503: How can I look at PostScript files?  Why is "dpsexec" so lousy?
  740. From: VRBASS@ATLVMIC1 (Vance R. Bass)
  741.  
  742. You can look at PostScript files using either "xpreview" (in the
  743. optionally installable text formatting services) or you can get
  744. Ghostscript and Ghostview from a comp.sources.x server and build it
  745. yourself.
  746.  
  747. >From the "xpreview" man page:
  748. The xpreview command is an AIXwindows 1.2- and Motif 1.1-based
  749. application that displays output from the troff command on an AIXwindows
  750. display.  The troff command output file must be prepared for any one of
  751. the devX100, devX100K or devpsc devices.  The xpreview command also
  752. displays PostScript language files that begin with %!.
  753.  
  754. "dpsexec" is NOT intended to be a full-service document browser, but
  755. rather a simple DPS code debugger.  If you insist on using it, you can
  756. edit your PS code to remove the "showpage" (which will reset dpsexec
  757. and clear the window) to view single-page files.  It does not handle
  758. multi-page files gracefully.
  759.  
  760.  
  761. 1.504: unix:0 vs `hostname`:0
  762.  
  763. 1.) Is there any way to get the machine to check its local host table
  764.     first without renaming resolv.conf?
  765.  
  766. From: mcguire@selway.umt.edu (Charles J McGuire)
  767.  
  768.   Not that I know of.  Under SunOS and Ultrix you can specify, check
  769.   /etc/hosts, then NIS, then DNS.  On our AIX machines, I have a cron job
  770.   that checks the integrity of both the primary and secondary
  771.   nameservers every 5 minutes.  If they're gone, cron renames
  772.   resolv.conf.  It continues to check the servers.  When they're back,
  773.   it moves resolv.conf back.  Even with this arrangement, I need to
  774.   configure two resolv.conf files that switch the order of the primary
  775.   and secondary servers if the primary goes away.  If the primary is
  776.   unavailable, queries can still take a while to time out on the
  777.   primary, before querying the secondary.  This method is not very
  778.   elegant, but it does the job.  Things are a little unstable during the
  779.   transitions depending on when the servers go away relative to when
  780.   cron runs - not to mention slight differences in clock times.
  781.  
  782. 2.) How do you tell X applications where you are if the console display 
  783.     is unix:0?
  784.  
  785. From: crow@waterloo.austin.ibm.com (David L. Crow)
  786.  
  787.   I would suggest that if you have R5, use ":<display>.<screen>".  I do
  788.   not believe that R4 clients will understand :0, so I would suggest
  789.   unix:0 for them.
  790.  
  791.   Without specifying unix or the hostname, you will get the fastest
  792.   transport mechanism.  While currently there are only two transport
  793.   methods in the AIXwindows X server (Unix sockets and TCP sockets),
  794.   many vendors are looking at using shared memory as a transport method. 
  795.   If you use :0 (or :0.0 or :1, etc.), then you should get the best
  796.   performance regardless of the available transport methods.
  797.  
  798. 3.) Is there a significant performance penalty incurred by using
  799.     `hostname`:0 as DISPLAY?
  800.  
  801.   Yes! Using unix:0, you are using Unix sockets.  These are much faster
  802.   than their TCP socket counterparts.
  803.  
  804.  
  805. 1.505: VT100 key bindings for aixterm
  806. From: haedener@iac.unibe.ch (Konrad Haedener)
  807.  
  808. Add this to your .Xdefaults file and start your VAX session with
  809. 'aixterm -v -name vt100 -e telnet MYVAXHOST'
  810.  
  811. -----
  812. vt100.foreground: Wheat
  813. vt100.background: MidnightBlue
  814. vt100.font: Rom14.500
  815. vt100.geometry: 80x25+0+0
  816. vt100.vt102: true
  817. vt100.fullcursor: false
  818. vt100.pointerColor: coral
  819. vt100.cursorColor: gray100
  820. vt100.translations:    <Key>F1: string(0x1b) string("OP") \n\
  821.                        <Key>F2: string(0x1b) string("OQ") \n\
  822.                        <Key>F3: string(0x1b) string("OR") \n\
  823.                        <Key>F4: string(0x1b) string("OS") \n\
  824.                        <Key>KP_0: string(0x1b) string("Op") \n\
  825.                        <Key>KP_1: string(0x1b) string("Oq") \n\
  826.                        <Key>KP_2: string(0x1b) string("Or") \n\
  827.                        <Key>KP_3: string(0x1b) string("Os") \n\
  828.                        <Key>KP_4: string(0x1b) string("Ot") \n\
  829.                        <Key>KP_5: string(0x1b) string("Ou") \n\
  830.                        <Key>KP_6: string(0x1b) string("Ov") \n\
  831.                        <Key>KP_7: string(0x1b) string("Ow") \n\
  832.                        <Key>KP_8: string(0x1b) string("Ox") \n\
  833.                        <Key>KP_9: string(0x1b) string("Oy") \n\
  834.                        <Key>KP_Divide: string(0x1b) string("OQ") \n\
  835.                        <Key>KP_Multiply: string(0x1b) string("OR") \n\
  836.                        <Key>KP_Subtract: string(0x1b) string("OS") \n\
  837.                        <Key>KP_Add: string(0x1b) string("Om") \n\
  838.                        <Key>KP_Enter: string(0x1b) string("OM") \n\
  839.                        <Key>KP_Decimal: string(0x1b) string("On") \n\
  840.                        <Key>Next: string(0x1b) string("Ol") \n\
  841.                        <Key>Left: string(0x1b) string("OD") \n\
  842.                        <Key>Up: string(0x1b) string("OA") \n\
  843.                        <Key>Right: string(0x1b) string("OC") \n\
  844.                        <Key>BackSpace : string(0x7f) \n\
  845.                        <Key>Down: string(0x1b) string("OB")
  846.  
  847. You should also add
  848.  
  849. XENVIRONMENT=$HOME/.Xdefaults
  850. export XENVIRONMENT
  851.  
  852. to your .profile.
  853.  
  854. ______________________________________________________________________________
  855. 1.600: My named dies frequently, why?
  856.  
  857. Running on 3.2, named dies frequently on network's primary name server.
  858.  
  859. From: jpe@ee.egr.duke.edu (John P. Eisenmenger)
  860.  
  861. Try the following:
  862.  
  863.      stopsrc -s named           # stop running named
  864.      setenv MALLOCTYPE 3.1      # use 3.1 memory allocation algorithm
  865.      /etc/named ...             # don't use smit to start named
  866.  
  867. You might be able to use startsrc/smit after setting MALLOCTYPE and get
  868. the same effect, but I'm not sure.
  869.  
  870. [According to John, the problem is malloc() in the named code. He
  871.  also suggests using Berkeley's bind, which he has ported and can be
  872.  ftp'ed from ftp.egr.duke.edu, /archives/network/bind-4.8.3.tar.Z. -ed]
  873.  
  874. Two ptfs should fix this problem. Get U412332 and U414752.
  875.  
  876. Christophe Wolfhugel <Christophe.Wolfhugel@grasp.insa-lyon.fr> reports
  877. that bind 4.9 works fine on AIX 3.2 and without MALLOCTYPE=3.1.
  878.  
  879.  
  880. 1.601: How do I trace ethernet packets on an AIX system?
  881. From: afx@muc.ibm.de (Andreas Siegert)
  882.  
  883. Do the following:
  884.  
  885.      iptrace -i en0 /tmp/ipt
  886.  
  887. The iptrace backgrounds.  Find its process id and kill it when you are
  888. ready.  Then run
  889.  
  890.      ipreport -rns /tmp/ipt >/tmp/ipr
  891.  
  892. and look at the output.  The current version of Info does not document
  893. the r, n and s options but they are quite useful for layering the output.
  894.  
  895.  
  896. 1.602 What is the authorized way of starting automount at boot time?
  897. From: curt@ekhadafi.austin.ibm.com (Curt Finch)
  898.  
  899. I put this in my /etc/inittab:
  900.  
  901. automount:2:once:/usr/etc/automount -T -T -T -v >/tmp/au.se 2>&1
  902.  
  903. I hereby dub it authorized.
  904.  
  905.  
  906. 1.603: How do I set a tty port for both dial-in and dial-out?
  907.  
  908. Set the mode of the tty to be either 'shared' or 'delayed'. 
  909.  
  910.  
  911. 1.604: How to move or copy whole directory trees across a network
  912.  
  913. The following command will move an entire directory tree across a network 
  914. while preserving permissions, uids and gids.
  915.  
  916.       $rsh RemoteHost "cd TargetDir; tar -cBf - ." | tar -xvBf -
  917.  
  918. Explanation:
  919.  
  920. The tar-create is rsh'd to the remote system and is written to
  921. stdout (the pipe).
  922.  
  923. The local system is extracting the tar that is being read from
  924. stdin (the pipe).
  925.  
  926.  
  927. 1.605: How can I send mail to hosts that cannot be pinged?
  928. From: jupiter.sun.csd.unb.ca!dedourek (John DeDourek)
  929.  
  930. AIX 3.2 as shipped is configured to only send mail to mail addresses
  931. which include a host name.  Many organizations use a mail address whose
  932. "host name" part is not a host name (technically an MX name).  To change
  933. the configuration of the AIX mailer, login as root.  Then edit the file
  934. /etc/sendmail.cf to remove the comment marker ("# ") at the beginning of
  935. the line which reads:
  936.     # OK MX
  937.  
  938. Now rebuild the machine readable form of the configuration with
  939.     sendmail -bz
  940.  
  941. and finally restart signal sendmail to load the new configuration by one
  942. of the following:
  943.      reboot
  944. or
  945.      stopsrc -s sendmail
  946.      startsrc -s sendmail
  947. or 
  948.      kill -1 `cat /etc/sendmail.pid`
  949.  
  950.  
  951. 1.606: How to setup dialup SLIP
  952. From: marvin@tornado.oche.de (Christian Bode)
  953.  
  954. If you don't have problems with slattach you should have PTF 
  955. bos.obj 3.2.0.0.U411505 installed.  I assume that you did the right
  956. ifconfig commands to setup your slip-device (for example sl0).
  957.  
  958. 1. Create a group called slip.
  959.  
  960. 2. Create a user slip with smit like this:
  961.                                                      [Entry Fields]
  962. * User NAME                                          [slip]
  963.   ADMINISTRATIVE User?                                true
  964.   User ID                                            []
  965.   LOGIN user?                                         true
  966.   PRIMARY group                                      [slip]
  967.   Group SET                                          [slip]
  968.   ADMINISTRATIVE groups                              [system]
  969.   SU groups                                          [slip]
  970.   HOME directory                                     [/home/slip]
  971.   Initial PROGRAM                                    [/bin/sh]
  972.   User INFORMATION                                   [SLIP-Dialup]
  973.   Another user can SU to user?                        false
  974.   User can RLOGIN?                                    true
  975.   TRUSTED PATH?                                       nosak
  976.   Valid TTYs                                         [/dev/tty1]
  977.   AUDIT classes                                      []
  978.   PRIMARY authentication method                      [SYSTEM]
  979.   SECONDARY authentication method                    [NONE]
  980.   Max FILE size                                      [2097151]
  981.   Max CPU time                                       [-1]
  982.   Max DATA segment                                   [262144]
  983.   Max STACK size                                     [65536]
  984.   Max CORE file size                                 [2048]
  985.   Max physical MEMORY                                [65536]
  986.   File creation UMASK                                [022]
  987.   EXPIRATION date (MMDDhhmmyy)                       [0]
  988.  
  989. 3. Create a tty with getty on it:
  990.                                    Add a TTY
  991.                                                [Entry Fields]
  992.   TTY type                                     tty
  993.   TTY interface                                rs232
  994.   Description                                  Asynchronous Terminal
  995.   Parent adapter                               sa0
  996. * PORT number                                  [s1]
  997.   BAUD rate                                    [38400]
  998.   PARITY                                       [none]
  999.   BITS per character                           [8]
  1000.   Number of STOP BITS                          [1]
  1001.   TERMINAL type                                [dumb]
  1002.   STATE to be configured at boot time          [available]
  1003.   DMA                                          on
  1004.   Read Trigger                                 0,1,2,3
  1005.   Transmit buffer count                        [16]
  1006.   Name of initial program to run               [/etc/getty]
  1007.  
  1008.   Note: The following attributes are only applicable if /etc/getty is
  1009.         specified as the initial program to run.
  1010.  
  1011.   Enable program?                              respawn
  1012.   Run level                                    2
  1013.   Enable LOGIN                                 share
  1014.   TIME before advancing to next port setting   [0]
  1015.   STTY attributes for RUN TIME                 [hupcl,cread,brkint>
  1016.   STTY attributes for LOGIN                    [hupcl,cread,echoe,>
  1017.   RUN shell activity manager                   no
  1018.   Optional LOGGER name                         []
  1019.  
  1020. 4. Change the hardware characteristics so that it uses NO XON/XOFF handshake
  1021.  
  1022. 5. Here is the the .profile for User slip to manage dialups
  1023.  
  1024. PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/
  1025. sr/bin/X11:/sbin:/usr/local/bin:.
  1026.  
  1027. ENV=$HOME/.kshrc
  1028. HISTSIZE=128
  1029.  
  1030. export PATH ENV HISTSIZE
  1031. #
  1032. # Search for a LCK-File for our tty if there is one
  1033. #
  1034.  
  1035. if test -f /etc/locks/LCK..tty1
  1036. then
  1037.   SHPID=`cat /etc/locks/LCK..tty1`
  1038. else
  1039.  echo `date` " No LCK-File !!!" >>slip.log
  1040.  exit 64
  1041. fi
  1042.  
  1043. #
  1044. # Search for our own Shell to get the PID for checking against LCK-File
  1045. #
  1046.  
  1047. SH2PID=`ps -aef |
  1048.         sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-sh *$/\1/p`
  1049.  
  1050. #
  1051. # Is it the the same PID as in the LCK File so that we can start working ??
  1052. #
  1053.  
  1054. if test $SHPID = $SH2PID
  1055. then
  1056. #  remove the LCK-File because slattach does not like it.
  1057.    rm -rf /etc/locks/LCK..tty1
  1058. #  Add RTS/CTS Handshakeing to our own tty
  1059.    stty add rts
  1060. #  Startup slattach. Slattach has to have mode 4755 to be started up !!!
  1061.    /usr/sbin/slattach tty1
  1062. #  Just say that we are up.
  1063.    echo `date` " Starting up slip-daemon " >>slip.log
  1064. #  leave slattach enough time to startup
  1065.    sleep 4
  1066. else
  1067. # Something must be wrong with the LCK-File
  1068.   SH3PID=`ps -aef | awk ' {print $2}' | grep $SHPID`
  1069.  
  1070.   if test ."$SH3PID" = .""
  1071.   then
  1072.     SH3PID="NO_SUCH_PROCESS"
  1073.   fi
  1074.  
  1075.   if test $SHPID = $SH3PID
  1076.     then
  1077. #  There is a living process which owns the LCK-File !!
  1078.        echo `date` " Can't remove LCK-File, not owner !!!" >>slip.log
  1079.        exit 64
  1080.     else
  1081. #   Who the hell didn't remove the LCK-File (should never happen)
  1082.        echo `date` " LCK-File with no owner found !!!" >>slip.log
  1083.        exit 64
  1084.     fi
  1085. fi
  1086.  
  1087. # Get the pid of slattch so that we can kill him later on.
  1088. SLPID=`ps -aef |
  1089.  sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-.*\/usr\/sbin\/slattach tty
  1090.  *$/\1/p`
  1091.  
  1092. # Kill slattach if we get a signal 1 (Carrier Lost ? / Otherside-slattach
  1093.   terminated )
  1094. trap "kill $SLPID; exit 0" 1
  1095.  
  1096. # We  will have a nice sleep and nice dreamings
  1097. while sleep 256
  1098. do
  1099. :
  1100. done
  1101.  
  1102. ______________________________________________________________________________
  1103. 1.900: SCSI-1 and SCSI-2 "interoperability" got you confused?
  1104. From: drr
  1105.  
  1106. A.  SCSI-1 devices are supported on a SCSI-2 adapter.  This
  1107.     config will provide SCSI-1 performance.
  1108.  
  1109. B.  SCSI-2 devices are supported on a SCSI-1 adapter.  This
  1110.     config will provide SCSI-1 performance.
  1111.  
  1112. C.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-1
  1113.     adapter.  All devices will have SCSI-1 performance.
  1114.  
  1115. D.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-2
  1116.     adapter.  SCSI-2 devices will have SCSI-2 performance (10 MB/sec)
  1117.     and SCSI-1 devices will have SCSI-1 performance (4-5 MB/sec).
  1118.  
  1119.  
  1120. 1.901: How to get your keyboard back after unplugging it from the 6000
  1121. From: Mickey Coggins and Anne Serre
  1122.  
  1123. When you unplug your keyboard from a running system, and plug it back
  1124. in, the key mapping is wrong.  For example, keys like Caps Lock and Ctrl
  1125. don't work as designed.
  1126.  
  1127. Solution: Type at the command line
  1128.  
  1129.         /usr/lpp/diagnostics/da/dkbd
  1130.  
  1131. Your screen goes black, you hear a few beeps, and your keyboard is reset.
  1132. It works with any environment, Xwindows, hft, NLS...
  1133.  
  1134. For Models 220, 230 and M20, use the following commands:
  1135.  
  1136. /usr/lpp/diagnostics/da/dkbd
  1137. /usr/lpp/diagnostics/da/dkbdsal   (for the 220)
  1138.  
  1139.  
  1140. 1.902: How do I set up pcsim, the DOS emulator?
  1141.  
  1142. You must have a bootable DOS diskette to install pcsim. Either DOS 3.3, 
  1143. 4.x, or 5.0 will work. IBM do not officially support DOS 5.0 for pcsim
  1144. but I have no problems with it. Just don't try to be fancy with the UMB 
  1145. and memory manager stuff.
  1146.  
  1147. With a bootable DOS disk in the drive, do:
  1148. $touch /u/dosdrive (this is the AIX file for DOS emulation)
  1149. $pcsim -Adiskette 3 -Cdrive /u/dosdrive
  1150. You would now get an A prompt. Type:
  1151. A> fdisk
  1152. Create the virtual C drive of whatever size you choose. Make it large 
  1153. enough for your needs since you cannot enlarge it later.
  1154. A> format c: /s (to format the virtual C drive)
  1155. Now exit from pcsim with ESCpcsim (Esc key followed by pcsim).
  1156.  
  1157. Now create a simprof file. Following is a starter:
  1158.  
  1159. Adiskette   : 3
  1160. Cdrive      :/u/dosdrive
  1161. lpt1        : name of printer queue
  1162. refresh     : 50
  1163. dmode       : V
  1164. mouse       : com1
  1165.  
  1166. You can now start pcsim anytime by typing pcsim. Make sure no floppies
  1167. are in the drive. For further information, refer to publication
  1168. SC23-2452, Personal Computer Simulator/6000 Guide and Reference.
  1169.        
  1170.  
  1171. 1.903: How do I transfer files between AIX and DOS disks?
  1172.  
  1173. In one of the bos extensions are commands for transferring files between
  1174. DOS diskettes and AIX. The commands are dosread, doswrite, dosdir, dosdel,
  1175. and dosformat. Many users have mentioned that the mtools package from
  1176. prep.ai.mit.edu is better than the native AIX programs.
  1177.  
  1178. _____________________________________________________________________________
  1179. 2.00: C/C++
  1180.  
  1181. Contrary to many people's belief, the C environment on the RS/6000 is
  1182. not very special.  The C compiler has quite a number of options that can
  1183. be used to control how it works, which "dialect" of C it compiles, how
  1184. it interprets certain language constructs, etc.  InfoExplorer includes a
  1185. Users Guide and a Reference Manual.
  1186.  
  1187. The compiler can be invoked with either xlc for strict ANSI mode and cc
  1188. for RT compatible mode (i.e. IBM 6150 with AIX 2).  The default options
  1189. for each mode are set in the /etc/xlc.cfg file, and you can actually add
  1190. another stanza and create a link to the /bin/xlc executable.
  1191.  
  1192. The file /usr/lpp/xlc/bin/README.xlc has information about the C
  1193. compiler, and the file /usr/lpp/bos/bsdport contains useful information,
  1194. in particular for users from a BSD background.
  1195.  
  1196. The file /etc/xlc.cfg also shows the symbol _IBMR2 that is predefined,
  1197. and therefore can be used for #ifdef'ing RS/6000 specific code.
  1198.  
  1199.  
  1200. 2.01: I cannot make alloca work
  1201.  
  1202. A famous routine, in particular in GNU context, is the allocation
  1203. routine alloca().  Alloca allocates memory in such a way that it is
  1204. automatically free'd when the block is exited.  Most implementations
  1205. does this by adjusting the stack pointer.  Since not all C environments
  1206. can support it, its use is discouraged, but it is included in the xlc
  1207. compiler.  In order to make the compiler aware that you intend to use
  1208. alloca, you must put the line
  1209.  
  1210. #pragma alloca
  1211.  
  1212. before any other statements in the C source module(s) where alloca is
  1213. called.  If you don't do this, xlc will not recognize alloca as anything
  1214. special, and you will get errors during linking.
  1215.  
  1216. For AIX 3.2, it may be easier to use the -ma flag.
  1217.  
  1218.  
  1219. 2.02: How do I compile my BSD programs?
  1220.  
  1221. The file /usr/lpp/bos/bsdport contains information on how to port
  1222. programs written for BSD to AIX 3.1.  This file may be very useful for
  1223. others as well.
  1224.  
  1225. A quick cc command for most "standard" BSD programs is:
  1226.   
  1227.   $ cc -D_BSD -D_BSD_INCLUDES  -o [loadfile] [sourcefile.c] -lbsd
  1228.  
  1229. If your software has system calls predefined with no prototype
  1230. parameters, also use the -D_NO_PROTO flag.
  1231.  
  1232.  
  1233. 2.03: Isn't the linker different from what I am used to?
  1234.  
  1235. Yes.  It is not at all like what you are used to:
  1236.  
  1237. - The order of objects and libraries is normally _not_ important.  The
  1238.   linker reads _all_ objects including those from libraries into memory
  1239.   and does the actual linking in one go.  Even if you need to put a
  1240.   library of your own twice on the ld command line on other systems, it
  1241.   is not needed on the RS/6000 - doing so will even make your linking slower.
  1242.  
  1243. - One of the features of the linker is that it will replace an object in
  1244.   an executable with a new version of the same object:
  1245.  
  1246.   $ cc -o prog prog1.o prog2.o prog3.o          # make prog
  1247.   $ cc -c prog2.c                               # recompile prog2.c
  1248.   $ cc -o prog.new prog2.o prog                 # make prog.new from prog
  1249.                                                 # by replacing prog2.o
  1250.   
  1251. - The standard C library /lib/libc.a is linked shared, which means that
  1252.   the actual code is not linked into your program, but is loaded only
  1253.   once and linked dynamically during loading of your program.
  1254.  
  1255. - The ld program actually calls the binder in /usr/lib/bind, and you can
  1256.   give ld special options to get details about the invocation of the
  1257.   binder.  These are found on the ld man page or in InfoExplorer.
  1258.  
  1259. - If your program normally links using a number of libraries (.a files),
  1260.   you can 'prelink' each of these into an object, which will make your
  1261.   final linking faster.  E.g. do:
  1262.  
  1263.   $ cc -c prog1.c prog2.c prog3.c
  1264.   $ ar cv libprog.a prog1.o prog2.o prog3.o
  1265.   $ ld -r -o libprog.o libprog.a
  1266.   $ cc -o someprog someprog.c libprog.o
  1267.  
  1268. This will solve all internal references between prog1.o, prog2.o and
  1269. prog3.o and save this in libprog.o Then using libprog.o to link your
  1270. program instead of libprog.a will increase linking speed, and even if
  1271. someprog.c only uses, say prog1.o and prog2.o, only those two modules
  1272. will be in your final program.  This is also due to the fact that the
  1273. binder can handle single objects inside one object module as noted above.
  1274.  
  1275. If you are using an -lprog option (for libprog.a) above, and still want
  1276. to be able to do so, you should name the prelinked object with a
  1277. standard library name, e.g. libprogP.a (P identifying a prelinked
  1278. object), that can be specified by -lprogP.  You cannot use the archiver
  1279. (ar) on such an object.
  1280.  
  1281. You should also have a look at section 3.01 of this article, in
  1282. particular if you have mixed Fortran/C programs.
  1283.  
  1284. Dave Dennerline (dad@adonis.az05.bull.com) claims that his experiences
  1285. in prelinking on AIX does not save much time since most people have
  1286. separate libraries which do not have many dependencies between them,
  1287. thus not many symbols to resolve.
  1288.  
  1289.  
  1290. 2.04: How do I link my program with a non-shared /lib/libc.a?
  1291.  
  1292.   cc -o prog -bnoso -bI:/lib/syscalls.exp obj1.o obj2.o obj3.o
  1293.  
  1294. will do that for a program consisting of the three objects obj1.o, etc.
  1295.  
  1296.  
  1297. 2.05: How do I make my own shared library?
  1298.  
  1299. To make your own shared object or library of shared objects, you should
  1300. know that a shared object cannot have undefined symbols.  Thus, if your
  1301. code uses any externals from /lib/libc.a, the latter MUST be linked with
  1302. your code to make a shared object.  Mike Heath (mike@pencom.com) said it
  1303. is possible to split code into more than one shared object when externals
  1304. in one object refer to another one.  You must be very good at
  1305. import/export files.  Perhaps he or someone can provide an example. 
  1306.  
  1307. Assume you have one file, sub1.c, containing a routine with no external
  1308. references, and another one, sub2.c, calling stuff in /lib/libc.a.  You
  1309. will also need two export files, sub1.exp, sub2.exp.  Read the example
  1310. below together with the examples on the ld man page. 
  1311.  
  1312. ---- sub1.c ----
  1313.     int addint(int a, int b)
  1314.     {
  1315.       return a + b;
  1316.     }
  1317. ---- sub2.c ----
  1318.     #include <stdio.h>
  1319.  
  1320.     void printint(int a)
  1321.     {
  1322.       printf("The integer is: %d\n", a);
  1323.     }
  1324. ---- sub1.exp ----
  1325.     #!
  1326.     addint
  1327. ---- sub2.exp ----
  1328.     #!
  1329.     printint
  1330. ---- usesub.c ----
  1331.     main()
  1332.     {
  1333.       printint( addint(5,8) );
  1334.     }
  1335.  
  1336. The following commands will build your libshr.a, and compile/link the
  1337. program usesub to use it.  Note that you need the ld option -lc for
  1338. sub2shr.o since it calls printf from /lib/libc.a.
  1339.  
  1340.   $ cc  -c sub1.c
  1341.   $ ld -o sub1shr.o sub1.o -bE:sub1.exp -bM:SRE -T512 -H512 
  1342.   $ cc  -c sub2.c
  1343.   $ ld -o sub2shr.o sub2.o -bE:sub2.exp -bM:SRE -T512 -H512  -lc
  1344.   $ ar r libshr.a sub1shr.o sub2shr.o
  1345.   $ cc -o usesub usesub.c -L: libshr.a
  1346.   $ usesub
  1347.   The integer is: 13
  1348.   $
  1349.  
  1350.  
  1351. 2.06: Linking my program fails with strange errors.  Why?
  1352.  
  1353. Very simple, the linker (actually called the binder), cannot get the
  1354. memory it needs, either because your ulimits are too low or because you
  1355. don't have sufficient paging space.  Since the linker is quite different
  1356. from normal Unix linkers and actually does much more than these, it also
  1357. uses a lot of virtual memory.  It is not unusual to need 10000 pages (of
  1358. 4k) or more to execute a fairly complex linking.
  1359.  
  1360. If you get 'BUMP error', either ulimits or paging is too low, if you get
  1361. 'Binder killed by signal 9' your paging is too low.
  1362.  
  1363. First, check your memory and data ulimits; in korn shell 'ulimit -a' will
  1364. show all limits and 'ulimit -m 99999' and 'ulimit -d 99999' will
  1365. increase the maximum memory and data respectively to some high values. 
  1366. If this was not your problem, you don't have enough paging space.
  1367.  
  1368. If you will or can not increase your paging space, you could try this:
  1369.  
  1370. - Do you duplicate libraries on the ld command line? That is never
  1371.   necessary.
  1372.  
  1373. - Do more users link simultaneously? Try having only one linking going
  1374.   on at any time.
  1375.  
  1376. - Do a partwise linking, i.e. you link some objects/libraries with the
  1377.   -r option to allow the temporary output to have unresolved references,
  1378.   then link with the rest of your objects/libraries.  This can be split
  1379.   up as much as you want, and will make each step use less virtual memory.
  1380.  
  1381.   If you follow this scheme, only adding one object or archive at a
  1382.   time, you will actually emulate the behavior of other Unix linkers.
  1383.  
  1384. If you decide to add more paging space, you should consider adding a new
  1385. paging space on a second hard disk, as opposed to just increasing the
  1386. existing one.  Doing the latter could make you run out of free space on
  1387. your first harddisk. It is more involved to shrink a paging space
  1388. but easier to delete one.
  1389.  
  1390.  
  1391. 2.07: What's with malloc()?
  1392.  
  1393. malloc() uses a late allocation algorithm based on 4.3 BSD's malloc()
  1394. for speed.  This lets you allocate very large sparse memory spaces,
  1395. since the pages are not actually allocated until they are touched for
  1396. the first time.  Unfortunately, it doesn't die gracefully in the face of
  1397. loss of available memory.  See the "Paging Space Overview" under
  1398. InfoExplorer, and see the notes on the linker in this document for an
  1399. example of an ungraceful death.
  1400.  
  1401. If you want your program to get notified when running out of memory, you
  1402. should handle the SIGDANGER signal.  The default is to ignore it. 
  1403. SIGDANGER is sent to all processes when paging space gets low, and if
  1404. paging space gets even lower, processes with the highest paging space
  1405. usage are sent the SIGKILL signal.
  1406.  
  1407. malloc() is substantially different in 3.2, allocating memory more
  1408. tightly.  If you have problems running re-compiled programs on 3.2, try
  1409. running them with MALLOCTYPE=3.1. 
  1410.  
  1411.  
  1412. 2.08: Why does xlc complain about 'extern char *strcpy()'
  1413.  
  1414. The header <string.h> has a strcpy macro that expands strcpy(x,y) to
  1415. __strcpy(x,y), and the latter is then used by the compiler to generate
  1416. inline code for strcpy.  Because of the macro, your extern declaration
  1417. contains an invalid macro expansion.  The real cure is to remove your
  1418. extern declaration but adding -U__STR__ to your xlc will also do the trick.
  1419.  
  1420.  
  1421. 2.09: Why do I get 'Parameter list cannot contain fewer ....'
  1422.  
  1423. This is the same as above.
  1424.  
  1425.  
  1426. 2.10: Why does xlc complain about '(sometype *)somepointer = something'
  1427.  
  1428. Software that is developed using GNUC may have this construct.  However,
  1429. standard C does not permit casts to be lvalues, so you will need to
  1430. change the cast and move it to the right side of the assignment.  If you
  1431. compile with 'cc', removing the cast completely will give you a warning,
  1432. 'xlc' will give you an error (provided somepointer and something are of
  1433. different types - but else, why would the cast be there in the first place?)
  1434.  
  1435.  
  1436. 2.11: Some more common errors
  1437.  
  1438. Here are a few other common errors with xlc:
  1439.  
  1440. 305 |     switch((((np)->navigation_type) ? (*((np)->navigation_type)) :
  1441.       ((void *)0)))
  1442.       .a...........  
  1443. a - 1506-226: (S) The second and third operands of the conditional
  1444. operator must be of the same type.
  1445.  
  1446. The reason for this is that xlc defines NULL as (void *)0, and it does
  1447. not allow two different types as the second and third operand of ?:. 
  1448. The second argument above is not a pointer and the code used NULL
  1449. incorrectly as a scalar.  NULL is a nil pointer constant in ANSI C and
  1450. in some traditional compilers.
  1451.  
  1452. You should change NULL in the third argument above to an integer 0.
  1453.  
  1454.  
  1455. 2.12: Can the compiler generate assembler code?
  1456.  
  1457. The traditional -S option is not supported by the XLC compiler, and
  1458. there is in fact no way to make the compiler generate machine readable
  1459. assembler code.  The option -qlist will generate a human readable one in
  1460. the .lst file.
  1461.  
  1462.  
  1463. 2.13: Curses
  1464.  
  1465. Curses based applications should be linked with -lcurses and _not_ with
  1466. -ltermlib.  It has also been reported that some problems with curses are
  1467. avoided if your application is compiled with -DNLS.
  1468.  
  1469. Peter Jeffe <peter@ski.austin.ibm.com> also notes:
  1470.  
  1471. >the escape sequences for cursor and function keys are *sometimes*
  1472. >treated as several characters: eg. the getch() - call does not return
  1473. >KEY_UP but 'ESC [ C.'
  1474.  
  1475. You're correct in your analysis: this has to do with the timing of the
  1476. escape sequence as it arrives from the net.  There is an environment
  1477. variable called ESCDELAY that can change the fudge factor used to decide
  1478. when an escape is just an escape.  The default value is 500; boosting
  1479. this a bit should solve your problems.
  1480.  
  1481. Christopher Carlyle O'Callaghan <asdfjkl@wam.umd.edu> has more comments
  1482. concerning extended curses:
  1483.  
  1484. 1) The sample program in User Interface Programming Concepts, page 7-13
  1485.    is WRONG. Here is the correct use of panes and panels.
  1486.  
  1487. #include <cur01.h>
  1488. #include <cur05.h>
  1489.  
  1490. main()
  1491. {
  1492. PANE *A, *B, *C, *D, *E, *F, *G, *H;
  1493. PANEL *P;
  1494.  
  1495. initscr();
  1496.  
  1497. A = ecbpns (24, 79, NULL, NULL, 0, 2500, Pdivszp, Pbordry, NULL, NULL);
  1498.  
  1499. D = ecbpns (24, 79, NULL, NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  1500. E = ecbpns (24, 79, D,    NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  1501.  
  1502. B = ecbpns (24, 79, A, D, Pdivtyh, 3000, Pdivszp, Pbordry, NULL, NULL);
  1503.  
  1504. F = ecbpns (24, 79, NULL, NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  1505. G = ecbpns (24, 79, F,    NULL, 0, 5000, Pdivszp, Pbordry, NULL, NULL);
  1506. H = ecbpns (24, 79, G,    NULL, 0, 3000, Pdivszp, Pbordry, NULL, NULL);
  1507.  
  1508. C: = ecbpns (24, 79, B, F, Pdivtyh, 0, Pdivszf, Pbordry, NULL, NULL);
  1509.  
  1510. P = ecbpls (24, 79, 0, 0, "MAIN PANEL", Pdivtyv, Pbordry, A);
  1511.  
  1512. ecdvpl (P);
  1513. ecdfpl (P, FALSE);
  1514. ecshpl (P); 
  1515. ecrfpl (P);
  1516. endwin();
  1517. }
  1518.  
  1519. 2) DO NOT include <curses.h> and any other <cur0x.h> file together.
  1520.    You will get a bunch of redefined statements.
  1521.  
  1522. 3) There is a CURSES and EXTENDED CURSES stuff.  Use only one or the
  1523.    other. If the manual says that they're backwards compatible or some
  1524.    other indication that you can use CURSES routines with EXTENDED,
  1525.    don't believe it. To use CURSES you need to include <curses.h> and
  1526.    you can't (see above).
  1527.  
  1528. 4) If you use -lcur and -lcurses in the same link command, you will get
  1529.    Memory fault (core dump) error...  YOU CANNOT use both of them at the
  1530.    same time. -lcur is for extended curses, -lcurses is for regular curses.
  1531.  
  1532. 5) When creating PANEs, when you supply a value (other than 0) for the
  1533.    'ds' parameter and use Pdivszf value for the 'du' parameter, the 'ds'
  1534.    will be ignored (the sample program on page 7-13 in User Interface
  1535.    Programming Concepts is wrong.) For reasons as yet undetermined,
  1536.    Pdivszc doesn't seem to work (or at least I can't figure out how to
  1537.    use it.)
  1538.  
  1539. 6) If you're running into bugs and can't figure out what is happening,
  1540.    try the following:
  1541.    include -qextchk -g in your compile line
  1542.         -qextchk will check to make sure you're passing the right number of
  1543.          parameters to the procedures
  1544.         -g will allow you to use the inline debugger on Unix/AIX.
  1545.    to use the debugger after you compiled it, 
  1546.         type: dbx <fn>
  1547.         the command 'help' will give you all of the possible commands to
  1548.         use in the debugger... have fun... :)
  1549.  
  1550. 7) Do not use 80 as the number of columns if you want to use the whole
  1551.    screen. The lower right corner will get erased.  Use 79 instead.
  1552.  
  1553. 8) If you create a panel, you must create at least 1 pane, otherwise you
  1554.    will get a Memory fault (core dump).
  1555.  
  1556. 9) When creating a panel, if you don't have a border around it, any title
  1557.    you want will not show up.
  1558.  
  1559. 10) to make the screen scroll down:
  1560.     wmove (win, 0, 0);
  1561.     winsertln (win)
  1562.  
  1563. 11) delwin(win) DOESN'T WORK IN EXTENDED WINDOWS.
  1564.  
  1565.     Anyway, to make it appear as if a window is deleted, you need to do
  1566.     the following:
  1567.     for every window that you want to appear on the screen
  1568.         touchwin(win)
  1569.         wrefresh(win)
  1570.  
  1571.     you must make sure that you do it in the exact same order as you put
  1572.     them on the screen (i.e., if you called newwin with A, then C, then B,
  1573.     then you must do the loop with A, then C, then B, otherwise you won't
  1574.     get the same screen back).  The best thing to do is to put them into
  1575.     an array and keep track of the last window index.
  1576.  
  1577. 12) mvwin(win, line, col) implies that it is only used for viewports and
  1578.     subwindows... It can also be used for the actual windows themselves.
  1579.  
  1580. 13) If you specify the attribute of a window using wcolorout(win), any
  1581.     subsequent calls to chgat(numchars, mode) or any of its relatives
  1582.     will not work. (or at least they get very picky...)
  1583.  
  1584.  
  1585. 2.14: How do I speed up linking
  1586.  
  1587. Please refer to sections 2.03 and 2.06 above.
  1588.  
  1589. From: losecco@undpdk.hep.nd.edu (John LoSecco) and
  1590.       hook@chaco.aix.dfw.ibm.com (Gary R. Hook)
  1591.  
  1592. From oahu.cern.ch in /pub/aix3 you can get a wrapper for the existing
  1593. linker called tld which can reduce link times with large libraries by
  1594. factors of 3 to 4.
  1595.  
  1596.  
  1597. 2.15: What is deadbeef?
  1598.  
  1599. When running the debugger (dbx), you may have wondered what the
  1600. 'deadbeef' is you occasionally see in registers.  Do note, that
  1601. 0xdeadbeef is a hexadecimal number that also happens to be some kind
  1602. of word (the RS/6000 was built in Texas!), and this hexadecimal number
  1603. is simply put into unused registers at some time, probably during
  1604. program startup.
  1605.  
  1606.  
  1607. 2.16: How do I statically link in 3.2?
  1608.  
  1609. xlc -bnso -bI:/lib/syscalls.exp -liconv -bnodelcsect 
  1610.  
  1611.