Creating Reports in HTML

System Summary Reports
The following command creates a report in HTML containing a general summary of the system as well as high level hardware inventory information and stores the result in a file called report.html:

mcsysinfo --encode html --class general,hardware --output report.html

This command is similiar to the last, but the data is in a column format instead of the default tree format:

mcsysinfo --encode html --class general,hardware --output report.html --format columns

Software Inventory Reports
If you wish to create a report of Software installed on the system, run this command:

mcsysinfo --encode html --class software --output report.html

If you wish to include details about each software product and package, run this command:

mcsysinfo --encode html --class software --output report.html --msglevel all

If you really want to know everything about each software package including a listing of each file belonging to each package then run this command (it may take a while to run):

mcsysinfo --encode html --class software --output report.html +swfiles

Complete System Reports
A full HTML summary report of your system can be performed using this command:

mcsysinfo --encode html --class all --output report.html

A full HTML detailed report (including details such as disk partitioning) of your system can be performed using this command:

mcsysinfo --encode html --class all --output report.html --msglevel all

Automated Central Reporting
Many organizations wish to create and store asset inventory and system configuration data in a central location. This can be useful for audits, disaster recovery planning, building a web page of system reports, and many other uses.

Automated Central Reporting with SysInfo Agent
If you have installed the SysInfo Agent (the default) you can write a script to poll each system and retrieve the requested data. Here's a sample sh(1) script which should run on most UNIX systems:

# Run SysInfo Reports on the hosts given on the command line.

# Dir where reports are saved to

if [ ! -d "$ReportDir" ]; then
    mkdir "$ReportDir"

echo "Reports will be saved into $ReportDir"

for host in $* ; do
    echo "Creating report for $host . . ."
    mcsysinfo --host $host --nw --encode html \
	--class general,hardware,partition,network,netif,software \
	> $ReportDir/${host}.html

The following example shows how to create reports for several hosts using this script:

host% ./ sneezy doby winey
Reports will be saved into /home/john/SysInfoReports
Creating report for sneezy
Creating report for doby
Creating report for winey

Automated Central Reporting without SysInfo Agent
If you have not installed the SysInfo Agent on each system as part of the default installation, you'll need to run the SysInfo command on each host you wish to collect a report from.

On UNIX based systems (including Linux and Mac) you can use the cron scheduler to run SysInfo reports on each system. The results of this report could be saved to a central network location via NFS or CIFS. Alternatively you could email the results to a collections mailbox for further processing.

Let's take the example of storing the data to a central network server via NFS. On each system you wish to run a report, you would create a cron job that looks something like the following:

0 4 * * * root /opt/sysinfo/bin/mcsysinfo --nw --encode html \
          --class general,hardware,software,partition,network,netif \
          --output /net/server/sysinfodata/sysinfo-`hostname`.html

In this example, the report would be run once per day at 4am and the data would be saved in HTML format to the file /net/server/sysinfodata/sysinfo-`hostname`.html where `hostname` is replaced with the name of the host the report is run on.

The same report could be sent via email using a cron command such as this:

0 4 * * * root /opt/sysinfo/bin/mcsysinfo --nw --encode html \
          --class general,hardware,software,partition,network,netif \
          | mail -s "SysInfo Report" [email protected]