We have >1000 UNIX boxes in our environment with various UNIX flavors like Solaris, HP-UX and Redhat Linux ES 3/4/5. We need to collect their system configuration like
No. of CPUs and their frequencies
RAM Size
No. of HDDs installed and their usage
Exact OS Version and its revision.
I think it's best to write a Generic Script so that it can be run on ALL UNIX flavors and get the system configuration and pipe to a file.
I doubt that anyone has such script, but I'll be happy to see it. My suggestion is :
write an TCL / expect script, that will connect to all your servers, and get the info based on OS type.
Sample logic as follows :
$ list of servers to connect to = server1, server2, server3, etc.
# few functions :
function Linux {
# execute list of commands to get the info you want :
exec (uname -a, cat /proc/cpuinfo, free -mt, etc)
}
function Solaris {
exec (prtconf, prtdiag, psrinfo, etc)
}
main {
if OS = Linix then Linux()
elsif OS = Solaris then Solaris(), etc
}
# Define a way to write to a log file, based on the selected language, and some date/timestamp.
You can use TCL/Expect, as I said, or use Perl, in particular Perl's implementation of Expect library.
HTH. I'd love to see ready script, this can be very useful, as writing such script from scratch may be extensive and time consuming task.