Linux How to view hard disk size, memory size and other system information and hardware information

Source: Internet
Author: User
Tags dmesg

One, the Linux CPU size
[[email protected] ~]# cat/proc/cpuinfo |grep "model name" && cat/proc/cpuinfo |grep "Physical ID"
Model Name:intel (R) Xeon (TM) CPU 2.80GHz
Model Name:intel (R) Xeon (TM) CPU 2.80GHz
Model Name:intel (R) Xeon (TM) CPU 2.80GHz
Model Name:intel (R) Xeon (TM) CPU 2.80GHz
Physical id:0
Physical id:0
Physical Id:3
Physical Id:3
[Email protected] ~]#

Description: Detailed information about each CPU can be seen in/proc/cpuinfo under Linux. But for a dual-core CPU, you will see two CPUs in the Cpuinfo. It is often mistaken for a two single-core CPU.
You should actually differentiate between single-core and dual-core by physical Processor ID. The physical Processor ID can be found from Cpuinfo or DMESG. Flags if you have HT description support Hyper-Threading technology determine the number of physical CPUs you can view the value of the physical ID, same as the same physical CPU
As you can see above, the machine has two dual-core cpu,id of 0 and 3 respectively, and the size is 2.8G.
Second, memory size
[Email protected] ~]# cat/proc/meminfo |grep memtotal
memtotal:1034612 KB
[Email protected] ~]#

Three, hard disk size
[Email protected] ~]# fdisk-l |grep Disk
disk/dev/sda:300.0 GB, 300000000000 bytes
[Email protected] ~]#

Iv. more ways to view Linux hardware information
UNAME-A # Linux System Information command to view kernel/Os/cpu information
Head-n 1/etc/issue # View OS version, is the number 1 not the letter L
Cat/proc/cpuinfo # Linux System Information command to view CPU information
Hostname # View Linux System Information command for computer name
LSPCI-TV # List all PCI devices
LSUSB-TV # lists Linux System Information commands for all USB devices
Lsmod # List of loaded kernel modules
ENV # View environment variable resources
Free-m # View memory usage and swap area usage
Df-h # Viewing the usage of each partition
Du-sh # Viewing the size of a specified directory
grep memtotal/proc/meminfo # View Total Memory
grep Memfree/proc/meminfo # Viewing the amount of free memory
Uptime # View System uptime, number of users, load
CAT/PROC/LOADAVG # Viewing system load disks and partitions
Mount | COLUMN-T # Viewing the status of a mounted partition
Fdisk-l # View all partitions
Swapon-s # View all swap partitions
Hdparm-i/dev/hda # View disk parameters (for IDE devices only)
DMESG | grep IDE # View IDE device detection network at startup
Ifconfig # View the properties of all network interfaces
Iptables-l # View firewall settings
Route-n # Viewing the routing table
NETSTAT-LNTP # View All listening ports
NETSTAT-ANTP # View all established connections
Netstat-s # Viewing the network statistics process
PS-EF # View All Processes
Top # Real-time display of process status users
W # View Active Users
ID # view specified user information
Last # View user log in log
cut-d:-f1/etc/passwd # View All users of the system
cut-d:-f1/etc/group # View all system groups
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
RPM-QA # View all installed Packages
Cat/proc/cpuinfo: Linux system commands to view CPU-related parameters
Cat/proc/partitions: View system Information commands for Linux hard disk and partition information
Cat/proc/meminfo: Linux system commands to view Linux system memory information
Cat/proc/version: View version, similar to Uname-r
Cat/proc/ioports: Viewing the device IO port
Cat/proc/interrupts: Viewing interrupts
CAT/PROC/PCI: Viewing information for PCI devices
Cat/proc/swaps: View information for all swap partitions

Linux How to view hard disk size, memory size and other system information and hardware information

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.