=======================================================
HP: sysdoc
=======================================================
:Title:        HP: sysdoc
:Author:       Douglas O'Leary <dkoleary@olearycomputers.com>
:Description:  HP: sysdoc
:Date created: 01/19/2000
:Date updated: 10/24/2001
:Disclaimer:   Standard: Use the information that follows at your own risk.  If you screw up a system, don't blame it on me...

Overview:
==========

:Author:  Doug O'Leary
:Created: 01/19/00
:Updated: 11/13/00
:Script:  :download:`sysdoc_html` (creates html documents)
:Script:  :download:`sysdoc_txt` (creates text output)

Sysdoc documents HPUX systems by selectively querying various subsystems 
then formatting and printing the results to the screen.  The user can then 
decide, using standard UNIX utilities, to redirect the output to a printer, 
file, or another program.

UPDATE: (10/24/01)I updated sysdoc to create html documents in /tmp 
directory. In case people want the original txt version, I left that on the 
site as well. Both scripts provide the same information, just a different 
format.

Configuration:
==============

There is only one thing that can be or need to be configured within this 
script:

1. System serial number: The program will use a parameter called ${serial} 
   as the system serial number. The ${serial} parameter can either be set by 
   a command line argument or read from the contents of the 
   ${serial_file}. ${serial_file} is set on/about line 989 of the sysdoc 
   script and defaults to /usr/local/etc/serial_number. If there is no 
   command line argument supplied, and the /usr/local/etc/serial_number file 
   doesn't exist, the script will report the serial number as "Not Recorded".

Execution:
==========

::

   sysdoc [ SERIAL_NUMBER ]

Report details:
===============

1.    General Information:  The script obtains and displays the following:

      a. Host name
      b. OS level
      c. Number, type, and speed of processors
      d. RAM
      e. Model number.
      f. NIS master, if the system is using NIS.
      g. System uptime report.

2.    Kernel Parameters 

      a.  Current kernel parameters:
   
         1. On HPUX 11.X and appropriately patched 10.X systems, the program 
            formats the output of kmtune and kmsystem.
         2. Otherwise, the system obtains and displays the output of the 
            sysdef command.

      b. The system obtians and displays the current kernel system file.

3.    Full hardware listing: the system obtains and displays the output of 
      the ``ioscan -f`` command.
4.    Tape drive information: the system obtains and displays the tape drives 
      and their associated device drivers.
5.    Local Area Network information:  the system obtains and displays the 
      LAN interfaces and their associated device drivers.
6.    Printer information:  The system obtains and displays the following:
      a. Printer name
      b. Printer IP
      c. Whether or not the printer is enabled.
      d. Whether or not the printer is accepting print jobs.
7.    Disk Hardware information: the system obtains and displays the 
      following information for each physical disk on the system:

      a. Disk device file.
      b. Hardware path.
      c. Volume group if the disk is assigned to one.
      d. Size of the disk if it can be identified.
      e. Description

8.    Alternate links: the system obtains and displays the following:

      a. Volume group to which the linked pair of disks is assigned.
      b. Primary: Which device is currently acting as the primary interface
      c. Alternate: Which device is currently acting as the alternate 
         interface.

9.    Unallocated disks: the system obtains and displays the device drivers 
      for disk that are not currently assigned to volume groups.
10.   Boot Hardware paths: the system displays the device file and hardware 
      path for the primary and alternate boot paths.
11.   Boot definitions: the system executes the lvlnboot command and 
      displays the results.
12.   Swap space: the system executes and displays the swapinf command.
13.   Summary volume group information: for each volume group on the system, 
      sysdoc displays the following information:

      a. Summary information

         1. Volume group name
         2. Total allocated space in megabytes.
         3. Total unallocated space in megabytes.

      b. Disks: Associated disk devices
      c. Logical volumes:

         1. Logical volume device file
         2. Size
         3. Use (mount point, swap, or Unknown)
         4. Mirrored (Y/N)
         5. Striped (Y/N)

14.   Active fstab partitions: the script formats and displays the 
      /etc/fstab file.
15.   Current filesystem usage: the script formats and displays the output 
      of the bdf command.
16.   NFS information: the system obtains and displays the following 
      information:
      a. The exported filesystems
      b. The remote clients that have local filesystems mounted.
      c. The remote filesystems that the system has mounted.
17.   Network information: the system obtains and displays the following 
      information:

      a. Attached network adapters (output of lanscan)
      b. Configuration on each adapter (output of ifconfig)
      c. Routing table
      d. Arp cache

18.   Software and Patch information: the system obtains and displays the 
      following:

      a. Installed software and patches
      b. Installed and unconfigured software and patches.

19.   Cron tables: the system displays the contents of all running cron 
      tables.
20.   System files:  The system displays the contents of important system 
      database files:

      a. /etc/mail/aliases
      b. /etc/exports
      c. /etc/group
      d. /etc/hosts
      e. /etc/inetd.conf
      f. /etc/MANPATH
      g. /etc/nsswitch.conf
      h. /etc/passwd
      i. /etc/PATH
      j. /etc/profile
      k. /etc/resolv.conf
      l. /etc/services