Operating System - Linux
1824149 Members
4484 Online
109668 Solutions
New Discussion юеВ

Check the hardware information

 
eric_204
Frequent Advisor

Check the hardware information

except reboot the RH7 system , how can I know the hardware information
1. the no. of harddisk ( how many pcs ) and what is the size of each harddisk ?
2. what is the Lan card speed , 10 / 100 or 1000 ?

Thx
6 REPLIES 6
Martin P.J. Zinser
Honored Contributor

Re: Check the hardware information

dmesg ;-)
Stuart Browne
Honored Contributor

Re: Check the hardware information

This information is very easy to find, especially in a RH system.

First off, some things to look at:

The boot messages are stored (after boot) in the file '/var/log/dmesg'. This is the output of the 'dmesg' command done by 'rc.sysinit' before switching to it's pre-defined init level.

Looking at the above file, you should be able to simply 'grep "^[sh]d[a-z]" /var/log/dmesg' to find the hard-disk drives (SCSI or IDE). If the output of the above doesn't show the various drive sizes, you can use 'sfdisk -s /dev/hda' (for example) to show the size (This will show the number of 1KB blocks).

As for network speed, this is a little more difficult, depending on what card you have. If you're lucky, the command 'mii-tool' will do all you need.
One long-haired git at your service...
Mark Grant
Honored Contributor

Re: Check the hardware information

eric,

Also, never underestimate the treasure to be found by using "cat" and the stuff in the /proc filesystem.
Never preceed any demonstration with anything more predictive than "watch this"
Claudio Cilloni
Honored Contributor

Re: Check the hardware information

Speaking about lan cards, In my RH73 system (kernel 2.4.19) I have this file:

/proc/net/PRO_LAN_Adapters/eth0.info

that contains a lot of informations about my lan card, including the speed.

Ciao
Claudio
Sergejs Svitnevs
Honored Contributor

Re: Check the hardware information

> no. of harddisks
use "dmesg |grep hd"

> the Lan card speed
Use "mii-tool" utility for determining if you are connected to the Ethernet, and if so, at what speed.

Regards,
Sergejs





Amit Dixit_2
Regular Advisor

Re: Check the hardware information

Hi,
Maybe my solution is bit weared but
we can also use
#fdisk -l
Which not only display all the hard disk
but also thei partition information..

Please correct me if i am wrong.

Thanks,
Amit