The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
System Configuration Collector 1.8.7 (Stable branch) iBot Software Releases - RSS News 0 02-08-2008 12:40 AM
System Configuration Extraction nerd Shell Programming and Scripting 4 11-09-2007 01:48 AM
Gathering system configuration hcclnoodles UNIX for Dummies Questions & Answers 4 10-19-2004 11:10 AM
System boot configuration robotronic UNIX for Dummies Questions & Answers 2 04-19-2002 03:23 PM
How to the configuration of the system ds_sastry UNIX for Dummies Questions & Answers 3 09-29-2001 11:29 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-27-2008
prvnrk prvnrk is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 138
Script to get system configuration

Hi,

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.

Does anyone have this script? Please help.

Thanks
Prvn
  #2 (permalink)  
Old 10-27-2008
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,322
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 :
Code:
$ 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.
  #3 (permalink)  
Old 10-27-2008
drl's Avatar
drl drl is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 711
Hi.

I think I responded to a similar query in another forum recently. I'll look around.

In the meantime, there are a few items found here: freshmeat.net: Search results - +System +Configuration +Collector

An interview with the author of one is at Interview with Siem Korteweg: System Configuration Collector - The Community's Center for Security

Another item posted long ago is at Sysinfo - A Linux Box System Information Retriever - sysinfo

A commercial utility is MagniComp - SysInfo(TM) Total System and Storage Asset Information

cheers, drl
  #4 (permalink)  
Old 10-27-2008
drl's Avatar
drl drl is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 711
Hi.

Apparently it was on this self-same forum: Shell Scripts for automating server inventory for unix servers
... cheers, drl
Closed Thread

Bookmarks

Tags
audit asset, inventory configuration, linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0