2011
Nov
02
檢查系統 PCI 介面的各項裝置
lspci -v
Example
- [puritys]home$ lspci -v
- 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
- Flags: fast devsel
- 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
- Flags: bus master, medium devsel, latency 0
檢查系統USB介面的裝置
lsusb
Example
- [puritys]home$ lsusb
- Bus 001 Device 012: ID 80ee:0021 VirtualBox USB Tablet
- Bus 001 Device 001: ID 0000:0000
顯示CPU的資訊
cat /proc/cpuinfo
赫然發現在 Amazon 租最爛的主機,CPU還比我的電腦好 XD....
Example
- [puritys]home$ cat /proc/cpuinfo
- processor : 0
- vendor_id : GenuineIntel
- cpu family : 6
- model : 15
- model name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
- stepping : 11
- cpu MHz : 2402.021
- cache size : 6144 KB
- fdiv_bug : no
- hlt_bug : no
- f00f_bug : no
- coma_bug : no
- fpu : yes
- fpu_exception : yes
- cpuid level : 5
- wp : yes
- flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 constant_tsc pni monitor
顯示記憶體的相關資訊
free
Example
- [puritys]home$ free
- total used free shared buffers cached
- Mem: 255792 241656 14136 0 49104 105744
- -/+ buffers/cache: 86808 168984
- Swap: 622584 192 622392
查看硬體的相關資訊
sudo dmidecode
Example
- [puritys]home$ sudo dmidecode
- # dmidecode 2.9
- SMBIOS 2.5 present.
- 5 structures occupying 352 bytes.
- Table at 0x000E1000.
- Handle 0x0000, DMI type 0, 20 bytes
- BIOS Information
- Vendor: innotek GmbH
- Version: VirtualBox
- Release Date: 12/01/2006
- Address: 0xE0000
- Runtime Size: 128 kB
- ROM Size: 128 kB
- Characteristics:
查看 Kernel 版本
cat /etc/issue
Example
- [puritys]home$ cat /etc/issue
- CentOS release 4.9 (Final)
- Kernel r on an m
- NOTICE: Support for CentOS 4 ends on Feb 29th, 2012
查看 OS 版本
cat /proc/version
more /proc/version
Example
- [puritys]home$ more /proc/version
- Linux version x.x.x-xx (mockbuild@builderxx.centos.org) (gcc version 3.4.6 20060404 (Red Hat x.x.x-1
- 1)) #1 Thu Jul 21 17:12:08 EDT 2011
- [puritys]home$ uname -a
- Linux www.yahoo.com.tw x.x.x-xxx #1 Thu Jul 21 17:12:08 EDT 2011 i686 i686 i386 GNU/Linux
查看硬碟的各項資訊
sudo hdparm -i /dev/hda
Example
- [puritys]home$ sudo hdparm -i /dev/hda
- /dev/hda:
- Model=VBOX HARDDISK, FwRev=1.0, SerialNo=VBb9b3eddb-80cc9845
- Config={ Fixed }
- RawCHS=16383/16/63, TrkSize=0, SectSize=512, ECCbytes=0
- BuffType=DualPortCache, BuffSize=256kB, MaxMultSect=128, MultSect=128
- CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=31457280
- IORDY=yes, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
- PIO modes: pio0 pio3 pio4
- DMA modes: mdma0 mdma1 mdma2
- UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5 udma6
- AdvancedPM=no WriteCache=enabled
- Drive conforms to: unknown:
- * signifies the current active mode
查看硬碟詳細資訊及型號
Example
- [puritys]home$ df
- Filesystem 1K-區段 已用 可用 已用% 掛載點
- /dev/mapper/VolGroup00-LogVol00
- xxxxxxxx xxxxxxx xxxxxxx x7% /
- /dev/hda1 101086 12574 83293 14% /boot
- none 127896 0 127896 0% /dev/shm
- [puritys]home$ sudo smartctl -a /dev/hda1
- smartctl version 5.33 [i686-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
- Home page is http://smartmontools.sourceforge.net/
- === START OF INFORMATION SECTION ===
- Device Model: VBOX HARDDISK
- Serial Number: Vxxxxxx-80ccxx45
- .
- .
- .
Linux Kernel 運作過程當中所顯示的各項訊息記錄
sudo dmesg
Example
- [puritys]home$ sudo dmesg | more
- Linux version 2.6.9-101.EL (mockbuild@builder10.centos.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-1
- 1)) #1 Thu Jul 21 17:12:08 EDT 2011
- BIOS-provided physical RAM map:
- BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
- BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
- BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
- BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)
- BIOS-e820: 000000000fff0000 - 0000000010000000 (ACPI data)
- BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
- .
- .
- .