X
    Categories: Linux

3 simple steps to take the Hardware/software inventory of the server.

Introduction:

cfg2html is tool (shell script) that provides the system documentation for HP-UX 10.xx/11.xx, Integrity Virtual Machine, SCO-UNIX, AIX, Sun OS and Linux systems,  Meaning that using this tool you can takes the all the minute level details of the system consisting of hardware as well as software information & produces this information in the form html page. This HTML page is very user friendly in terms of accessing various categories of information such as below:

1. Hardware
2. Software
3. Filesystems, Dump- and Swapconfiguration
4. LVM.
5. Network Settings
6. Etc.

Now lets move on to the execution part of it !!!!

Steps to take hardware/software inventory of the server

1. First of all goto http://www.cfg2html.com/ which maintains all the different scripts/exctutables for different flavors of operating systems such as HPUX, AIX, Linux & different *NIX versions.

2. For the demo purpose we are using Linux operating system.

3. Now download “cfg2html-linux-2.94-20140811_all.zip” which contains direct shell script as well as the rpm form.

There are two ways to use cfg2html.

A.  Using rpm

I. For rpm lovers you just need to copy the “cfg2html-linux-2.94-2.noarch.rpm” to the server.

II. Install the rpm using “rpm –ivh <rpmfile>” command
Eg.

[root@kalwa1 tmp]# rpm -ivh cfg2html-linux-2.94-2.noarch.rpm
Preparing... ########################################### [100%]
 1:cfg2html-linux ########################################### [100%]


III. This will give the ready to use “cfg2html” command at the shell just execute it at the directory where you can store the output of the command which is html file.

Note: Do not forget the line “WARNING USE AT YOUR OWN RISK!!! :-)) ” in the output.

Eg.

[root@kalwa1 tmp]# cfg2html
---=[ http://www.cfg2html.com ]=-----------------------------------------------
Starting cfg2html-linux version 2.94-2014/05/07
Path to Cfg2Html /usr/bin/cfg2html-linux
HTML Output File ./kalwa1.home.com.html
Text Output File ./kalwa1.home.com.txt
Partitions ./kalwa1.home.com.partitions.save
Errors logged to ./kalwa1.home.com.err
Started at 2015-05-31 21:11:47
WARNING USE AT YOUR OWN RISK!!! :-)) <<<<<
---=[ http://www.cfg2html.com ]=-----------------------------------------------
Collecting: Linux System (Red Hat Enterprise Linux Server release 6.2 (Santiago)) ........................................
Collecting: Cron and At .......
Collecting: Hardware ........................
Collecting: Software ........
Collecting: Filesystems, Dump- and Swapconfiguration ..........
Collecting: LVM ............
Collecting: Network Settings ......................................
Collecting: Kernel, Modules and Libraries ................
Collecting: System Enhancements .
Collecting: Applications and Subsystems ..........
Collecting: Local files .
---=[ http://www.cfg2html.com ]=-----------------------------------------------

IV. The above command generate following list of files in the same directory

-> kalwa1.home.com.partitions.save
-> kalwa1.home.com.err
-> kalwa1.home.com.html
-> kalwa1.home.com.txt

V. Just copy the html file to client machine at open it in a using your favourite browser
To see the sample output of html file please see the last page of this post.

B. Using shell script
This method is quite easy to execute.
I. Just copy the “cfg2html-linux_2.94-2.tar.gz” file to the destination directory on the linux server.

II. Now gunzip the file using gunzip command.
e.g.

gunzip cfg2html-linux_2.94-2.tar.gz

III. Untar the tar file

tar -xvf cfg2html-linux_2.94-2.tar

IV. This will create the directory “cfg2html-linux-2.94”

V. Go into the directory

[root@kalwa1 tmp]# cd cfg2html-linux-2.94

VI. Execute the ./cfg2html-linux command in the same directory.Sample output is as below:

[root@kalwa1 cfg2html-linux-2.94]# ./cfg2html-linux
---=[ http://www.cfg2html.com ]=-----------------------------------------------
Starting cfg2html-linux version 2.94-2014/05/07
Path to Cfg2Html ./cfg2html-linux
HTML Output File ./kalwa1.home.com.html
Text Output File ./kalwa1.home.com.txt
Partitions ./kalwa1.home.com.partitions.save
Errors logged to ./kalwa1.home.com.err
Started at 2015-05-31 21:53:02
WARNING USE AT YOUR OWN RISK!!! :-)) <<<<<
---=[ http://www.cfg2html.com ]=-----------------------------------------------
Collecting: Linux System (Red Hat Enterprise Linux Server release 6.2 (Santiago)) ..
Collecting: Cron and At .......
Collecting: Hardware ........................
Collecting: Software ........
Collecting: Filesystems, Dump- and Swapconfiguration ..........
Collecting: LVM ............
Collecting: Network Settings ......................................
Collecting: Kernel, Modules and Libraries ................
Collecting: System Enhancements .
Collecting: Applications and Subsystems ..........
Collecting: Local files .
---=[ http://www.cfg2html.com ]=-----------------------------------------------
[root@kalwa1 cfg2html-linux-2.94]#

For sample output click this link ==> kalwa1.home.com

View Comments (2)

  • how can in do this?

    Just copy the html file to client machine at open it in a using your favourite browser

    • You just copy the generated html file from the server to the local system/desktop using ftp/sftp & open it using browser like internet explorer/google chrome.

Related Post