Linux Server various Information view command summary

Source: Internet
Author: User

In daily operations, it is often necessary to look at the hardware information of the system, and the Linux information is not as intuitive as windows.
Here I listed the System information to check the practical commands, and do a classification, examples of interpretation.

Viewing the system version
[Email protected]:~ $cat/etc/issue
CentOS Release 6.8 (Final)
Kernel \ r on an \m

[Email protected]:~ $cat/etc/redhat-release
CentOS Release 6.8 (Final)


32-bit or 64-bit when viewing the system
[Email protected]:~$ getconf long_bit
64


Kernel view
[Email protected]:~ $uname-A

Cpu
The LSCPU command, which looks at the CPU statistics.
[Email protected]:~$ lscpu
architecture:i686 #cpu架构
CPU Op-mode (s): 32-bit, 64-bit
Byte Order:little Endian #小尾序
CPU (s): 4 #总共有4核
On-line CPU (s) list:0-3
Thread (s) per Core:1 #每个cpu核, only one thread is supported, that is, hyper-threading is not supported
Core (s) per Socket:4 #每个cpu with 4 cores
Socket (s): 1 #总共有1一个cpu
Vendor Id:genuineintel #cpu产商 Intel
CPU Family:6
Model:42
Stepping:7
CPU mhz:1600.000
bogomips:5986.12
Virtualization:vt-x #支持cpu虚拟化技术
L1D cache:32k
L1i cache:32k
L2 cache:256k
L3 cache:6144k

View/proc/cpuinfo, you can know each CPU information, such as the model of each CPU, the frequency and so on.
You can also enter the top command, press the number "1" to see how much CPU is the core

#cat/proc/cpuinfo
processor:0
Vendor_id:genuineintel
CPU Family:6
Model:42
Model Name:intel (R) Core (TM) i5-2320 CPU @ 3.00GHz
.....

The above output is the first CPU part of the information, there are 3 of CPU information omitted.

Memory
Overview of Memory

Free-m
Total used free shared buffers Cached
mem:3926 3651 274 0 12 404
-/+ buffers/cache:3235 691
swap:9536 31 9505
The unit here is MB, and the total memory is 3926MB.

View Memory Detail Usage
# Cat/proc/meminfo
memtotal:4020868 KB
memfree:230884 KB
buffers:7600 KB
cached:454772 KB
swapcached:836 KB
.....
Copy Code

View Memory Hardware Information

Copy Code
DMIDECODE-T Memory
# Dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0008, DMI type, bytes
Physical Memory Array
Location:system Board Or Motherboard
....
Maximum capacity:32 GB
....

Handle 0x000A, DMI type, bytes
....
Memory Device
Array handle:0x0008
Error Information Handle:not provided
Total width:64 Bits
Data width:64 Bits
size:4096 MB
.....
Copy Code
My motherboard has 4 slots, with only one slot, with a 4096MB of memory plugged in.

Disk
View hard disk and partition distribution

Copy Code
# LSBLK
NAME maj:min RM SIZE RO TYPE mountpoint
SDA 8:0 0 465.8G 0 disk
├─SDA1 8:1 0 1G 0 part/boot
├─sda2 8:2 0 9.3G 0 part [SWAP]
├─sda3 8:3 0 74.5G 0 Part/
├─SDA4 8:4 0 1K 0 part
├─sda5 8:5 0 111.8G 0 part/home
└─sda6 8:6 0 269.2G 0 part
Copy Code
Display is intuitive

If you want to see hard disk and partition details

Copy Code
# fdisk-l

disk/dev/sda:500.1 GB, 500107862016 bytes
255 heads, Sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * MB = bytes
Sector size (logical/physical): bytes/4096 bytes
I/O size (minimum/optimal): 4096 bytes/4096 bytes
Disk identifier:0x00023728

Device Boot Start End Blocks Id System
/DEV/SDA1 * 2048 2148351 1073152 Linux
/dev/sda2 2148352 21680127 9765888, Linux Swap/solaris
/dev/sda3 21680128 177930239 78125056-up Linux
/DEV/SDA4 177932286 976771071 399419393 5 extended/dev/sda5 177932288 412305407 117186560 Linux
/dev/sda6 412307456 976771071 282231808-up Linux
Copy Code

Card
Viewing NIC hardware information

# Lspci | Grep-i ' ETH '
02:00.0 Ethernet Controller:realtek Semiconductor Co., Ltd. rtl8111/8168b PCI Express Gigabit Ethernet Controller (Rev 06 )

View all network interfaces of the system

# ifconfig-a
eth0 Link ENCAP: Ethernet Hardware Address b8:97:5a:17:b3:8f
.....

Lo Link encap: local loopback
.....
or a

IP link Show
1:lo: <LOOPBACK> MTU 16436 Qdisc noqueue State down
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether b8:97:5a:17:b3:8f BRD FF:FF:FF:FF:FF:FF

If you want to view the details of a network interface, such as detailed parameters and metrics for eth0

Copy Code
# Ethtool Eth0
Settings for eth0:
Supported ports: [TP MII]
Supported Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/half 1000baset/full #支持千兆半双工, full duplex mode
Supported Pause Frame Use:no
Supports Auto-negotiation:yes #支持自适应模式, generally support
Advertised Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/half 1000baset/full
Advertised Pause frame use:symmetric receive-only
Advertised Auto-negotiation:yes #默认使用自适应模式
Link Partner advertised link modes:10baset/half 10baset/full
100baset/half 100baset/full
.....
SPEED:100MB/S #现在网卡的速度是100Mb, the network adapter uses adaptive mode, so it is assumed that the route is 100Mb, resulting in the network card from supporting the gigabit, to support the hundred trillion
Duplex:full #全双工
.....
Link Detected:yes #表示有网线连接, and routing is pass-through
Copy Code

Other
View PCI information, which is the motherboard's hardware slot information.

Copy Code
Lspci
00:00.0 Host Bridge:intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev.) #主板芯片
00:02.0 VGA compatible Controller:intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller ( Rev) #显卡
00:14.0 USB Controller:intel Corporation Panther Point USB XHCI Host Controller (rev.) #usb控制器
00:16.0 Communication Controller:intel Corporation Panther Point MEI Controller #1 (Rev 04)
00:1a.0 USB Controller:intel Corporation Panther Point USB Enhanced Host Controller #2 (Rev 04)
00:1b.0 Audio Device:intel Corporation Panther Point High Definition Audio Controller (rev.) #声卡
00:1c.0 PCI Bridge:intel Corporation Panther Point PCI Express Root Port 1 (Rev. C4) #pci Slots
00:1C.2 PCI Bridge:intel Corporation Panther Point PCI Express Root Port 3 (Rev C4)
00:1C.3 PCI Bridge:intel Corporation Panther Point PCI Express Root Port 4 (Rev C4)
00:1d.0 USB Controller:intel Corporation Panther Point USB Enhanced Host Controller #1 (Rev 04)
00:1f.0 ISA Bridge:intel Corporation Panther Point LPC Controller (Rev 04)
00:1F.2 IDE Interface:intel Corporation Panther point 4 port SATA Controller [IDE mode] (rev) #硬盘接口
00:1F.3 Smbus:intel Corporation Panther Point SMBus Controller (Rev 04)
00:1F.5 IDE Interface:intel Corporation Panther point 2 port SATA Controller [IDE mode] (rev) #硬盘接口
02:00.0 Ethernet Controller:realtek Semiconductor Co., Ltd. rtl8111/8168b PCI Express Gigabit Ethernet Controller (Rev 06 ) #网卡
03:00.0 PCI bridge:integrated Technology Express, Inc. Device 8893 (Rev. 41)
Copy Code
If you want more detailed information: Lspci-v or LSPCI-VV

If you want to see the device tree: lscpi-t

View BIOS Information

Copy Code
# DMIDECODE-T BIOS
......
BIOS Information
Vendor:american megatrends Inc.
version:4.6.5
Release date:04/25/2012
.......
BIOS revision:4.6
......
Copy Code
Dmidecode dumps the DMI (Desktop Management Interface) information of the machine in a readable manner. This information includes both the hardware and the BIOS, as well as the current configuration and the maximum configuration supported by the system, such as the maximum amount of memory supported.

If you want to see all the useful information

Dmidecode-q
It contains a lot of hardware information.

Linux Server various Information view command summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.