现在的位置: 首页 > 综合 > 正文

linux 查看硬件命令

2017年12月20日 ⁄ 综合 ⁄ 共 4732字 ⁄ 字号 评论关闭

1, 主板信息
.查看主板的序列号
--------------------------------------------------
#使用命令



dmidecode | grep -i 'serial number'
#查看板卡信息
cat /proc/pci
--------------------------------------------------
2, cpu信息
--------------------------------------------------
#通过/proc文件系统



1) cat /proc/cpuinfo
#通过查看开机信息
2) dmesg | grep -i 'cpu'
#
3)dmidecode -t processor
--------------------------------------------------
3, 硬盘信息
--------------------------------------------------
#查看分区情况
fdisk -l
#查看大小情况
df -h
#查看使用情况
du -h
#
hdparm -I /dev/sda
#
dmesg | grep sda
--------------------------------------------------
4, 内存信息
--------------------------------------------------
1) cat /proc/meminfo
2) dmesg | grep mem
3) free -m
4) vmstat
5) dmidecode | grep -i mem
--------------------------------------------------
5, 网卡信息
--------------------------------------------------
1) dmesg | grep -i 'eth'
2) cat /etc/sysconfig/hwconf | grep -i eth
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探测新硬件:service kudzu start ( or restart)
.dmesg (查看所有启动时检测到的硬件信息)
.lspci (显示外设信息, 如usb,网卡等信息)
.cat /etc/sysconfig/hwconf
.mpstat
8, 需要手动安装的工具



lshw,hwinfo,hal-device-manager
9, Solaris如何检测硬件参数
俺从别处发现了些有意思的东西:
Solaris的硬件相关命令
发表:2004-3-8 11:20:36 出处:你的博客网(yourblog.org)
--------------------------------------------------------------------------------
1).查看当前处理器的类型和速度(主频)
# psrinfo –v
Status of processor 1 as of: 11/24/01 10:34:41
Processor has been on-line since 11/24/01 10:18:20.
The sparcv9 processor operates at 432 MHz,
       and has a sparcv9 floating point processor.
Status of processor 3 as of: 11/24/01 10:34:41
Processor has been on-line since 11/24/01 10:18:22.
The sparcv9 processor operates at 432 MHz,
       and has a sparcv9 floating point processor.
2).打印当前的OBP版本号
# prtconf –V
OBP 3.20.0 2000/10/24 10:47
# /usr/platform/sun4u/sbin/prtdiag –v | grep OBP
OBP 3.20.0 2000/10/24 10:47 POST 6.1.0 2000/10/24 10:49
ok. .version
Release 3.20 Version 0 created 2000/10/24 10:47
OBP 3.20.0 2000/10/24 10:47
POST 6.1.0 2000/10/24 10:49
OBDIAG 4.5.1 2000/10/24 10:48
3).查看硬盘物理信息(vendor, RPM, Capacity)
# iostat –E
sd0    Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE Product: ST34371W SUN4.2G Revision: 7462 Serial No:
JDX394220KW EBC
Size: 4.29GB ;
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd2    Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU Product: MAJ3364M SUN36G Revision: 0804 Serial No: 01M18144
Size: 36.42GB ;
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd3    Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU Product: MAJ3364M SUN36G Revision: 0804 Serial No: 01M16199
Size: 36.42GB ;
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd21     Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: TOSHIBA Product: DVD-ROM SD-M1401 Revision: 1007 Serial No: 06/22/00
Size: 18446744073.71GB ;
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
4).查看磁盘的几何参数和分区信息
# prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*     135 sectors/track
*    16 tracks/cylinder
* 2160 sectors/cylinder
* 3882 cylinders
* 3880 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
*    First     Sector Last
*    Sector     Count Sector
*     8277120 103680 8380799
*
*                          First     Sector Last
* Partition Tag Flags     Sector     Count Sector Mount Directory
   0    2 00       0 2049840 2049839 /
   1    3 01 2049840 615600 2665439
   2    5 00       0 8380800 8380799
   5    0 00 2665440 2458080 5123519 /opt
   6    4 00 5123520 3073680 8197199 /usr
7    8 00 8197200     79920 8277119 /export/home
5).显示已经使用和未使用的i-node数目
# df –F ufs –o i
Filesystem          iused ifree %iused Mounted on
/dev/dsk/c0t0d0s0    7859 479821     2% /
/dev/dsk/c0t0d0s6    37763 339517 10% /usr
/dev/dsk/c0t0d0s5        722 301102     0% /opt
/dev/dsk/c0t0d0s7       4 24380     0% /export/home
6).显示cpu使用率最高的进程
# ps –eo pid,pcpu,args | sort +1n
该命令输出当前系统进程的pid, CPU占用率及命令描述,并以pcpu来排序
7).显示内存占用率最高的进程
# ps –eo pid,vsz,args | sort +1n
该命令输出当前系统进程的pid,内存占用率及命令描述,并以vsz来排序
8).查看及启动系统的32位或64位内核


模式
64位模式
# isalist –v
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7
sparc
# isainfo –v
64-bit sparcv9 applications
32-bit sparc applications
# isainfo –b
64
启动64位内核模式
ok. boot kernel/sparcv9/unix
32位模式
# isalist –v
sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
# isainfo –v
32-bit sparc applications
# isainfo –b
32
启动32位模式
ok. boot kernel/unix
9).查看当前的OpenWindows版本
# showrev –w
OpenWindows version:
X11 Version 6.4.1 5 November 2001
10).查看当前CDE的版本
# /usr/ccs/bin/what /usr/dt/bin/dtmail
/usr/dt/bin/dtmail:
       CDE Version 1.4.6_06
       CDEVersion1.4.6_06

【上篇】
【下篇】

抱歉!评论已关闭.