Newsgroups: comp.unix.sco.announce,comp.answers,news.answers
Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!howland.erols.net!torn!enews.sgi.com!coop.net!world!apl
From: [email protected] (Tony Lawrence)
Subject: comp.unix.sco Technical FAQ (1/7)
Message-ID: <[email protected]>
Approved: [email protected]
Date: Thu, 12 Oct 2000 23:27:55 GMT
Organization: http://www.aplawrence.com
Keywords: FAQ SCO Xenix Unix Frequently Asked Questions
Followup-To: comp.unix.sco.misc
Lines: 936
Xref: senator-bedfellow.mit.edu comp.unix.sco.announce:2477 comp.answers:42684 news.answers:193878

Archive-Name: comp.unix.sco Technical FAQ 1/7
Posting-Frequency: Monthly (mid month)
Last-modified: Oct 12



  comp.unix.sco Technical FAQ 1/7

  Questions and Answers Common to Unix, Xenix and ODT

  FAQ Starting Page http://aplawrence.com/SCOFAQ/index.html

  These FAQS were developed and maintained for years by
  [email protected] (Stephen M. Dunn). Steve no longer has the time to
  maintain them, and has asked me to take them over. Please remember the
  debt all of us owe to Steve for his efforts- I myself spent many hours
  learning from these very documents, and I'm sure many of us can say
  similar things.

  Because Steve has not been able to maintain these for a while now,
  some of the information herein is outdated. I am working to correct
  that, but it's a lot to catch up on, so if you spot something, please
  let me know. For the moment, I'm just marking some of it as probably
  being useless; as I have time, I'll check further to be certain before
  I remove anything.

  Suggestion: Use my http://aplawrence.com/search.html to find what you
  are looking for.

  Are there any screen savers?

  Unix (and Xenix 2.3.4) have a built-in screen saver for VGA only. You
  have to reconfigure the kernel for this to work. It doesn't work with
  all hardware, but try it first. Also, it has been reported that VP/ix
  may not be compatible with this screen saver. To enable the
  screensaver, set the kernel variable TBLNK to the number of seconds of
  inactivity which should trigger the screensaver, relink, and reboot.

  Unixware users may use "vtblank" to dynamically set and adjust the
  screen saver time

  Roberto Zini:

  If you're operating under X-windows you can use the PD program
  xscreensaver; it comes with dozens of very nice screen savers you can
  install on your system. You can find the 'xscreensaver' program on the
  Skunkware CD-ROM; alternatively you can use the xlockmore program,
  also available on the same CD-ROM.

  [Table of Contents]
    _________________________________________________________________

  Is tar/cpio a good backup program?

  tar is not; cpio is, to some degree. tar will not back up things like
  device nodes (and, prior to OpenServer Release 5, it will also not
  back up empty directories), so a tar backup will not catch anything in
  /dev, for example, and you will find your device nodes missing when
  you do your restore. cpio will catch these things.

  Neither one is very good at verification. You can dd the tape to make
  sure you can read the whole thing, and run it through tar or cpio ...
  but they'll just check the file headers to make sure they make some
  sense. If you need better verification, try one of the products listed
  below. Most third-party backup programs do many things better than the
  standard utilities included with the OS, including things like making
  much better emergency recovery diskettes, byte-for-byte verification
  (if you want), compression, more options for things like
  nondestructive restore, etc. Many of us swear by them.

  gnu tar is a significantly better backup utility, and is available on
  many archive sites listed in the Administrative FAQ. There is also a
  shareware tar/cpio archive checker called tapechk, written by Nigel
  Horne <[email protected]>. A demonstration version is available
  at ftp://garbo.uwasa.fi/unix/util/tapechk.sco.tar.Z

  Commercial programs provide better solutions. The following vendors
  offer backup programs for SCO, Linux and many other platforms:

    * CTAR
    * Lone Tar
    * Microlite Edge

  Also see http://aplawrence.com/Reviews/supertars.html

  [Table of Contents]
    _________________________________________________________________

  How do I compress my backups?

  Well, you could just run the output of tar, cpio, or whatever through
  compress, but if even one bit of your tape or diskette goes bad,
  you'll lose the rest of the backup. Not recommended at all, unless of
  course you don't actually care if your backups work - but if you
  didn't care, you wouldn't be doing any, right?

  A better solution would be a third-party product. The next answer
  lists a few ... if you produce, market, or use one that's not listed
  below but which you feel should be, please send me the information.

  [Table of Contents]
    _________________________________________________________________

  What are some third-party backup/recovery products?

  There are a couple of categories here - products which are mostly
  aimed at one or a small number of Unix machines, and those which are
  aimed at enterprise-wide, multiplatform backup. The following two
  lists are NOT meant to be all-inclusive, but merely a sample of some
  of the better-known products.

  First, the ones aimed at one or a few Unix machines:
    * BackupEDGE (Microlite Corp., 2315 Mill Street, Aliquippa, PA
      15001-2228; [email protected]; (888) BKP-EDGE or (724) 375-6711;
      http://www.microlite.com/)
    * BRU (Enhanced Software Technologies Inc., 5016 S. Ash Avenue Suite
      109, Tempe, AZ 85282; [email protected]; (800) 998-8649 or (602)
      820-0042; http://www.estinc.com/)
    * Lone-Tar (Lone Star Software Inc., 13987 W. Annapolis Court, Mt.
      Airy, MD 21771; [email protected]; (301) 829-1622 or (800)
      LONE-TAR; http://www.cactus.com/)
    * Ctar (Unitrends Software Corp., 1601 Oak Street, Suite 201, Myrtle
      Beach, SC 29677; [email protected]; (800) 648-2827 or (803)
      626-2878; http://www.unitrends.com/)

  These products tend to be fast and robust, generally offer data
  compression, and tend to be able to handle errors on the backup media.
  Many also include, or can optionally be purchased with, utilities to
  create automated emergency recovery diskettes which are much
  friendlier and easier to use than the ones you can produce with
  standard SCO utilities.

  Now, a few for those with more ambitious backup plans ... this section
  is under construction and hopefully I'll have some more contact info
  shortly.

    * The Backup Professional (Lone Star Software Inc., 13987 W.
      Annapolis Court, Mt. Airy, MD 21771; [email protected]; (301)
      829-1622 or (800) LONE-TAR; http://www.cactus.com/bp.html)
    * ARCserve/Open (The Santa Cruz Operation Inc., 400 Encinal Street,
      Santa Cruz, CA 95061; [email protected]; (800) SCO-UNIX or (408)
      425-7222; http://www.sco.com/)
    * Legato (415) 812-6000

  A variety of backup products was reviewed in the September 1997 issue
  of SCO World Magazine.

  [Table of Contents]
    _________________________________________________________________

  I don't like being restricted to 14 character filenames

  If you're running Xenix, or a version of Unix prior to 3.2v4, I'm
  afraid you're stuck. Unix 3.2v4, however, includes long filename
  support on all EAFS filesystems. OSR5 adds two new filesystems, HTFS
  and DTFS, which also support long filenames. Unixware 7 also supports
  long file names. More information on long filenames can be found in
  the section dealing with Unix.

  [Table of Contents]
    _________________________________________________________________

  How do I get a copy of adb?

  If you have the Development System, you already have /bin/adb. If not,
  you may need to grab a copy from your distribution, or it may already
  have been installed, depending on your OS and version. It could be
  called /bin/adb (older Xenix) or /etc/_fst (Unix and recent versions
  of Xenix). If you don't have either of these, look through the files
  in /etc/perms for them; in Xenix 2.3.4, you will find one of each,
  which will be in fact the exact same file but on two different
  diskettes. If the volume on which the file you want is mountable (you
  can check this in the manual, or use the dtype command), then mount it
  and copy the file off. Otherwise, use tar to extract the file, keeping
  in mind that the filenames on your diskettes are all written with
  relative paths (i.e. ./bin/adb, not /bin/adb). Note that if you look
  in the Unix documentation, it may well tell you that you need
  /bin/adb, when in fact it's called /etc/_fst.

  [Table of Contents]
    _________________________________________________________________

  I can't find crypt

  Most (all?) of SCO's release notes state that due to American
  government restrictions aimed at trying to prevent unfriendly nations
  from having access to data encryption technology, SCO does not ship
  crypt with their products. If you live in the States and would like
  crypt(C) and the crypt(S) libraries, contact SCO support. This is also
  worth trying in Canada, as the particular regulation in question
  permits export of such technology to Canada; however, I don't know if
  SCO will honour such requests. There is also an international version
  of crypt available from the usual places as lng225b.

  Recently, some of the cryptographic restrictions have changed- for the
  better, we hope, though plenty of stupidity still remains.

  [Table of Contents]
    _________________________________________________________________

  What do I need to compile programs?

  If you have free OpenServer, you already have a license to install the
  development system; the Web page on which you license free OpenServer
  gave you several keys and codes, including one to license the
  development system.

  Xenix, Unix and ODT do not ship with program development tools. These
  are unbundled into packages known as Development Systems. The
  rationale behind this is that many users of SCO systems are using
  off-the-shelf software and never need to write a line of C code. If
  everyone was forced to buy the development system whether they needed
  it or not, some of the customers might get upset. There is a periodic
  flame war about this; this is not the place to discuss it.

  You can buy the Development System for any of the three environments
  listed above as a separate package including the compiler, header
  files, libraries, lex, yacc, linker, and other tools. Additionally,
  development systems are available for other packages such as TCP/IP;
  these development systems add the include files, libraries, etc.
  required to program for the package in question. The ODT Dev Sys
  includes the development tools for all of the other goodies (e.g.
  TCP/IP, X) that are bundled into ODT. Since OSR5 generally bundles the
  various runtime packages (e.g. TCP/IP) with the OS, it also bundles
  the same development packages, so there are not the same development
  system add-ons in OSR5 that there were in previous versions.

  The "lxrun" package allows you to run many Linux programs on OSR5 and
  Unixware; you could always compile on a Linux machine.

  There are versions of gcc (the Gnu C Compiler) freely available for
  SCO systems. On older SCO operating systems, however, you will
  probably need the development system, as the header and library files
  you need are part of it and not part of the operating system itself.
  This problem has been alleviated in OpenServer Release 5, as the
  headers and libraries are now shipped as part of the base operating
  system and are available even if you have not purchased the
  development system.

  gcc sources and binaries for OpenServer Release 5 only are on the free
  Skunkware family of CD-ROMs; for more info, see
  http://www.sco.com/skunkware/faq.html or read the section below
  entitled "What is Skunkware?"

  gcc sources and binaries are also available on Robert Lipe's home
  page: http://www.dgii.com/people/robertl/ or
  ftp://ftp.dgii.com/users/robertl/scods/ These are mirrored by SCO at
  http://www.sco.com/skunkware/gds/ and ftp://ftp.sco.com/skunkware/gds/
  You can also look at a different version at
  ftp://ftp.sco.com/skunkware/osr5/devtools/gcc/ and
  http://www.sco.com/skunkware/osr5/devtools/gcc/

  For those who want to find this based on a keyword search: programming
  programmer library libraries developer source

  [Table of Contents]
    _________________________________________________________________

  What does the NCALL kernel parameter affect?

  NCALL controls the size of the kernel callout table. The kernel has
  the ability to schedule some action at a given real time; this is
  often used by device drivers and by the nap(S) system call. The size
  of this table is set by NCALL. If the system message "timeout table
  overflow" appears on your console, NCALL should be increased.

  Increasing NCALL is not expensive in terms of memory or CPU overhead,
  as the structure is small (16 bytes per entry) and stored sorted, so
  it is best to be generous with these entries.

  [Table of Contents]
    _________________________________________________________________

  How do I reset the root password if I forget it? (part 1)

  This procedure will work for Xenix, and for Unix as well if you are
  using a very relaxed security level (one which stores encrypted
  passwords directly in /etc/passwd). If you're using a higher security
  level on Unix, look for part 2 below.

  Boot the system from your emergency boot diskettes (if you didn't make
  these and keep them up to date, shame on you, but you should be able
  to use N1/N2 instead, and see the entry on crashing out of these
  diskettes below). Next,

  mount /dev/hd0root /mnt

  ; this will mount your hard drive's root filesystem on /mnt. Edit
  /mnt/etc/passwd. The first line will be your root line, such as

  root:encryptedpasswordgoeshere:0:0:God,Everywhere:/:/bin/sh

  Edit out the encrypted password (don't touch anything else!) so that
  the line reads something like

  root::0:0:God,Everywhere:/:/bin/sh

  Save the file and shut down. Reboot from the hard drive. Your root
  password has now been removed, and you can reset it normally.

  Also see http://aplawrence.com/Boot/defs.html#bootfloppy.

  [Table of Contents]
    _________________________________________________________________

  How do I reset the root password if I forget it? (part 2)

  This is another procedure involving manually editing files, and is
  specific to SCO Unix 3.2v4.0 through 3.2v4.2. The location of the
  encrypted passwords depends on the security settings. Look in
  /etc/passwd, /etc/shadow, and /tcb/files/auth/r/root; one or more of
  these will be used depending on how you have security configured.
  Follow the procedure in part 1 above; instead of editing /etc/passwd,
  edit the appropriate file(s) from the above list, and delete the
  encrypted password field. Note that formatting is critical; while you
  can delete the contents of the field, you must not remove separators,
  and making seemingly minor errors such as leaving blank lines can
  cause problems. Save, shut down, and reboot. C2 security will complain
  about what you've done; to make it happy, run /etc/fixmog. You may
  also want to run /tcb/bin/integrity and /etc/tcbck.

  [Table of Contents]
    _________________________________________________________________

  How do I reset the root password if I forget it? (part 3)

  This procedure will work for any variant of SCO Xenix or Unix. As
  above, boot from your emergency boot diskettes and

  mount /dev/hd0root /mnt

  to gain access to your hard drive's root filesystem. Now, run
  /mnt/bin/chroot /mnt "/mnt/bin/passwd root"

  (check the chroot man page for more info on how it works). As before,
  shut down and reboot. It has been reported that on 3.2v4.2 (and
  possibly others), this must be done in two steps:

  /mnt/bin/chroot /mnt "/bin/su root"
  passwd

  If it doesn't work with the quotes, try it without.

  [Table of Contents]
    _________________________________________________________________

  How do I crash out of the install script?

  On OpenServer Release 5, boot from the boot diskette, and at the Boot:
  prompt, type

  tools

  This is not an undocumented option to the boot command, but rather a
  special line in /etc/default/boot on the installation diskette - so
  you can't use it from anywhere but your installation boot diskette.

  And you can't use it anymore at all. Tom Melvin pointed out:

  The 'tools' option broke around 5.0.4 time - I know it does not work
  in 5.0.5 or 5.0.6 Don't have a 5.0.4 box around to test it with.

  Tom's right: I booted "tools" on a 5.0.6 install disk. Part of the
  functionality of "tools" is still there (and in fact "tools" still is
  a boot option. If you press F8, you get the same screen that "tools"
  gave you directly, and you can do a shell escape. Unfortunately, so
  far I haven't been able to see how you can mount the existing hard
  drive. The old "hd0root" device is not there, and attempting "mount
  /dev/hd0a /mnt" didn't work.

  For older SCO Unix/Xenix/ODT releases, wait until the question early
  in the process that asks you what your keyboard type is. For
  character-mode installations, this is a regular textual prompt; for
  ODT, it's a box in a curses-style installation program. How to break
  out at this point depends on the OS. Under Xenix, press Del. Under
  Unix, type shell and press enter. Under ODT, press Control-A.

  Roberto Zini:

  See also http://www.sco.com/cgi-bin/ssl_reference?110414

  How can I generate and save a debug logfile for an SCO OpenServer 5
  installation or upgrade (not strictly related but worth reading :-)

  [Table of Contents]
    _________________________________________________________________

  Why can't fsck find my lost+found directory?

  Because you don't have one. It's possible someone deleted it, but the
  more likely cause is that you didn't use mkdev fs to create it.

  One of the things that fsck looks for is inodes which are marked as
  used (i.e. not in the free list) but do not have a directory entry
  pointing to them. fsck will ask if you wish to reconnect these; if you
  say yes, it will try to create a file entry in the /lost+found
  directory on that filesystem. If there is no free space in
  /lost+found, it is not safe to expand it because the rest of the
  filesystem may still be corrupt; for information on this one, see
  below. If there is not /lost+found directory, fsck will tell you that
  it can't reconnect the file and the data in that file will be lost.

  [Table of Contents]
    _________________________________________________________________

  I want more space in my lost+found directory

  By default, the mkdev fs script creates 62 empty entries in
  lost+found. If you'd like to make more, use a variant of the following
  script:

  for a in 0 1 2 3 4 5 6 7 8 9
  do
 for b in 0 1 2 3 4 5 6 7 8 9
 do
   > /lost+found/dummy$a$b
 done
  done
  rm -f /lost+found/*

  The above will create 100 entries. Season to taste.

  [Table of Contents]
    _________________________________________________________________

  How do I find out serial numbers of my various components?

  For the OS itself, you can use uname. For Unix, use uname -X; it will
  print (among other items) the serial number. For Xenix (at least
  2.3.3, and probably other releases), uname -u will print the numerical
  portion (e.g. if your serial number is sco012345, it will print
  12345).

  Starting in Unix 3.2v4.2/ODT 3.0, SCO added /etc/getserno. To find out
  the serial number of a package, first find out what files are
  serialized in that package using grep ser= /etc/perms/* (or
  /etc/perms/packagename if you know it). Then, run /etc/getserno
  filename, where filename is the name of one of the files that is
  serialized during installation. Note that not all files listed may
  actually contain a textual representation of the serial number (for
  example, none of the binaries in the Unix dev sys do).

  As a special case, the serial number of the OS itself can be found
  simply by watching the kernel ID it displays at boot time (or look
  through /usr/adm/messages for it).

  Roberto Zini:

  If one's interested in finding out the original activation key issued
  during the OpenServer 5 installation (eg, widely used here before
  submitting a commercial upgrade order), one could retrieve it by using
  the following command:

  grep IQM_ACTIVATION_KEY /usr/adm/ISL/iqm_file

  Alternatively, try with the following:
  grep IQM_ACTIVATION_KEY /opt/softmgmt/profiles/standard/SCO/Unix/*/iqm_file

  where '*' is the actual OS5 version (eg, 5.0.5Eb)

  Under SCO Unix 3.2v4.2:

  grep IQM_ACTIVATION_KEY /install/iqm_file

  Under SCO UnixWare 7:

  grep ActKey /vad/adm/isl/ifile

  [Table of Contents]
    _________________________________________________________________

  How do I solve an "arglist too long"?

  Wildcard expansion (globbing) is performed by the shell. There is a
  limit of 5120 bytes (5k) for the environment and command line
  arguments put together, in all versions of SCO Xenix and SCO Unix
  versions prior to OpenServer 5; more on OSR5 later. See also TA
  480563.

  This is particularly likely to be a problem under X, as it has a habit
  of using a lot of environment space. It is also a problem when running
  a command such as ls *.c in a directory with a large number of files
  which match the filespec.

  The general solution is to construct your command in such a way that
  it does not have to include all of the filenames on the command line.
  You can use the echo command, which is built into the shells and
  therefore is not subject to the 5k limit. For example, rather than rm
  V*, you might try echo V* | xargs rm. A similar, but somewhat more
  complex solution, might involve using the ls command to generate a
  list of filenames, and then using a command such as grep to filter
  them; ls | grep '^V' | xargs rm will perform the same task as the
  above example.

  You may also find the find command to be useful in this; however, it
  works recursively so it may not be appropriate in a directory with
  subdirectories. Please consult the man pages for each of these
  commands to identify any unexpected side effects they may cause.

  Another alternative, in cases where the environment is unnecessarily
  large, is to reduce its size. If you have some environment variables
  that you never use (be careful with this, as the system or some
  commands may use things you don't realize), you can permanently remove
  them in your .profile (or .login for C Shell users). You could also
  temporarily remove some manually. To run a subshell without any of the
  environment being passed to it, try running env - sh -c 'command'

  OpenServer Release 5 makes two changes to cure this problem. The
  default limit has been increased substantially (to 100k), which should
  by itself fix almost all instances of "arglist too long". As well, it
  is now a tunable kernel parameter, so if the default isn't adequate,
  you can adjust it. One exception: /bin/csh still has a hard-coded
  limit to the length of a line. If you are using csh, you may wish to
  replace it with tcsh (discussed below).

  [Table of Contents]
    _________________________________________________________________

  What versions/configurations am I using?

  WARNING: Many of these commands have different options under different
  versions of different operating systems, and not all of them are
  available under all versions of Unix, Xenix, and ODT. I've tried to
  note such differences but I'm sure many have escaped my attention.
  Take the following with a grain of salt. Unless noted otherwise, these
  entries should be applicable to most/all systems.

    * Kernel Configuration: configure -x | more (for Xenix, run this
      from /usr/sys/conf; for Unix, run it from /etc/conf/cf.d). This
      lists the current and default values for tunable kernel
      parameters. Under Unix, /etc/sysdef prints information including
      BTLDs (Boot Time Loadable Drivers).
    * Software Installed: /usr/bin/swconfig -p and /usr/bin/swconfig -a
      (both for Unix) print various information on installed software.
      You can look at the permissions lists in /etc/perms/* but you
      cannot tell from here which parts are installed; use custom for
      that. Use /usr/bin/displaypkg to display software installed using
      installpkg. Note that swconfig is not a terribly accurate guide.
    * Hardware configuration: /etc/hwconfig -h shows most of the
      installed hardware but not all of it; generally, things like
      multiport cards don't show up here. Use /etc/hwconfig -hc on Unix
      3.2v4.x or later and on Xenix 2.3.4
    * System name, version, etc.: uname -X (Unix and Xenix 2.3.4) or
      uname -a (Xenix 2.3.3 and earlier)
    * Printer configuration: lpstat -t

  Tom Melvin notes:

  A new program with 5.0.6 is /etc/sysinfo

  See also http://www.cruzio.com/~jeffl/sco/versions.txt

  [Table of Contents]
    _________________________________________________________________

  I have a bad block on my hard drive

  You will see error messages going by giving you the sector, cylinder,
  head, and other nifty information regarding the error. If you can jot
  this down, it makes it much easier to find the bad block without
  having to scan the entire drive for it.

  Shut the system down cleanly (using shutdown). If the error is on the
  root filesystem, boot from emergency floppies; otherwise, you can boot
  from the hard drive and enter single-user mode. The rule here is that
  the filesystem on which the error is located must not be mounted while
  you try to fix it.

  If you have a SCSI hard drive, use scsibadblk. It ships with Unix
  3.2v4.1 and 3.2v4.2, and ODT 2.0 and 3.0. For Unix 3.2v4.0, install
  the 4.1 maintenance supplement or upgrade to 4.2 (not a bad idea
  anyway). For Unix 3.2.2 or ODT 1.1, install unx347a (no longer
  available). For Xenix 2.3.4, install xnx348a. For OSR5, scsibadblk was
  rolled into badtrk, so just use badtrk. For older versions of Xenix or
  Unix, you're out of luck. One other note about SCSI drives; many of
  them will automatically remap bad blocks, so when you go to run
  scsibadblk you will not actually find any bad blocks - even if you run
  a thorough scan of the area where the bad block was reported. This
  capability is called AWR/ARR. If you see a menu option called
  something like "Modify target parameters", you can enable and disable
  AWR and ARR.

  If you're using a standard drive type (MFM, RLL, ATA, ESDI), use
  /etc/badtrk. I'd recommend doing a thorough, nondestructive scan of
  the area where the error message said there was a bad block.

  Before doing this stuff, have a look at the manual for your specific
  operating system to see any notes or recommendations made by SCO. If
  you're not careful here, you might make things worse than they already
  are (such as by doing a destructive scan, which will wipe out all data
  on the area you scan).

  [Table of Contents]
    _________________________________________________________________

  My system is slow

  First things first - make sure that somebody didn't accidentally turn
  the Turbo switch off. Don't laugh - I have a client who regularly
  manages this one. At some sites, it may be wise to disconnect this
  switch entirely. It might also be wise to run the system's CMOS setup
  program and ensure that primary and secondary cache is turned on,
  unless you know for a fact that there's something in your system that
  won't work properly that way. Turning on BIOS shadowing will generally
  only speed things up at boot time; with the exception of vbiosd (used
  to call real-mode video BIOS routines for video mode switching on some
  video cards in SCO's X11R5 implementation), the BIOS is not used after
  this point. If you gain the use of extra RAM by disabling BIOS
  shadowing, you should certainly do so; even if you don't, there may be
  cases where BIOS shadowing may lead to weird problems (I've even seen
  a host adapter which wouldn't work at all if its BIOS was shadowed or
  cached, for example).

  Under both Unix and Xenix, you can use vmstat to give you an overview
  of system performance. One problem is that it won't show you what
  percent of the system's time was spent waiting on I/O devices, and
  what percent was spent idle; these are both lumped together as idle
  time. vmstat can be helpful in diagnosing excessive swapping, and in
  finding if your system is CPU-bound.

  Unix also offers sar, which is far more advanced than vmstat. It
  reports on a wide range of system statistics including CPU utilization
  (system, user, idle, waiting for I/O), memory use, disk cache
  effectiveness, swapping/paging, and things you've never even thought
  of. Note that under MPX, it may not be reliable; check your MPX
  release notes for info (and for information on the mpstat and mpsar
  programs). One third-party program which may be useful in conjunction
  with sar is sarcheck (Aurora Software Inc., P. O. Box 1033, Plaistow
  NH 03865, (603) 382-4200, http://www.sarcheck.com/,
  [email protected]), which translates sar's results into
  English to identify system performance bottlenecks and suggest
  possible resolutions for these problems. sarcheck also works on
  multi-processor systems.

  There are some other utilities you may wish to use. Some freely-
  available ones include u386mon, bcw, and cpuhog/iohog/memhog, all of
  which are available in various TLSes (tls518 for OSR5, tls018d for
  older versions- but not Xenix). u386mon is a general performance
  monitoring utility which watches about as many different things as sar
  (but presents the information in a full-screen display format); bcw is
  the Buffer Cache Watch, which can help you see how well your cache
  buffers are tuned for your system's actual needs; the hog programs
  show you processes which are hogging those respective resources.

  Another commercial product which may be of use is Olympus Tuneup
  (Olympus Software, (408) 426-7582, [email protected]), which will
  monitor how your system is making use of tunable kernel resources and
  can perform tuning for you.

  Multiuser/multitasking/etc. operating systems love extra memory. Xenix
  will use up to 16 MB; Unix will use much more (how much depends on
  what version; check your release notes). There are several ways that
  extra memory is used; here are three of the most important. First,
  disk buffers; the system uses these for disk cache, and in general,
  the more, the better. Second, to avoid swapping; while a virtual
  memory system allows you to access more memory than you actually have,
  doing so involves the hard drive, which is several orders of magnitude
  slower than memory. Third, the system keeps recently-used programs in
  memory; if you access one again, it doesn't have to be reloaded from
  disk. There are tradeoffs between #1 and #2+#3; the more memory you
  have, the more generously each can be configured. Note that adding
  more memory will not cure CPU-bound processes, and will only cure
  I/O-bound processes if it can be used effectively as a disk cache
  (often it can, but not always).

  Roberto Zini: I seem to remember that some "old" systems could start
  crawling after adding more RAM; if I remember correctly, that was due
  to the fact the CPU could not cope with the additional RAM since it
  had too little internal cache. I'm not an hardware expert so the above
  could be plain wrong nowadays; could you confirm that ?

  Yes. CPU cache is still important- Tony Lawrence

  Also, double check the "netstat -m" output; we're currently fighting
  against a problem under SCO OpenServer 5.0.5 (fully patched) which
  causes it to crawl when STREAMS resources get low. If you notice
  non-zero values under the "fail" column, it's time to add more STREAMS
  buffer by making use of the configure utility under /etc/conf/cf.d
  (NSTRPAGES is the parameter to boost).

  [Table of Contents]
    _________________________________________________________________

  Why did my region table overflow?

  Each process generally consists of several (usually, but not always,
  three) regions - typically code, data, and stack. Two copies of the
  same program running at the same time will often share code, reducing
  the number of regions required; however, there's nothing to stop a
  program from using more than three regions, either.

  There is a tunable kernel parameter, NREGION, which specifies the
  maximum number of regions available. This should always be set to at
  least three times the number of processes (NPROC), and if you want to
  be on the safe side, use four times NPROC. Note that in OSR5, by
  default, both NREGION and NPROC are allocated dynamically.

  [Table of Contents]
    _________________________________________________________________

  How do I solve "fork failed: no more processes"?

  This is usually one of two things. There is a tunable kernel
  parameter, NPROC, which determines the maximum number of processes
  that may be running at any time. You may have exceeded this limit. The
  usual method of solving this is to increase it a fair bit and see if
  the problem goes away. If you are running on OSR5, this is unlikely to
  be the reason, as NPROC is allocated dynamically.

  There is another tunable kernel parameter, MAXUPRC, which determines
  the maximum number of processes any one user may have running at one
  time. Under Unix, for example, a large number of mail messages being
  processed at once may cause this to be exceeded by MMDF, usually
  resulting in "uux failure - pipe broke" or similar messages. Once
  again, increase it and see if the problem goes away.

  Also, have a look at the console and/or /usr/adm/messages for any
  system messages which appeared at the same time the user got this
  message. They may point to another potential reason, such as being out
  of swap space or exceeding NREGION (see the previous topic).

  [Table of Contents]
    _________________________________________________________________

  How are minor device numbers assigned by mkdev hd?

  Basically, they start at 64 (the major device number is 1) and go up
  by 64 each time you run mkdev hd. Don't expect them to be in the same
  order as your SCSI IDs for the drives unless that's the order you
  added them in. Also, if you being running mkdev hd but do not complete
  the process, it will generally already have assigned the next number;
  the next time you run mkdev hd, it will add another 64 even though you
  aren't actually using the last drive you started to create. This isn't
  a problem; it just looks weird.

  [Table of Contents]
    _________________________________________________________________

  How do I install a BTLD on a running system?

  Mount the floppy and run "btldinstall":
  mount /dev/fd0 /mnt
  btldinstall /mnt

  [Table of Contents]
    _________________________________________________________________

  How do I add a Zip or Jaz drive?

  You need to have the SCSI versions- I don't know of any drivers for
  the parallel port types. The SCSI versions are added as any SCSI hard
  drive is: "mkdev hd". I'd suggest that you name the filesystem
  something like "zip" or "jazz".

  When you want to mount this, just "mount /dev/jaz /mnt" etc. If you
  have enabled Dos filesystem support (on OSR5 "mdev dos" ), you can
  mount Dos filesystems on these cartridges.

  To create a file system on a blank or Dos cartridge, leave it
  unmounted and run "divvy /dev/jaz" (or whatever you called it). Follow
  the prompts to create a new filesystem.

  [Table of Contents]
    _________________________________________________________________

  Where can I get older versions of SCO products?

  You really should be upgrading. Even if you can find what you need
  (usually it's TCP/IP that folks are looking for), it's going to be
  very expensive- if you find it at all..

  These folks MAY be able to help you: Blue Chip Computer Systems:
  http://www.bccs.com 310-410-0126.

  [Table of Contents]
    _________________________________________________________________

  How do I capture program screens to a file?

  To capture text output, use "script". By default, the file will be
  called "typescript", but "script myfile" will use that name instead.
  Press CTRL-D when you are finished recording.

  To capture X screens, the "xwd" program is simple to use. Open an
  xterm, type "xwd > file" and (after pressing ENTER), just click on the
  window you want to capture. The resulting file can be printed using
  "xpr" or manipulated by graphic programs like "Gimp" and others if you
  need to save it as .gif or some other format.

  Tom Melvin contributed this:

  No idea where I got this from, it's pretty old (Xenix days). Works
  only on the console.

  :
  # Shell script to screen dump
  # This will only work at present on the  main console

  oldstty=`stty -g`
  stty -echo ixon ixoff -ixany
  /bin/echo '\033[2i\c'
  head -25 > /tmp/screen.$$
  stty $oldstty

  # Ok now output the file to the printer
  echo "\f" >>/tmp/screen.$$
  lp /tmp/screen.$$
  rm /tmp/screen.$$

  Or get Chip Rosenthal's prtscrn from any of the 'comp.sources.misc'
  archive sites it's in Volume 22 - This works very well on the console.

  [Table of Contents]
    _________________________________________________________________

  How can I increase the number of characters that are significant in passwords?

  (This applies to 3.2v4.x and up)

  Two factors control passwords: the maximum length that the password
  can be, and how much of that is significant.

  Both parameters are in /etc/auth/system/default.
default:\
       :d_name=default:\
       :u_pwd=*:\
       :u_priority#0:u_cmdpriv=audittrail,su,queryspace,printqueue,mem,termina
  l:\
       :u_syspriv=execsuid,nopromain,chmodsugid,chown:\
       :u_minchg#0:u_maxlen#80:u_exp#0:u_life#0:\
       :u_pickpw:u_genpwd:u_restrict@:u_nullpw:\
       :u_suclog#0:u_unsuclog#0:u_maxtries#99:u_lock:\
       :u_singleuserpswd:u_secclass=c2:u_integrity@:u_tcbpw@:\
       :u_pwseg#2:\
       :t_logdelay#1:t_maxtries#99:t_login_timeout#60:\
       :chkent:


  In the above example, u_maxlen#80 means that passwords can be up to 80
  characters long, but u_pwseg#2 limits the significance to 2 segments
  or 16 bytes (2 * 8). If you wanted 24 characters to be significant,
  you'd change it to u_pwseg#3.
    _________________________________________________________________

  [Table of Contents]
    _________________________________________________________________

  How do I mount a CDROM?

  Of course you've already run "mkdev cdrom", relinked the kernel and
  rebooted.

  In most cases, you can just do:
mount -r /dev/cd0 /mnt


  You may want to add:
mount -o lower -r /dev/cd0 /mnt


  To avoid getting everything in UPPER CASE.

  If you get "No such device", you have not correctly identified the
  device. Try "sconf -v" if it's SCSI; if IDE you are probably confused
  as to it being master or slave or whether it's primary or secondary.
  DO NOT assume that just because your system installed from CD that it
  now has a clue where to look- it does not.

  See the other CDROM related entries in this FAQ also.

  [Table of Contents]
    _________________________________________________________________

  How do I find out who or what halted my system?

  First, look in crontab for a call to haltsys or init. Someone may have
  added this for silly reasons.

  If you think some privileged user or process has run /etc/haltsys, add
  these lines to it right after the PATH= line

{
echo $0 `tty` `id`
MYPROC=$$
NEXTPROC=$MYPROC
while [ $NEXTPROC != 0 ]
do
ps -lp $NEXTPROC
MYPROC=$NEXTPROC
NEXTPROC=`ps -p $MYPROC -o "ppid=" `
done
} | mail -s "haltsys was run" root


  This will give you a full trace of where it was called from. You can
  use a similar technique with /etc/shutdown.

  You might also write a "K" script and put it in /etc/rc0.d.
  Unfortunately, by that time there isn't as much information to glean
  from the system. Adding to /etc/rc0 doesn't gain you much either, but
  at least you know it was not a crash and you *might* still see a
  suspect process in a ps listing.

  [Table of Contents]
    _________________________________________________________________

  How can I regularly and reliably transfer data to a program running on another
  machine?

  You could write a client on the sending machine and a server on the
  receiving end. Such network programs are not difficult, and you can
  find many examples on the web in C, Perl and other languages.

  However, consider that there are existing client/server programs
  already: mail and remote printing.

  A "printer" on the receiving end can instead process the data it
  receives: see http://aplawrence.com/Unixart/printing.html for more
  details on that sort of method.

  With mail, you can set up an alias on the receiving end that runs the
  program you need. That's done by including an alias that might look
  like this:

mydata: |/usr/local/bin/myprog


  Mail sent to "mydata" gets piped to /usr/local/bin/myprog. If you
  don't have access to the alias file on the remote machine, use
  "procmail" (available from Skunkware).

  The "mail" method has the additional advantage of including mail
  header information that might be of use in some circumstances.

  [Table of Contents]
    _________________________________________________________________