查看linux硬件信息大全

1, 主板信息

.查看主板的序列号

--------------------------------------------------

#使用命令

dmidecode|grep-i'serialnumber'

#查看板卡信息

cat/proc/pci

--------------------------------------------------

2,cpu信息

--------------------------------------------------

#通过/proc文件系统

1)cat/proc/cpuinfo

#通过查看开机信息

2)dmesg|grep-i'cpu'

#

3)dmidecode-tprocessor

一、CPU大小

[root@idc~]#cat/proc/cpuinfo|grep"modelname"&&cat/proc/cpuinfo|grep"physicalid"

modelname:Intel(R)Xeon(TM)CPU2.80GHz

modelname:Intel(R)Xeon(TM)CPU2.80GHz

modelname:Intel(R)Xeon(TM)CPU2.80GHz

modelname:Intel(R)Xeon(TM)CPU2.80GHz

physicalid:0

physicalid:0

physicalid:3

physicalid:3

[root@idc~]#

说明:Linux下可以在/proc/cpuinfo中看到每个cpu的详细信息。但是对于双核的cpu,在cpuinfo中会看到两个cpu。常常会让人误以为是两个单核的cpu。

其实应该通过PhysicalProcessorID来区分单核和双核。而PhysicalProcessorID可以从cpuinfo或者dmesg中找到.

flags如果有ht说明支持超线程技术

判断物理CPU的个数可以查看physicalid的值,相同则为同一个物理CPU

可以看到上面,这台机器有两个双核的CPU,ID分别是0和3,大小是2.8G。

二、内存大小

[root@xbidc~]#cat/proc/meminfo|grepMemTotal

MemTotal:1034612kB

[root@xbidc~]#

三、硬盘大小

[root@xbidc~]#fdisk-l|grepDisk

Disk /dev/sda: 300.0 GB, 300000000000 bytes

--------------------------------------------------

3,硬盘信息

--------------------------------------------------

#查看分区情况

fdisk-l

#查看大小情况

df-h

#查看使用情况

du-h

#

hdparm-I/dev/sda

#

dmesg|grepsda

--------------------------------------------------

4,内存信息

--------------------------------------------------

1)cat/proc/meminfo

2)dmesg|grepmem

3)free-m

4)vmstat

5)dmidecode|grep-imem

--------------------------------------------------

5,网卡信息

--------------------------------------------------

1)dmesg|grep-i'eth'

2)cat/etc/sysconfig/hwconf|grep-ieth

3)lspci|grep-i'eth'

--------------------------------------------------

6,鼠标键盘和USB信息

查看键盘和鼠标:cat/proc/bus/input/devices

查看USB设备:cat/proc/bus/usb/devices

查看各设备的中断请求(IRQ):cat/proc/interrupts

7,显卡信息

--------------------------------------------------

1)lspci|grep-i'VGA'

2)dmesg|grep-i'VGA'

--------------------------------------------------

8,声卡信息

--------------------------------------------------

1)lspci|grep-i'VGA'

2)dmesg|grep-i'VGA'

--------------------------------------------------

7,其他命令

.用硬件检测程序kuduz探测新硬件:servicekudzustart(orrestart)

.dmesg(查看所有启动时检测到的硬件信息)

.lspci(显示外设信息,如usb,网卡等信息)

.cat/etc/sysconfig/hwconf

.mpstat

8,需要手动安装的工具

lshw,hwinfo,hal-device-manager

9,Solaris如何检测硬件参数

俺从别处发现了些有意思的东西:

Solaris的硬件相关命令

发表:2004-3-811:20:36出处:你的博客网(yourblog.org)

--------------------------------------------------------------------------------

1).查看当前处理器的类型和速度(主频)

#psrinfo–v

Statusofprocessor1asof:11/24/0110:34:41

Processorhasbeenon-linesince11/24/0110:18:20.

Thesparcv9processoroperatesat432MHz,

andhasasparcv9floatingpointprocessor.

Statusofprocessor3asof:11/24/0110:34:41

Processorhasbeenon-linesince11/24/0110:18:22.

Thesparcv9processoroperatesat432MHz,

andhasasparcv9floatingpointprocessor.

2).打印当前的OBP版本号

#prtconf–V

OBP3.20.02000/10/2410:47

#/usr/platform/sun4u/sbin/prtdiag–v|grepOBP

OBP3.20.02000/10/2410:47POST6.1.02000/10/2410:49

ok..version

Release3.20Version0created2000/10/2410:47

OBP3.20.02000/10/2410:47

POST6.1.02000/10/2410:49

OBDIAG4.5.12000/10/2410:48

3).查看硬盘物理信息(vendor,RPM,Capacity)

#iostat–E

sd0SoftErrors:0HardErrors:0TransportErrors:0

Vendor:SEAGATEProduct:ST34371WSUN4.2GRevision:7462SerialNo:

JDX394220KWEBC

Size:4.29GB;

MediaError:0DeviceNotReady:0NoDevice:0Recoverable:0

IllegalRequest:0PredictiveFailureAnalysis:0

sd2SoftErrors:0HardErrors:0TransportErrors:0

Vendor:FUJITSUProduct:MAJ3364MSUN36GRevision:0804SerialNo:01M18144

Size:36.42GB;

MediaError:0DeviceNotReady:0NoDevice:0Recoverable:0

IllegalRequest:0PredictiveFailureAnalysis:0

sd3SoftErrors:0HardErrors:0TransportErrors:0

Vendor:FUJITSUProduct:MAJ3364MSUN36GRevision:0804SerialNo:01M16199

Size:36.42GB;

MediaError:0DeviceNotReady:0NoDevice:0Recoverable:0

IllegalRequest:0PredictiveFailureAnalysis:0

sd21SoftErrors:0HardErrors:0TransportErrors:0

Vendor:TOSHIBAProduct:DVD-ROMSD-M1401Revision:1007SerialNo:06/22/00

Size:18446744073.71GB;

MediaError:0DeviceNotReady:0NoDevice:0Recoverable:0

IllegalRequest:0PredictiveFailureAnalysis:0

4).查看磁盘的几何参数和分区信息

#prtvtoc/dev/rdsk/c0t0d0s0

*/dev/rdsk/c0t0d0s0partitionmap

*

*Dimensions:

*512bytes/sector

*135sectors/track

*16tracks/cylinder

*2160sectors/cylinder

*3882cylinders

*3880accessiblecylinders

*

*Flags:

*1:unmountable

*10:read-only

*

*Unallocatedspace:

*FirstSectorLast

*SectorCountSector

*82771201036808380799

*

*FirstSectorLast

*PartitionTagFlagsSectorCountSectorMountDirectory

0200020498402049839/

130120498406156002665439

2500083808008380799

5000266544024580805123519/opt

6400512352030736808197199/usr

78008197200799208277119/export/home

5).显示已经使用和未使用的i-node数目

#df–Fufs–oi

Filesystemiusedifree%iusedMountedon

/dev/dsk/c0t0d0s078594798212%/

/dev/dsk/c0t0d0s63776333951710%/usr

/dev/dsk/c0t0d0s57223011020%/opt

/dev/dsk/c0t0d0s74243800%/export/home

6).显示cpu使用率最高的进程

#ps–eopid,pcpu,args|sort+1n

该命令输出当前系统进程的pid,CPU占用率及命令描述,并以pcpu来排序

7).显示内存占用率最高的进程

#ps–eopid,vsz,args|sort+1n

该命令输出当前系统进程的pid,内存占用率及命令描述,并以vsz来排序

8).查看及启动系统的32位或64位内核模式

64位模式

#isalist–v

sparcv9+vissparcv9sparcv8plus+vissparcv8plussparcv8sparcv8-fsmuldsparcv7

sparc

#isainfo–v

64-bitsparcv9applications

32-bitsparcapplications

#isainfo–b

64

启动64位内核模式

ok.bootkernel/sparcv9/unix

32位模式

#isalist–v

sparcv8plus+vissparcv8plussparcv8sparcv8-fsmuldsparcv7sparc

#isainfo–v

32-bitsparcapplications

#isainfo–b

32

启动32位模式

ok.bootkernel/unix

9).查看当前的OpenWindows版本

#showrev–w

OpenWindowsversion:

X11Version6.4.15November2001

10).查看当前CDE的版本

#/usr/ccs/bin/what/usr/dt/bin/dtmail

/usr/dt/bin/dtmail:

CDEVersion1.4.6_06

CDEVersion1.4.6_06

11).测定当前的显示器刷新频率

/usr/sbin/ffbconfig–rev\?

Validvaluesfor-resoptionare:

1024x768x60[1]

1024x768x70[1]

1024x768x75[1][2]

1024x768x77

1024x800x84

1152x900x66

1152x900x76

1280x800x76[1][2]

1280x1024x60[1][2]

1280x1024x67

1280x1024x76

1280x1024x85[1][2]

960x680x112s

960x680x108s

640x480x60[1][2]

640x480x60i[1]

768x575x50i[1]

1440x900x76[1][2]

1600x1000x66[1][2]

1600x1000x76[1][2]

1600x1280x76[1][2]

1920x1080x72[1][2]

1920x1080x76[1][2]

1920x1200x70[1][2]

1920x1200x75[1][2]

svga[1]

1152

1280

stereo

vga[1][2]

ntsc[1]

pal[1]

none

Notes:

[1]monitordoesnotsupportthisresolution.

[2]thisversionofFFB(FFB1)doesnotsupportthisresolution

12).查看系统配置

#/usr/platform/sun4u/sbin/prtdiag–v

SystemConfiguration:SunMicrosystemssun4uSunEnterprise450(2X

UltraSPAR

C-II432MHz)

Systemclockfrequency:86MHz

Memorysize:1024Megabytes

=========================CPUs=========================

RunEcacheCPUCPU

BrdCPUModuleMHzMBImpl.Mask

--More--

----------------------------------

SYS114324.0US-II10.0

SYS334324.0US-II10.0

=========================Memory=========================

Interlv.SocketSize

BankGroupName(MB)Status

-------------------------

0none1901256OK

0none1902256OK

0none1903256OK

0none1904256OK

0none1701256OK

0none1702256OK

=========================IOCards=========================

NofailuresfoundinSystem

===========================

=========================EnvironmentalStatus=========================

SystemTemperatures(Celsius):

------------------------------

AMBIENT20

CPU140

CPU340

=================================

FrontStatusPanel:

-------------------

KeyswitchpositionisinOnmode.

SystemLEDStatus:POWERGENERALERRORACTIVITY

[ON][OFF][ON]

DISKERRORTHERMALERRORPOWERSUPPLYERROR

[OFF][OFF][OFF]

DiskLEDStatus:OK=GREENERROR=YELLOW

DISK2:[OK]DISK3:[OK]

DISK0:[OK]DISK1:[EMPTY]

=================================

Fans:

-----

FanBankSpeedStatus

-------------------

CPU49OK

PWR31OK

PowerSupplies:

---------------

SupplyRatingTempStatus

----------------------

0550W33OK

1550W33OK

=========================HWRevisions=========================

ASICRevisions:

---------------

STP2223BGA:Rev4

STP2223BGA:Rev4

STP2223BGA:Rev4

STP2003QFP:Rev1

STP2205BGA:Rev1

SystemPROMrevisions:

----------------------

OBP3.20.02000/10/2410:47POST6.1.02000/10/2410:49

#sysdef

*

*Hostid

*

80fee99b

*

*sun4uConfiguration

*

*

*Devices

*

packages(drivernotattached)

terminal-emulator(drivernotattached)

deblocker(drivernotattached)

obp-tftp(drivernotattached)

disk-label(drivernotattached)

SUNW,builtin-drivers(drivernotattached)

sun-keyboard(drivernotattached)

ufs-file-system(drivernotattached)

chosen(drivernotattached)

openprom(drivernotattached)

client-services(drivernotattached)

options,instance#0

aliases(drivernotattached)

memory(drivernotattached)

virtual-memory(drivernotattached)

associations(drivernotattached)

slot2disk(drivernotattached)

slot2led(drivernotattached)

slot2dev(drivernotattached)

pci,instance#0

ebus,instance#0

auxio(drivernotattached)

……

#prtconf–D

SystemConfiguration:SunMicrosystemssun4u

Memorysize:1024Megabytes

SystemPeripherals(SoftwareNodes):

SUNW,Ultra-4

packages

terminal-emulator

deblocker

obp-tftp

disk-label

SUNW,builtin-drivers

sun-keyboard

ufs-file-system

chosen

openprom

client-services

options,instance#0(drivername:options)

aliases

memory

virtual-memory

associations

slot2disk

slot2led

slot2dev

pci,instance#0(drivername:pcipsy)

ebus,instance#0(drivername:ebus)

auxio

power(drivername:power)

SUNW,pll

sc

se,instance#0(drivername:se)

su,instance#0(drivername:su)

…..

13).查看当前系统中已经应用的补丁

#showrev–p

Patch:109618-01Obsoletes:Requires:Incompatibles:Packages:SUNWeuxwe,

SUN

Weuezt,SUNWeudlg,SUNWeudda

Patch:109889-01Obsoletes:109353-04Requires:Incompatibles:Packages:

SUNWk

vmx,SUNWkvm,SUNWmdb,SUNWhea,SUNWpstl,SUNWpstlx

Patch:110369-05Obsoletes:110709-02Requires:Incompatibles:Packages:

SUNWk

vmx,SUNWcarx,SUNWcsr

Patch:110370-03Obsoletes:111643-01Requires:Incompatibles:Packages:

SUNWk

vmx,SUNWkvm,SUNWmdb,SUNWhea,SUNWpstl,SUNWpstlx

Patch:110373-04Obsoletes:111508-01Requires:Incompatibles:Packages:

SUNWk

vmx,SUNWcarx,SUNWcsr

Patch:110374-08Obsoletes:110136-02,110516-02Requires:Incompatibles:

Pack

ages:SUNWkvmx,SUNWcarx,SUNWcar,SUNWcsr,SUNWmdbx

…..

14).显示当前的运行级别

#who–rH

NAMELINETIMEIDLEPIDCOMMENTS

.run-level3Nov2410:1830S

15).查找一个文件所从属的包

#pkgchk–lp/usr/lib/sendmail

Pathname:/usr/lib/sendmail

Type:regularfile

Expectedmode:4555

Expectedowner:root

Expectedgroup:bin

Expectedfilesize(bytes):761368

Expectedsum(1)ofcontents:41707

Expectedlastmodification:Sep2403:13:132001

Referencedbythefollowingpackages:

SUNWsndmu

Currentstatus:installed

16).查看当前的bind版本信息

#nslookup–class=chaos–q=txtversion.bind

Server:ns.lnpta.net.cn

Address:202.96.64.68

相关推荐