Linux system hardware information of UNIX toolbox annotation 1

Source: Internet
Author: User

This series of articles provides some personal notes on the Unix toolbox.

System

Running kernel and system information:

# Uname-#
Obtain the kernel version (and BSD Version)

# Lsb_release-#
Display any LSB release version information

# Cat/etc/Suse-release # Get SuSE
Version

# Cat/etc/debian_version # Get Debian version

Use/etc/distr-release, where distr (release code) = LSB (UBUNTU), RedHat, Gentoo, Mandrake, Sun (Solaris), and so on.

Note:

#CAT/etc/issue# You can view the Red Hat series in the issue file.

Red hatenterprise Linux Server Release 6.3 (Santiago)

 

# Uptime
# Display the time after the system starts running

# Hostname
# Display the system Host Name

# Hostname-I # display the Host IP Address
Address

Note:

Hostname-IThe option is to resolve the host name to obtain the IP address, which depends on the host name resolution. If your host name is named casually, such as kumu.com, then the IP address you obtain may be the IP address of the Internet, rather than your own. This option is controversial and is generally recommended.-IOption, as shown in the following example:

#Hostname// Host name

Kumu.com

#Hostname-I

50.56.52.163

#Host kumu.com
// The IP address displayed above is the same as the resolved IP address.

Kumu.com has address 50.56.52.163

#Hostname-I
// Retrieve the IP address of the real machine without relying on host name resolution

192.168.1.20 172.16.20.33 10.1.1.119

Man annotation:

-I, -- IP-address

Display the IP address (es) of
Host. Note that this works only if the host name can be resolved. Avoid
Using this option; Use hostname -- all-IP-addresses instead.

-I, -- all-IP-Addresses

Displayall network addresses of the host.
This option enumerates all configuredaddresses on all network
Interfaces. The loopback interface and IPv6link-local addresses are
Omitted. Contrary to option-I, this option does notdepend
On name resolution. Do not make any assumptions about the order of
Output.

# Man hier # description of the directory structure of the file system

Note:

Using man hier will display the annotations for each system directory, which is very clear and practical.

# Last reboot # display the history of the last restart of the system

1.1 hardware information

Hardware information detected by the kernel

# Dmesg
# Detected hardware and startup messages

# Lsdev
# Information about installed hardware 1

# Dd If =/dev/membs = 1 K skip = 768 COUNT = 256 2>/dev/null | strings-N 8 # Read BIOS
Information

Note:

Lsdev often does not have this software package in the RedHat series. You can use other lspci-V and lsscsi commands to view it.

# Lsscsi // view SCSI devices

[1: 0: 0: 0] CD/DVD necvmwar VMware ide cdr10 1.00/dev/sr0

[2: 0: 0: 0] disk VMWare, VMWare virtual s 1.0/dev/SDA

# Lspci-V // list PCI hardware devices

00:00. 0 host bridge: intelcorporation ‑bx/ZX/DX-12743bx/ZX/dx host bridge (Rev 01)

Subsystem: VMware Virtual Machine chipset

... ...

For Debian systems, try to install apt-Get install procinfo.

 

# Cat/proc/cpuinfo # CPU message

Note:

Use commands to determine the number of physical CPUs and cores:

Logical CPU count:
# Cat/proc/cpuinfo | grep "processor" | WC-l

Number of physical CPUs:
# Cat/proc/cpuinfo | grep "Physical ID" | sort | uniq | WC-l

Number of cores in each physical CPU:
# Cat/proc/cpuinfo | grep "CPU cores" | WC-l

Is it hyper-threading?
If two logical CPUs have the same core ID, hyper-threading is enabled.

The number of logical CPUs (possibly core, threads, or both) in each physical CPU:
# Cat/proc/cpuinfo | grep "Siblings"

# Cat/proc/meminfo # memory information

# Grep memtotal/proc/meminfo # display physical memory size

# Watch-N1 'cat/proc/interrupts' # monitor all interrupts processed by the kernel

# Free-m
# Display used and idle memory information (-M is MB) 2

# Cat/proc/devices # display the device with the current core Configuration

# Lspci-TV
# Display PCI devices

# Lsusb-TV
# Display USB devices

# Lshal
# Display the list of all device Properties

# Dmidecode # display hardware information obtained from BIOS

(Refer to my previous introduction to the dmidecode: linuxdmidecode memo)

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.