#! /usr/bin/perl -w

# Print version number
$0 =~ s/\/*([\w.]+\/)+//;
print "\n$0 - Copyright 1999 by Philips - version 1.0\n\n";

# Get hostname

print "Hostname:\n";
print "---------\n";
system ('uname -n');
print "\n";

# Get OS version

open (UNAME, 'uname -R|');
while (<UNAME>)
{
	s/[\d.]*\s//;
	print "Operating system version:\n";
	print "-------------------------\n";
	system ('uname -s');
	print "$_\n";
}
close (UNAME);

# Get CPU info

print "CPU's installed:\n";
print "----------------\n";
system ('hinv -v -c processor');
print "\n";

# Get memory distribution

print "Memory distribution:\n";
print "--------------------\n";
system ('hinv -v -c memory');
print "\n";

# Get HIPPI card locations

print "Hippi card locations:\n";
print "---------------------\n";
system ('hinv -v -d hippi | sort');
print "\n";

# Get HIPPI driver version

print "Hippi driver version:\n";
print "---------------------\n";
system ('versions hippi | grep hippi');
print "\n";

# Get installed drives

print "Drives installed:\n";
print "-----------------\n";
system ('hinv -v -c disk | grep Disk | sort');
print "\n";

# Get Fibre channel cards installed

print "Fibre channel cards installed:\n";
print "------------------------------\n";
system ('cat /etc/ioconfig.conf | grep fibre | sort');
print "\n";

# Get xlv software

print "XLV software installed:\n";
print "---------------------\n";
system ('versions eoe.sw.xlv | grep xlv');
system ('versions eoe.sw.xfsrt| grep xfs');
print "\n";

# Check GRIO dontrun

print "Garanteed Rate I/O is:\n";
print "----------------------\n";
open (LL, 'ls -l /etc/rc2.d/ | grep S94 |');
while (<LL>)
{
	if (/dontrun/ || /donotrun/ )
	{
		print "Disabled\n";
	}
	else
	{
		print "Enabled\n";
	}
}
close (LL);
print "\n";

# Get Specter software

print "Specter software version:\n";
print "-------------------------\n";
system ('versions Specter | grep Specter');
print "\n";

# Run chkconfig

print "System configuration:\n";
print "---------------------\n";
system ('chkconfig');
print "\n";

