Các lệnh xem thông tin phần cứng trên Linux
Trên windows chúng ta quá đơn giản để xem các thông tin phần cứng nhờ có các công cụ hỗ trợ như CPUID, Everest… Nhưng trên Linux chúng ta cần xem thì như thế nào, sau đây là những lệnh mà thường hay được dùng để xem các thông tin như thế.
Đầu tiên là lệnh: top
Cpu(s): 10.6%us, 2.7%sy, 0.0%ni, 86.0%id, 0.6%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 6110564k total, 5821344k used, 289220k free, 213756k buffers
Tuy đây là lệnh dùng để xem các tiến trình nhưng nó cho chúng ta biết được lượng RAM của hệ thống, như trên là 6GB.
Thứ hai là lệnh: cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU X3360 @ 2.83GHz
stepping : 10
cpu MHz : 2000.000
cache size : 6144 KB
Với lệnh trên ta có thể biết server dùng CPU gì và tốc độ ra sao, có bao nhiêu nhân hay bao nhiêu CPU vật lý.
Thứ ba là lệnh lspci
00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller (rev 01)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
Lệnh này cho biết được các thông tin của chipset của hệ thống.
Thứ 4 là lệnh dmidecode –type baseboard
# dmidecode 2.10
SMBIOS 2.5 present.
Handle 0×0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Supermicro
Product Name: X7SBL
Version: PCB Version
Serial Number: 0123456789
Handle 0×000E, DMI type 10, 6 bytes
On Board Device Information
Type: Sound
Status: Disabled
Description: ADI1886
Lệnh này cho chúng ta biết được các thông tin của mainboard thông tin serial của thiết bị.
Và một lệnh nữa cũng hay dùng là:
fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 8924 71681998+ 83 Linux
/dev/sda2 8925 9944 8193150 82 Linux swap / Solaris
/dev/sda3 9945 30377 164128072+ 83 Linux
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 8924 71681998+ 83 Linux
/dev/sdb2 8925 9944 8193150 82 Linux swap / Solaris
/dev/sdb3 9945 30377 164128072+ 83 Linux
Lệnh này cho biết dung lược các ổ cứng chúng ta có
--------------------------------------------------
Leech từ site a Hạnh. :D
Nam Habach