Jan 30, 2012

Inventorying your system with cfg2html

Cfg2html is a powerful tool available for Linux which performs an exhaustive inventory of the entire system, by creating a HTML or plain ASCII file which reflects all the features (both hardware and software) of the system, such as applications, kernel, modules and libraries, networking, filesystems and so on.

I am used to utilizating this tool each time that I install a Linux system, in order to write down a full record of it, and besides, I usually program a task to repeat this action periodically.

I am going to try out this tool (version 2.37) in this article on a CentOS 6.2 distribution (it is valid for any Linux system too), by downloading its source code and using the script included in the package. You also have the option of installing those scripts into the operating system (by means of the rpm package), but I am think that it is not necessary due to you can use directly the corresponding script.

[root@centos tmp]# wget http://www.cfg2html.com/cfg2html-linux-2.37-20111229_all.zip

[root@centos tmp]# unzip cfg2html-linux-2.37-20111229_all.zip

[root@centos tmp]# tar xvzf cfg2html-linux_2.37-1.tar.gz ; cd cfg2html-linux-2.37

After unpacking it, we may run the cfg2html-linux script to carry out the inventory.

[root@centos cfg2html-linux-2.37]# ./cfg2html-linux

--=[ http://come.to/cfg2html ]=-----------------------------------------------
Starting          cfg2html-linux version 2.37-2011-12-28
Path to Cfg2Html  ./cfg2html-linux
HTML Output File  ./centos.local.html
Text Output File  ./centos.local.txt
Partitions        ./centos.local.partitions.save
Errors logged to  ./centos.local.err
Started at        2012-01-30 21:31:19
WARNING           USE AT YOUR OWN RISK!!! :-))           <<<<<
--=[ http://come.to/cfg2html ]=-----------------------------------------------

Collecting:  Linux System CentOS release 6.2 (Final)  .................................
Collecting:  Cron and At  .....
Collecting:  Hardware  .................
Collecting:  Software  .......
Collecting:  Filesystems, Dump- and Swapconfiguration  ..........
Collecting:  Multipath Configuration  ........
Collecting:  LVM  ............
Collecting:  Network Settings  ................................
Collecting:  Kernel, Modules and Libraries  ...............
Collecting:  System Enhancements  .
Collecting:  Applications and Subsystems  .....

--=[ http://come.to/cfg2html ]=-----------------------------------------------

At the end of the collecting process, you will have an HTML and txt file with the result of the audit. Any problem occured during the gathering process, will be warn into the err file.

[root@centos cfg2html-linux-2.37]# ls -l centos.local.*
-rw-r--r--. 1 root root   8410 Jan 30 21:31 centos.local.err
-rw-r--r--. 1 root root 213406 Jan 30 21:31 centos.local.html
-rw-r--r--. 1 root root    259 Jan 30 21:31 centos.local.partitions.save
-rw-r--r--. 1 root root 182348 Jan 30 21:31 centos.local.txt

For example, next figure shows the HTML output.




Finally, also say that it is a good idea to create a crontab task so as to get these data for instance weekly and back up them.


2 comments:

  1. Hi,

    When i run the cfg2html on a linux system it gives me output file in tar format. I copy it on my laptop and extract it. But when I open the output html and text file my system hangs up. I can't see any thing. Kindly help me in this regard.

    ReplyDelete
    Replies
    1. I do not know what is happening in your case. As you can see in my article, I directly got an html file, centos.local.html, after running the cfg2html-linux script.

      Delete