Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Information query of hardware Server in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Machine basic information query

Dmidecode | grep "Product Name" # check the machine model

Hostname # View hostname

Dmidecode-t bios # View bios information system, baseboard, chassis, processor, memory, cache, connector, slot

Dmidecode | grep 'Serial Number' # check all serial numbers. The first serial number is the serial number of the machine.

Dmidecode-s system-serial-number # check the serial number of the machine, as shown in the first serial number of the previous command

Dmidecode-Q # View all useful information, including memory location, BIOS, system information, SN number, etc.

Lsb_release-a cat / etc/issue cat / etc/issue.net cat / etc/redhat-release # View operating system version information

View cpu information

Lscpu # View cpu information (rhel6 is supported)

Cat / proc/cpuinfo | grep name | cut-f2-d: | uniq-c # check the number of cores on the main frequency of the CPU model

Cat / proc/cpuinfo | more

Cat / proc/cpuinfo | grep "physical id" | sort | uniq | wc-l # check the number of CPU

Cat / proc/cpuinfo | grep "cpu cores" | uniq # View the number of core in each physical CPU (that is, the number of cores)

Cat / proc/cpuinfo | grep "processor" | wc-l # check the number of logical CPU

Dmidecode | grep-I CPU # check the number and model of CPU

Dmidecode-t processor # View the number and location of cpu

Look at the memory information

Dmidecode-t memory # View memory information and memory location

Dmidecode | grep-A 16 "Memory Device$" | grep Size: | grep-v "No Module Installed" | awk'{print "*" $2line 3}'| uniq-c # check the number of memory entries

Dmidecode | grep-P-A5 "Memory\ s+Device" | grep Size | grep-v Range # View individual memory size and total memory size

Dmidecode | grep-A16 "Memory Device$" # View details such as memory size, location of each memory, SN and PN number, etc.

Free-m # View memory size

View hard disk information

Fdisk-l # View logical hard disk size

Smartctl-a / dev/sda (not suitable for raid) # check the brand model of the hard drive

Lsblk # View hard disk and partition distribution

Hdparm-I / dev/sda (if raid is not applicable, an error will be reported) # View the specified hard disk model

Fdisk-l | grep Disk | grep sd # check the number of disks (including san storage disks)

Cd / dev/disk/by-id # # the wwid number of the disk that can be viewed in this directory. Wwid is the same as the mac of the network card and is used to identify the disk. It is unique.

Cd / dev/disk/by-uuid # check the uuid number of disk

View raid information

Cat / proc/scsi/scsi # View raid card model and hard disk brand model

Dmesg | grep-I raid # View raid information and level

Cat / proc/scsi/mptsas # View hard raid cat / proc/mdstat # View soft raid

Cat / sys/block/sda/device/model

Udevadm info-- query=all-- name=sda-- attribute-walk | grep-I "raid_level" # View raid level

View network card information

Ifconfig-a # View IP address information

Lspci | grep-I eth # check the number and model of Nic hardware

Ethtool eth0 # View eth0 Nic interface details

View HBA card information

Lspci | grep-I fibre or dmesg | grep-I hba # check how many FC HBA cards exist

Ls / sys/class/fc_host/ # check how many FC HBA cards exist

Cat / sys/class/fc_host/host [4-5] / port_name # list the wwwn number of 4 and 5 fiber cards and the wwwn number is 16 digits

Cat / proc/scsi/qla2xxx # check the HBA card model for AS4 and SuSE Linux 9

Cat / sys/class/fc_host/host*/port_name # check the HBA card model and wwn number for rhel5 6 7 and SuSE Linux 10

Cat / sys/class/fc_host/host*/port_state # check whether the HBA card status is online, suitable for rhel5 6 7 and SuSE Linux 10

View PCI information

Lspci # # check the pci information, that is, all the hardware slot information on the motherboard.

Lspci-v # View pci details, that is, all hardware slot information on the motherboard.

View iNode and block information

Dumpe2fs / dev/sda2 | egrep-I "block count | inode count"

Additional information

Netstat-rn

Netstat-in

Tail-f / var/log/messages

Cat / var/log/messages

Cat / var/log/secure

Top

Iostat-d 2

Ps-aux

Df-h

Vmstat 2 10

Vgs

Vgdisplay

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report