script to find system configuration solaris

Dear experts -

I would like  if any one of you has a script to find system configuration in solaris such as
 Hostname, OS version, Kernel version, Processor/CPU, Total RAM, Hard disks,mount points

appreciate your help

Regards
akp007Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmolCommented:
No need of script,

Run the following command,

prtdiag -v - processor/CPU info
prtconf -v | grep Mem -  Total Memory
df -h - Filesystems or mount points
format - hard disks
uname -a - hostname and version
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
turnbulldCommented:
Here ya go.  You'll want to add echo or printf statements to separate and format the output.
#!/bin/sh

#Hostname
hostname

#OS version
cat /etc/release | head -1

#Kernel version
uname -a

#Processor/CPU
prtdiag -v | while read LN; do 
  echo $LN | grep "Processor Sockets" > /dev/null 2>&1
  rval=$?
  if [ $rval -eq 0 ]; then
    fnd=0
  else
    if [ "X${fnd}" = "X0" ]; then
      tst_char=`echo $LN | cut -c1`
      if [ "X${tst_char}" = "X=" ]; then
        break
      else
        echo $LN | grep "^Version" > /dev/null 2>&1
        rval=$?
        if [ ! ${rval} -eq 0 ]; then
          echo $LN
        fi
      fi
    fi
  fi
done

  
#Total RAM
prtconf -v | grep "^Memory"

#Hard disks
echo \0 | format | while read LN; do   
  echo $LN | grep "^AVAIL" > /dev/null 2>&1
  rval=$?
  if [ $rval -eq 0 ]; then
    fnd=0
  else
    if [ "X${fnd}" = "X0" ]; then
      echo $LN | grep "^Specify" > /dev/null 2>&1
      rval=$?
      if [ ! $rval -eq 0 ]; then
        echo $LN
      else 
        break
      fi
    fi
  fi
done

#mount points
df -k

Open in new window

0
akp007Author Commented:
Thanks for the timely help

Regards
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.