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:sysdoc_html (creates html documents)
Script: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:

    1. Host name
    2. OS level
    3. Number, type, and speed of processors
    4. RAM
    5. Model number.
    6. NIS master, if the system is using NIS.
    7. System uptime report.
  2. Kernel Parameters

    1. 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.
    1. 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:

    1. Disk device file.
    2. Hardware path.
    3. Volume group if the disk is assigned to one.
    4. Size of the disk if it can be identified.
    5. Description
  8. Alternate links: the system obtains and displays the following:

    1. Volume group to which the linked pair of disks is assigned.
    2. Primary: Which device is currently acting as the primary interface
    3. 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:

    1. Summary information
      1. Volume group name
      2. Total allocated space in megabytes.
      3. Total unallocated space in megabytes.
    2. Disks: Associated disk devices
    3. 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:

    1. Attached network adapters (output of lanscan)
    2. Configuration on each adapter (output of ifconfig)
    3. Routing table
    4. Arp cache
  18. Software and Patch information: the system obtains and displays the following:

    1. Installed software and patches
    2. 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:

    1. /etc/mail/aliases
    2. /etc/exports
    3. /etc/group
    4. /etc/hosts
    5. /etc/inetd.conf
    6. /etc/MANPATH
    7. /etc/nsswitch.conf
    8. /etc/passwd
    9. /etc/PATH
    10. /etc/profile
    11. /etc/resolv.conf
    12. /etc/services