Operating System - Linux
1832860 Members
3013 Online
110048 Solutions
New Discussion

Re: How to check h/w config?

 
zhaogui
Super Advisor

How to check h/w config?

I am new to Linux, can anybody tell me how I can get the similar output as what ioscan or diskinfo in hpux can give me? For example, I want to how many disk drives and their capacities, how much is the memory size, what commands can I run?

Thanks,
10 REPLIES 10
I_M
Honored Contributor

Re: How to check h/w config?

Hi,

Linux doesn't have ioscan.

Try dmesg to see what device are attached to your system.

Try #cat /proc/scsi/scsi to see what scsi device are attached.

Try #fdisk -l /dev/sda or /dev/hda to see how many partitions are in the disk.

Try #free to see the memory usage and also swap usage (No swapinfo on Linux.)

Try #cat /proc/meminfo

Try #cat /proc/cpuinfo to see
what cpu your system is using.

Regards

Mikhail Sobolev
New Member

Re: How to check h/w config?

I would also suggest to check /proc/pci (and/or lspci utility). It may provide a bit of useful information as well.

Regards,

--
Misha
zhaogui
Super Advisor

Re: How to check h/w config?

Thank you for your response, I tried all commands and found out almost every thing except the disk capacity. Attached is what I got from running those commands.
But is my disk 2x36GB or 2x72GB in RAID5? What's the usable space?
MiQUET Pascal
Occasional Advisor

Re: How to check h/w config?

According to disk capacity try the df command.
You should get all informations on all disks available.
df -hl should give you HUMAN readable informations, for LOCAL disks.
HTH
zhaogui
Super Advisor

Re: How to check h/w config?

#df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 1011M 86M 874M 9% /
/dev/sda1 23M 7.8M 13M 36% /boot
/dev/sda7 1011M 472k 959M 1% /home
/dev/sda5 9.8G 62M 9.2G 1% /opt
/dev/sda10 1011M 36k 959M 1% /tmp
/dev/sda6 1.5G 956M 458M 68% /usr
/dev/sda12 509M 96k 483M 1% /usr/local
/dev/sda9 1011M 17M 943M 2% /var
You see, df will only tell you whatever have been partitioned and mounted, but how do I know how much has been left and unpartitioned, what are the physical sizes of all disk drives? Are there 4x18GB disks or 2x36GB?

Mike Brown_3
Frequent Advisor

Re: How to check h/w config?

I always refer back to this link. The perl script mentioned by Santosh is particularly natty.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x1f92abe92dabd5118ff10090279cd0f9,00.html
There's no substitute for experience
Mark Fenton
Esteemed Contributor

Re: How to check h/w config?

Mike, thanks for the post -- I LIKE this script!

(zhaqui N/A for me, please, but Mike's post deserves a 10!)
zhaogui
Super Advisor

Re: How to check h/w config?

I will definitely give you points if your answer can solve my problem.
Here is the output after running hinv.pl version1.4 which I downloaded from the URL you mentioned in the link.
Can you tell me how many physical disk drives in my Linux server?

#perl hinv.pl
printf (...) interpreted as function at hinv.pl line 384.
printf (...) interpreted as function at hinv.pl line 393.
printf (...) interpreted as function at hinv.pl line 402.
Main memory size: 905 Mbytes
2 GenuineIntel Pentium III (Coppermine) processors
2 16550A serial ports
1 National Semiconductor PC87306 floppy controller
1 1.44M floppy drive
1 vga+ graphics device
1 keyboard
1 IDE device:
/dev/hda: ATAPI 48X CD-ROM drive, 120kB Cache
PCI bus devices:
Host bridge: ServerWorks CNB20LE (rev 6).
Host bridge: ServerWorks CNB20LE (#2) (rev 6).
Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (rev 8).
Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (#2) (rev 8).
VGA compatible controller: ATI Technologies Inc 3D Rage IIC (rev 122).
ISA bridge: ServerWorks OSB4 (rev 80).
IDE interface: PCI device 1166:0211 (ServerWorks) (rev 0).
RAID bus controller: PCI device 101e:1960 (American Megatrends Inc.) (rev 32).
SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c1010 Ultra3 SCSI Adapter (rev 1).
SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c1010 Ultra3 SCSI Adapter (#2) (rev 1).
Mark Fenton
Esteemed Contributor

Re: How to check h/w config?

OK, I'll 'fess, in YOUR case, it doesn't. It would be an honorable mention, thoough.

From your output here and the earlier post, it's clear that you need a tool like HP-UX's hparraycfg or some such. The output indicates that you've got one LUN of ~ 54GB set up on your RAID controller. But where did the rest of the (probably) 72GB go? So, absent hparraycfg, what tools are available to you to examine your raid and set up LUNS, etc?

In RH Linux (probably starting with 7.0 and beyond) there is lsraid, which can print information about linux multidisk devices. Man lsraid for info. I haven't got a Linux box with a RAID to test on, so will bow out now...

Hth
zhaogui
Super Advisor

Re: How to check h/w config?

I visited the remote site and found there are 4x18GB disks which means the total capacity is 72GB. According to the rule of thumb for RAID5, the usable space is 0.75*72GB=54GB, so it is coincident with the figure shown in dmesg.
You are right, it is probably because of RAID that all these tools can't tell exactly the physical disk information. I don't know if there is such thing as Israid or hparraycfg on Linux. But anyway you deserve honorable mention and thank you once again for your comments,time and efforts.
A lot of thanks.