The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
While Loop assistance. MaestroRage UNIX for Dummies Questions & Answers 2 02-05-2008 02:30 PM
I need an assistance mytilini boy Shell Programming and Scripting 1 05-25-2007 05:42 PM
KSH Script Assistance Brusimm Shell Programming and Scripting 3 05-10-2007 05:15 AM
Perl script assistance; paste word into external command bru Shell Programming and Scripting 10 02-23-2007 12:04 AM
Need Assistance yahoo14 UNIX for Dummies Questions & Answers 1 06-08-2006 07:21 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
Unhappy Command assistance

Hi,

We currently use the below basic scripts to output details that the business requires for our AIX and Sun servers. I have been asked to produce the same sort of script to be used for our NCR MP-RAS UNIX and OS/2 UNIX servers but am not formilar with these forms of Unix. Would greatly appreciate if anyone can assist me with this.

AIX
#!/bin/ksh
OUT="/tmp/serverinfo_$(hostname).txt"
print "Server Info" > $OUT
print "hostname" > $OUT
hostname >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "ifconfig -a " >> /$OUT
ifconfig -a >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "Number of processors" >> /$OUT
lsdev -Cc processor >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "lslpp -L" >> /$OUT
lslpp -L >>$OUT

Sun
touch /tmp/`uname -n`-swinv.txt
echo Server Info >>/tmp/`uname
echo =========HOSTNAME=========== >>/tmp/`uname -n`-swinv.txt
uname -n >> /tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo =========IP ADDRESSES=========== >>/tmp/`uname -n`-swinv.txt
ifconfig -a >>/tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo ===========HW/CPU INFO============== >>/tmp/`uname -n`-swinv.txt
/usr/platform/`uname -i`/sbin/prtdiag >> /tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo ==============SW INSTALLED================ >>/tmp/`uname -n`-swinv.txt
pkginfo |sed /SUNW/d|awk '{ print "pkginfo -l " $2}'>> /tmp/`uname -n`-swinv.txt
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0