Streamline System Documentation with cfg2html: A Powerful Tool for HTML and Text Output

Streamline System Documentation with cfg2html: A Powerful Tool for HTML and Text Output

One of my favorite tools is cfg2html—a fantastic, small, and lightweight program that simplifies system documentation. It generates comprehensive documentation in both HTML and text formats, making it highly versatile. Although the project homepage may seem a bit old-school with its 1990s-style design, don't let that deter you from exploring its powerful capabilities.

Installation:

Installing cfg2html is a breeze; just execute a single command:

sudo git clone https://github.com/cfg2html/cfg2html.git         

That's it! The process will create the cfg2html directory, where you'll find an executable shell script named cfg2html.

Running the Tool:

Running cfg2html is straightforward. By default, you can simply execute the script without any options. It will perform a collection of system information, which might take a few moments, and store the resulting files in the /tmp directory.

The tool generates the following output files:

  1. HTML Output File: /var/log/cfg2html/<hostname>.html
  2. Text Output File: /var/log/cfg2html/<hostname>.txt
  3. Partitions File: /var/log/cfg2html/<hostname>.partitions.save
  4. Error Log File: /var/log/cfg2html/<hostname>.err

For additional configuration options, you can use the -h option to access the help menu. This allows you to specify a different output directory, customize output filenames, or disable specific data collections as needed.

HTML Output:

The HTML file generated by cfg2html serves as a comprehensive reference, showcasing the complete system configuration. Here's an example of the output for one of my old laptops:

Example Laptop HTML Output

The level of detail provided in the HTML output is impressive. In fact, it's so comprehensive that a skilled systems administrator could easily recreate the entire system from scratch if necessary.

Text Output:

If you prefer a more straightforward format, cfg2html also offers the same detailed information in ASCII text. Here's the text version of the same laptop's output:

Example Laptop Text Output

The text version is ideal for parsing data to update an inventory or to run a diff command against a previous version to identify any changes.

In summary, cfg2html is a fantastic tool for generating system documentation with ease. Its ability to provide output in both HTML and text formats makes it extremely useful for various purposes, from reference documentation to system analysis. Give it a try, and you'll likely find it to be an invaluable asset in your system management toolkit!

Hi Tom, since the time you posted this, there have been a number of improvements made for linux systems. You might like to check them out. By the way, links to your examples were not accessible when I tried to get to them. Thanks, Ed

Like
Reply

This is good. How about config changes? Or comparing it with a reference. That would be very helpful if possible

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore content categories