linux檢視各種硬體資訊的方法
1.顯示卡資訊
dmesg | grep -i vga
lspci | grep -i vga //檢視顯示卡資訊
2.dmidecode | grep -i 'serrial number' //檢視主機板資訊,檢視主機板的序列號
3.CPU資訊
#通過/proc檔案系統
cat /proc/cpuinfo
dmesg | grep -i cpu
#通過檢視開機資訊
dmidecode -t processor
4.硬碟資訊
fdisk -l //分割槽情況
df -h //大小情況
du -h //使用情況
dmesg | grep sda
5.記憶體資訊
cat /proc/meminfo
dmesg | grep mem
free -m
vmstat
dmldecode | grep -i mem
6.網絡卡資訊
dmesg | grep -i eth
lspci | grep -i eth
7.滑鼠鍵盤和USB資訊
cat /proc/bus/input/devices 檢視鍵盤和滑鼠
cat /proc/bus/usb/devices 檢視USB裝置
cat /proc/interrupts
8.音效卡資訊
lspci | grep -i vga
dmesg | grep -i vga
9.其他命令
lspci (顯示外裝置資訊,如USB,網絡卡等資訊)
續:
檢視主機板的序列號: dmidecode | grep -i ’serial number’
用硬體檢測程式kuduz探測新硬體:service kudzu start ( or restart)
檢視CPU資訊:cat /proc/cpuinfo [dmesg | grep -i 'cpu'][dmidecode -t processor]
檢視記憶體資訊:cat /proc/meminfo [free -m][vmstat]
查看板卡資訊:cat /proc/pci
檢視顯示卡/音效卡資訊:lspci |grep -i ‘VGA’[dmesg | grep -i 'VGA']
檢視網絡卡資訊:dmesg | grep -i ‘eth’[cat /etc/sysconfig/hwconf | grep -i eth][lspci | grep -i 'eth']
<!--more-->
檢視PCI資訊:lspci (相比cat /proc/pci更直觀)
檢視USB裝置:cat /proc/bus/usb/devices
檢視鍵盤和滑鼠:cat /proc/bus/input/devices
檢視系統硬碟資訊和使用情況:fdisk & disk – l & df
檢視各裝置的中斷請求(IRQ):cat /proc/interrupts
檢視系統體系結構:uname -a
檢視及啟動系統的32位或64位核心模式:isalist –v [isainfo –v][isainfo –b]
dmidecode檢視硬體資訊,包括bios、cpu、記憶體等資訊
測定當前的顯示器重新整理頻率:/usr/sbin/ffbconfig –rev \?
檢視系統配置:/usr/platform/sun4u/sbin/prtdiag –v
檢視當前系統中已經應用的補丁:showrev –p
顯示當前的執行級別:who –rH
檢視當前的bind版本資訊:nslookup –class=chaos –q=txt version.bind
dmesg | more 檢視硬體資訊
lspci 顯示外設資訊, 如usb,網絡卡等資訊
lsnod 檢視已載入的驅動
lshw
psrinfo -v 檢視當前處理器的型別和速度(主頻)
prtconf -v 列印當前的OBP版本號
iostat –E 檢視硬碟物理資訊(vendor, RPM, Capacity)
prtvtoc /dev/rdsk/c0t0d0s 檢視磁碟的幾何引數和分割槽資訊
df –F ufs –o i 顯示已經使用和未使用的i-node數目
isalist –v
對於“/proc”中檔案可使用檔案檢視命令瀏覽其內容,檔案中包含系統特定資訊:
Cpuinfo 主機CPU資訊
Dma 主機DMA通道資訊
Filesystems 檔案系統資訊
Interrupts 主機中斷資訊
Ioprots 主機I/O埠號資訊
Meninfo 主機記憶體資訊
Version
Linux記憶體版本資訊
備註: proc – process information pseudo-filesystem 程序資訊偽裝檔案系統
檢視音效卡資訊的方法:
檢視核心alsa版本(需要與alsa-utils版本一致) cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.16. Compiled on Dec 2 2008 for kernel 2.6.24-23-generic (SMP). 音效卡資訊 ~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958] Subdevices: 1/1 Subdevice #0: subdevice #0 硬體資訊 之 音效卡(lshw指list hardware,是一個軟體) ~$ sudo lshw -C sound *-multimedia UNCLAIMED description: Multimedia audio controller product: 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller vendor: Intel Corporation physical id: 1f.5 bus info: pci@0000:00:1f.5 version: 03 width: 32 bits clock: 33MHz capabilities: pm bus_master cap_list configuration: latency=0 系統模組狀態 之 聲音 ~$ lsmod | grep -i snd snd_pcm_oss 46496 0 snd_mixer_oss 22784 1 snd_pcm_oss snd_pcm 83844 1 snd_pcm_oss snd_seq_dummy 11012 0 snd_seq_oss 39936 0 snd_seq_midi 14368 0 snd_rawmidi 29728 1 snd_seq_midi snd_seq_midi_event 15232 2 snd_seq_oss,snd_seq_midi snd_seq 58352 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event snd_timer 29448 2 snd_pcm,snd_seq snd_seq_device 15500 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq snd 64164 9 snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device soundcore 15328 1 snd snd_page_alloc 16776 1 snd_pcm # below is the module listing with working sound in kernel 2.6.24-21 :~$ cat sndmodules snd_intel8x0 35868 3 snd_ac97_codec 102176 1 snd_intel8x0 ac97_bus 3200 1 snd_ac97_codec snd_pcm_oss 42528 0 snd_mixer_oss 18048 1 snd_pcm_oss snd_pcm 79748 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss snd_seq_dummy 4996 0 snd_seq_oss 35456 0 snd_seq_midi 9504 0 snd_rawmidi 25888 1 snd_seq_midi snd_seq_midi_event 8576 2 snd_seq_oss,snd_seq_midi snd_seq 54096 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event snd_timer 24964 2 snd_pcm,snd_seq snd_seq_device 9612 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq snd 59812 17 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device soundcore 8800 1 snd snd_page_alloc 12552 2 snd_intel8x0,snd_pcm #I have a disabled volume control applet on the panel (red cross) # attempting to use it give the following message The volume control did not find any elements and/or devices to control. This means either that you don't have the right GStreamer plugins installed, or that you don't have a sound card configured.