System basic information query under Linux

Source: Internet
Author: User

First, query CPU information:

[root@c Ubix ~]#cat/proc/cpuinfo

Processor: is a unique identification of the bare metal CPU.

VENDOR_ID: Identifies the type of CPU, Genuineintel is an Intel processor.

Physical ID: is a unique identifier for the physical CPU, and the same physical ID represents the same physical CPU.

Siblings: Represents the number of logical processors for the same physical CPU.

Core ID: Represents a unique identity for each core.

CPU Cores: The number of cores that represent the same physical CPU.

To view the number of server physical CPUs:

[[email protected] ~]# cat/proc/cpuinfo |grep "Physical id" |sort |uniq |wc-l

2

To view the number of cores per physical CPU:

[[email protected]Cubix ~]# cat/proc/cpuinfo |grep "CPU Cores"

CPU Cores:4

CPU Cores:4

CPU Cores:4

CPU Cores:4

CPU Cores:4

CPU Cores:4

CPU Cores:4

CPU Cores:4

To view the number of logical CPUs on the server:

[email protected]Cubix ~]# cat/proc/cpuinfo |grep "Processor" |wc-l

8

The relationship between siblings and CPU cores is: If siblings is twice times the CPU cores, then the system supports hyper-threading and is turned on. If the sublings is the same as the CPU cores, the system does not support hyper-threading or does not open Hyper-threading.


Second, query memory information:

Query by/proc/meminfo

[[email protected]Cubix ~] #cat/proc/meminfo

Memtotal: Indicates the physical memory size.

Memfree: Indicates the available physical memory size.

Querying with the free command

[email protected]Cubix ~] #free-M

Total (overall memory size) used: (Memory size used) free (remaining memory size) shared buffers Cached

Mem: Lists the usage of physical memory.

Swap: Lists the usage of the swap partition.

Third, view the disk partition situation:

[email protected]Cubix ~]# fdisk-l

disk/dev/sda:999.1 GB, 999116767232 bytes

255 heads, Sectors/track, 121469 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDA1 * 1 200781 Linux

/dev/sda2 2575 20482875 Linux

/dev/sda3 2576 3595 8193150, Linux Swap/solaris

/DEV/SDA4 3596 121469 946822905 5 Extended

/dev/sda5 3596 121469 946822873+-up Linux

From the above information can be seen. The current system has a 1TB disk SDA, a total of 5 partition Sda1-sda5, where the partition Sda3 for the swap partition, SDA4 for the extended partition. It is important to note that the extended partition cannot be used directly, and it needs to continue partitioning the logical partition under the extended partition. \

Four, query the current operating system version:

With/etc/redhat-release, this method is only available for Redhat series, such as Redhat, CentOS.

[email protected]Cubix ~]#cat/etc/redhat-release

Red Hat Enterprise Linux Server release 5.5 (Tikanga)

View by issue information:

[email protected]Cubix ~]#cat/etc/issue

Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Kernel \ r on an \m

[email protected]Cubix ~]#cat/etc/issue.net

Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Kernel \ r on an \m

Query by command lsb_release:

[email protected]Cubix ~]#lsb_release-a

LSB Version:: Core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch

Distributor Id:redhatenterpriseserver

description:red Hat Enterprise Linux Server release 5.5 (Tikanga)

release:5.5

Codename:tikanga

Five, query kernel version

by/proc/version

[email protected]Cubix ~]#cat/proc/version

Linux version 2.6.18-194.el5pae ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Ma R 22:00:21 EDT 2010

Through the uname command:

[email protected]Cubix ~]#uname-a

Linux www.probbs.com 2.6.18-194.el5pae #1 SMP Tue Mar 22:00:21 EDT all i686 i686 i386 gnu/linux


System basic information query under Linux

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.