The NMIS Support Tool

Introduction

The NMIS Support Tool collects all relevant information regarding an NMIS server's status and configuration which can be used to provide support.  It will also create a simple report that users can use for self-diagnostics.

Usage

This tool is run from a command prompt.

sudo /usr/local/nmis9/admin/support.pl action=collect

Once completed, the support tool will generate a list of any simple errors that it finds, such as low disk space or invalid names.  It will also create a support file containing the critical information and tell the user where that support file is - please include that support file in any requests for support.

Selftest and Automatic Repair

The Support Tool also runs the NMIS selftest, displays any problems detected, and runs NMIS' automatic repair procedure if correctables are detected (i.e. file ownerships, permissions and directory existence are verified and fixed if incorrect).  The Support Tool will report any errors when it runs and also create a support_report.html file which contains an easy-to-read report containing useful information for troubleshooting.

What is done

The Support Tool:

  • Performs NMIS selftest (ie. disk space, number of nmis processes, cpu and io load, last successful collect and update times not too long ago) and stops, asking for confirmation to continue if any of the above fail.
  • Collects general system status information
  • Collects globally relevant files
  • Zips up the results in /tmp/ and tells you about the name and location of the support file created.
  • Runs the support bot to produce human-readable report

Diagnostics for Opmantek Support

The tool will collect information about your installation which will help Opmantek support in fixing your problem and place it in a support file in the directory given for report_dir (/tmp in the example above).  Please attach this file in your request to Opmantek support.

What is collected and where you can find it

  • the support file contains one main directory, nmis-collect.<timestamp>, e.g. nmis-collect.2021-12-03-1538/
  • the nmis-specific or omk-specific stuff is right below that directory, e.g. nmis' models dir is in nmis-collect.2021-12-03-1538/models/
  • NO install and NO models-install are collected as these are static, and NO nmis database files
  • all system status info is underneath the system_status directory, e.g. nmis-collect.2021-12-03-1538/system_status/
    • passwd and group from /etc
    • vmstat output, top output, iostat output (if programs are installed)
    • uid and gid of nmis user and web/apache/httpd user in files nmis_userinfo and web_userinfo
    • system name in uname, whatever distro name/release info we could find, parked in system_status/osrelease
    • hosts, nsswitcht.conf and resolv.conf file from /etc
    • memory status and process status in the files top, processlist, meminfo
      process list includes all processes on the box, not just opmantek ones
    • routes and ifconfig outputs
    • disk status (mounts and sizes) in disk_info
    • a recursive listing of all the files in /usr/local/nmis or /usr/local/omk in file filelist.txt (this can be huge!)
    • md5 checksums of all the files in /usr/local/nmis (except database) or /usr/local/omk in the file md5sum (again, huge-ish)
    • the status of the filesystem locks (/proc/locks) in the file locks
  • the “main” log files, ie. all from nmis except config/ and json/, but NOT rotated ones
  • if there's more data than the default zip size (10 megabytes), then the logs are truncated to the last 4000 lines, one by one, until the zip file is small enough, and if that doesn't work, the support tool aborts and tells you about the max size parameter to change.

Options when Running Support Tool

Running support.pl without arguments shows a help screen.

The syntax for support.pl is:

support.pl action=[collect/run-bot] [report_dir=...] [public=t/f] [node=nodeA] [node=nodeB ...] [bot=0] [support_file=] [maxzipsize=] [maxlogsize=] [maxopstatus=] [maxoperrors=] 
  • action: this can be set to collect or run-bot.  collect will collect data and use it to generate a report, run-bot will use data collected from a previous collect to create the report.  If run-bot is used, you must specify support_file=

    support.pl action=collect
  • support_file: Specify the location of the support file if using run-bot for action.
    support.pl action=run-bot support_file=/tmp/myfile.zip
  • public: If set to false all credentials and other sensitive information will be removed and are not included in the support file.

    support.pl action=collect public=f
  • node: if defined, the tool will also collect node specific information.  This can be set to * to collect on all nodes, but may make the data file larger than desirable.

    support.pl action=collect node=NodeName
  • bot: if set to 0, support.pl will not create a support_report.html containing an easy-to-read summary.

    support.pl action=collect bot=0
  • report_dir: Determines where the support file will be saved. Needs to be full path defined, Default is /tmp

    support.pl action=collect report_dir=/home/nmis/reports/
  • maxzipsize: Defines the maximum size of the support file in bytes.  Default is 10 MiB.

    support.pl  action=collect maxzipsize=2000000
  • maxlogsize: Defines the maximum size of the log file in bytes.  Default is 4 MiB.

    support.pl  action=collect maxlogsize=104857600
  • maxopstatus: Defines the maximum number of status messages.  Default is 500.

    support.pl  action=collect maxopstatus=138
  • maxoperrors: Defines the maximum number of errors.  Default is 100.

    support.pl  action=collect maxopstatus=50

Download Links

You most likely already have the support tool installed.

NMIS 8.5G and NMIS 9.1.0G and newer ship with the support tool preinstalled.  It can be found in the admin folder - typically /usr/local/nmis9/admin for NMIS9 and /usr/local/nmis8/admin for NMIS8.

If your installation is older, the tool can be downloaded from the following links:

Related Topics

The Opmantek Support Tool