Linux-64/cfg2html-linux
Package: WA2L/edrc 1.5.57
Section: Misc. Reference Manual Pages (1m)
Updated: 13.03.2018
Index
Return to Main Contents
cfg2html is a little utility program that can be used to collect the necessary system configuration files and system set-up information to both an ASCII and an HTML file. Simple to use and very helpful when preparing for disaster recovery situations.
 
NAME
cfg2html - creates nice HTML and plain ASCII documentation of your GNU/Linux
systems.
- WARNING, use this script AT YOUR OWN RISK.
 - 
 
 
SYNOPSIS
cfg2html
[-oshxOcSTflkenaHLvhpPA210]
option...
 
DESCRIPTION
cfg2html
collects the system configuration details into a webpage and a text file. cfg2html is the “Swiss army knife” for sysadmins. It was written to get the necessary information to plan an update, to perform basic troubleshooting or do performance analysis.
This includes the collection of Cron and At jobs, installed Hardware, installed Software, Filesystems, Dump- and Swap-configuration, LVM, Network Settings, Kernel, System enhancements and Applications, and Subsystems.
If you like, you can add a
description of the system into
/etc/cfg2html/systeminfo
example:
  Main database server using special software.- 
 
  Contact: Micky Mouse <admin@foo.bar>- 
 
  Location: Mars Moon- 
 - and so on.
 - 
If file
/etc/cfg2html/files
exists, you can add your own list of files to collect - see example included.
 
 
Switches
The following switches are available from the command line:
- -o
 - 
dir
Override the default Logfile output location for the generated HTML and text output (e.g.
/var/log/cfg2html
) to the specified directory
Alternatively, you can specify the location of the logfile by setting the environment
variable
OUTDIR=/path/to/dir
Specifying the
-o
option supercedes the definition of the OUTDIR environment variable
 - -0
 - 
append the datestamp to the Logfile (OUTDIR) with format Day-Month-Year-HourMinute, e.g. 28-Oct-2020-2212
 - -1
 - 
append the datestamp to the Logfile (OUTDIR) with format Day-Month-Year, e.g. 28-Oct-2020
 - -2
 - 
append the datestamp to the Logfile (OUTDIR) with the date format of your own choosing. e.g specifying
%Y%m%d-%H%M
would append the date with a format of 20201028-2212 to the log file name.
 - -v
 - 
output cfg2html version information, kernel information and exit
 - -h
 - 
output usage information and exit
By default, information in each of the following categories will be collected.  Use the following options to disable the collection of the indicated configuration information:
 - -s
 - 
disable: System
 - -c
 - 
disable: Cron
 - -S
 - 
disable: Software
 - -f
 - 
disable: Filesystem
 - -l
 - 
disable: LVM
 - -k
 - 
disable: Kernel
 - -e
 - 
disable: Enhancements
 - -n
 - 
disable: Network
 - -a
 - 
disable: Applications
 - -H
 - 
disable: Hardware
 - -x
 - 
disable listing the executable files in the PATH
This switch has no effect if -s is specified.
 - -O
 - 
disable listing open files that have been deleted
This switch has no effect if -s is specified.
 - -A
 - 
disable collecting the Altiris ADL Agent files, if present
Other options
 - -p
 - 
enable collecting the system's Log files.  If running on an HP PROLIANT SERVER, collect additional relevant logs.
 - -P
 - 
enable the processing of the custom plugins that you may have configured
 - -L
 - 
disable showing the command that was executed to generate the html output in each section
 - -T
 - 
enable showing performance information regarding the execution of cfg2html
 
 
VARIABLES
- OUTDIR
 - 
defines the folder where the generated reports are saved.  The -o switch
overrides the setting of this environment variable.
A useful technique is to specify it on the command line when executed. E.g.
OUTDIR=/path/to/dir ./cfg2html
Note that using the -0 -1 or -2 switches append the indicated date stamp to the log files created in OUTDIR.
 - LOCALPATH
 - 
If not specified, cfg2html will by default display all of the executable files in the deemed to be optimal
PATH as stated in
http://security.stackexchange.com/questions/117535/ordering-of-the-path-environment-variable
defined at the beginning of the path, followed by specific additional directories that cfg2html has found to be installed.
LOCALPATH
provides a means for the Sysadmin to specify the PATH for which they want to see the contents.  If defined, the variable should
be set to a colon-separated list of directories, which do not need to exist.
e.g. LOCALPATH=/operator/bin:/sbin:/bin:/usr/sbin:/usr/bin
The best location for setting this variable is in
/etc/cfg2html/local.conf
but like
OUTDIR,
can also be specified on the command line, if so desired.
 
 
FILES
After installation, the following files will exist:
- /etc/cfg2html/systeminfo
 - 
The system description you can update
 - /etc/cfg2html/files
 - 
The contents of the files listed will be collected into the report
 - /etc/cfg2html/local.conf
 - 
Can contain local switch over-rides and local variable definitions
 - After cfg2html is run, the following files will be generated in OUTDIR:
 - 
 - <hostname>.html
 - 
the generated documentation in HTML form
 - <hostname>.txt
 - 
the generated documentation in ASCII form
 - <hostname>.err
 - 
error logfile (if any errors are generated)
 - <hostname>.partitions.save
 - 
Disk Partitions to restore from
 - <hostname>._xpinfo.csv
 - 
(only on systems connected to HP Disk Arrays): the output of the xpinfo command
 - Other files:
 - 
 - README
 - 
Additional documentation and installation instructions.
 - changelog
 - 
Revision history for cfg2html and associated files.  Also, see the git log.
 
 
SEE ALSO
README, License.txt
and
changelog
files in the source directory.
 
NOTES
Only
root
can run the
cfg2html
wrapper script.
For security reasons, it is best to store the HTML and ASCII
files in a safe place where only the root user has access, or remove the files from
your file system.
 
CONTACTING
If you like the script, want to learn more about it, or want to
see a feature added to it that isn't already here, then please subscribe to the
project mailing list. The project web page is at
http://www.cfg2html.com
and the source code is hosted on github at:
https://github.com/cfg2html/cfg2html
 
WARNINGS
use the
cfg2html
script at your own risk! See the file License.txt for details!
 
DIAGNOSTICS
cfg2html
writes errors to <hostname>.err
 
BUGS
There are probably a lot of bugs.  We are currently using this script
successfully for our own systems, but there are many features included
that we don't have any way to test right now. If you find a bug or have a
comment or suggestion about the script, please submit an issue at
https://github.com/cfg2html/cfg2html/issues
or you can also email bugs and issues to the authors. You can find the address in the
AUTHORS
section. We'd love to hear from you. :-)
 
AUTHORS
Original cfg2html HP-UX version written by Ralph Roth <cfg2html@hotmail.com>
and ported to Linux by Michael Meifert, maintained by Gratien D'haese and
Ralph Roth on github.com.
See the source code and ChangeLog file for the complete history and credits.
This document was created by man2html
using the manual pages.
Time: 16:52:32 GMT, August 28, 2024