LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 10-08-2006, 06:37 AM   #1
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Rep: Reputation: 16
Question Hardware Info in Solaris


Hi Guys

In linux you can see memoryinfo from /proc/meminfo,Cpu info from /proc/cpuinfo.Harddisk info from fdisk -l.But in solaris how can i get these information.

Regard
Talat
 
Old 10-08-2006, 07:10 AM   #2
unixnerd
LQ Newbie
 
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
The command prtdiag will give you all the hardware information in Solaris
 
Old 10-08-2006, 08:02 AM   #3
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Thanks for the reply unixnerd

But this cmd does not show how many harddrives i have and of what size.How can i see that

Regard
Talat
 
Old 10-08-2006, 08:41 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
If you are running Solaris on x86 H/W, that script will give you their disk size:
Code:
#!/bin/ksh
for disk in /dev/rdsk/*p0
do
  fdisk -G $disk | tail -1 | nawk '{
    disk="'$disk'"
    ncyl=$2
    nhead=$5
    nsect=$6
    secsz=$7
    sectors=ncyl*nhead*nsect;
    bytes=sectors/(1024/secsz);
    printf("%7d MB %s %11d sectors\n",
      bytes/1024, disk, sectors);
  }'
done 2>/dev/null
and that one their partition table:
Code:
#!/bin/ksh
for disk in /dev/rdsk/*p0
do
  fdisk -v -W - $disk
done 2>/dev/null | grep -v :
 
Old 10-08-2006, 08:51 AM   #5
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Hi jlliagre

I have a Sun Sparc architecture machine.Does sun have any command simillar to fdisk -l to get disk info,

Regard
Talat
 
Old 10-08-2006, 10:09 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Outside USB mounted ones, SPARC disks have no partition table.
Here a slightly modified script to get their disk sizes:
Code:
#!/bin/ksh
for disk in /dev/rdsk/*s2
do
  fdisk -g $disk | tail -1 | nawk '{
    disk="'$disk'"
    ncyl=$2
    nhead=$5
    nsect=$6
    secsz=$7
    sectors=ncyl*nhead*nsect;
    bytes=sectors/(1024/secsz);
    printf("%7d MB %s %11d sectors\n",
      bytes/1024, disk, sectors);
  }'
done 2>/dev/null
On SPARC, "iostat -E" will give you this information too (and the model).
 
Old 10-14-2006, 07:54 PM   #7
mdhmi
Member
 
Registered: Dec 2005
Location: Detroit, Michigan
Distribution: Ubuntu
Posts: 86

Rep: Reputation: 15
For Hardware Info:

/usr/platforum/$(uname -m)/sbin/prtdiag -v

For Disks:

Either /usr/sbin/format or /usr/bin/iostat -En
 
  


Reply

Tags
solaris


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware Info cccc Linux - Hardware 2 09-01-2006 06:44 PM
hardware info lil_becky Debian 4 01-23-2005 06:16 AM
hardware info zibo *BSD 2 11-21-2004 08:52 PM
where to get the hardware info cbalaji Linux - Hardware 1 02-24-2004 09:11 PM
Some useful info on jumpstart and NFS mount of solaris CD's neo77777 Solaris / OpenSolaris 1 09-10-2003 05:13 PM


All times are GMT -5. The time now is 11:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration