Linux View System Hardware Information Summary (some examples Centoso for example)

Source: Internet
Author: User

1.cpu

#lscpu命令, the statistics for the CPU are viewed.

  • Architecture:x86_64
    CPU Op-mode (s): 32-bit, 64-bit
    Byte Order:little Endian
    CPU (s): 4
    On-line CPU (s) list:0-3
    Thread (s) per core:1
    Core (s) per Socket:2
    Socket (s): 2
    NUMA node (s): 1
    Vendor Id:genuineintel
    CPU Family:6
    Model:42
    Stepping:7
    CPU mhz:3093.110
    bogomips:6186.22
    Hypervisor Vendor:vmware
    Virtualization Type:full
    L1D cache:32k
    L1i cache:32k
    L2 cache:256k
    L3 cache:6144k
    NUMA node0 CPU (s): 0-3

View/proc/cpuinfo, you can know each CPU information, such as the model of each CPU, the frequency and so on.

2. Memory

#free-M # View memory usage and swap area usage

Total used free shared buffers Cached

mem:3690 288 3401 0 15 119

-/+ buffers/cache:153 3536

swap:3951 0 3951

# Cat/proc/meminfo

#dmidecode-T Memory view hardware information


grep memtotal/proc/meminfo# View Total Memory

grep Memfree/proc/meminfo # Viewing the amount of free memory

Lsmod # List of loaded kernel modules

3. Disk

# LSBLK view hard disk with partition and

  1. NAME maj:min RM SIZE RO TYPE mountpoint

  2. SDA 8:0 0 60G 0 disk

  3. ├─SDA1 8:1 0 500M 0 part/boot

  4. └─sda2 8:2 0 59.5G 0 part

  5. ├─vg_qdy-lv_root (dm-0) 253:0 0 50G 0 LVM/

  6. ├─vg_qdy-lv_swap (dm-1) 253:1 0 3.9G 0 LVM [swap]

  7. └─vg_qdy-lv_home (dm-2) 253:2 0 5.7G 0 lvm/home

  8. Sr0 11:0 1 1024M 0 rom

#df-h # View each partition usage Du-sh # View the size of the specified directory

  • Filesystem Size used Avail use% mounted on

  • /dev/mapper/vg_qdy-lv_root 50G 3.7G 44G 8%/

  • Tmpfs 1.9G 0 1.9G 0%/dev/shm

  • /DEV/SDA1 485M 39M 421M 9%/boot

  • /dev/mapper/vg_qdy-lv_home 5.6G 239M 5.1G 5%/Home

#fdisk-L # View all partition details

  • disk/dev/sda:64.4 GB, 64424509440 bytes

  • 255 heads, Sectors/track, 7832 cylinders

  • Units = Cylinders of 16065 * 8225280 bytes

  • Sector size (logical/physical): bytes/512 bytes

  • I/O size (minimum/optimal): bytes/512 bytes

  • Disk identifier:0x0000859f


  • Device Boot Start End Blocks Id System

  • /DEV/SDA1 * 1 512000 Linux

  • Partition 1 does not end on cylinder boundary.

  • /dev/sda2 7833 62401536 8e Linux LVM


  • disk/dev/mapper/vg_qdy-lv_root:53.7 GB, 53687091200 bytes

  • 255 heads, Sectors/track, 6527 cylinders

  • Units = Cylinders of 16065 * 8225280 bytes

  • Sector size (logical/physical): bytes/512 bytes

  • I/O size (minimum/optimal): bytes/512 bytes

  • Disk identifier:0x00000000

  • ...... Omit below!

4. NIC Information

# Lspci | Grep-i ' ETH ' view NIC hardware information

# IFCONFIG-A View all network interfaces of the system

or #ip link Show


# ethtool eth0 View details of a network interface

5. Motherboard All hardware slots PCI information.

#lspci

A more detailed lspci-v or LSPCI-VV.

#lscpi-T Device tree

6. View BIOS Information

# DMIDECODE-T BIOS

7. View system uptime, number of users, load

#uptime

#cat/proc/loadavg # View system load disks and partitions

8. View the status of the attached partition

#mount | Column-t

9. View system load disks and partitions

# Cat/proc/loadavg

10. View all installed Packages

#rpm-qa

11. View All Processes

# PS-EF

12. View all listening ports

#netstat-LNTP

13. Check User and group information

#cut-D:-f1/etc/passwd # View System All users cat/etc/passwd |more display long system users and paging

#cut-D:-f1/etc/group # View system All Groups Cat/etc/group|more show long system all groups and pagination

14 Other infrequently used View information commands

Swapon-s # View all swap partitions

Iptables-l # View firewall settings

Hdparm-i/dev/hda # View disk parameters (for IDE devices only)

DMESG | grep IDE # View IDE device detection network at startup

Crontab-l # View the current user's scheduled tasks service

Chkconfig–list # List all system Services #

Chkconfig–list | grep on # Lists all started system services programs


Linux View System Hardware Information Summary (some examples Centoso for example)

Related Article

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.