Linux View system Information and system performance test commands

Source: Internet
Author: User

To view system Information:

~# uname-a (Linux view version current operating system kernel information)
Linux iz23onhpqvwz 3.13.0-30-generic #54-ubuntu SMP Mon June 9 22:47:59 UTC i686 i686 i686 gnu/linux

See if it's CentOS or Ubuntu:


[Email protected]:~# lsb_release-a
No LSB modules is available.
Distributor Id:ubuntu
Description:ubuntu 14.04 LTS
release:14.04
Codename:trusty

(LSB full name: Linux standard Base)

To see if the system is 32 or 64 bits:

FA 1:[[email protected] ~] #uname-A

If there's a x86_64, it's 64, and there's no 32-bit.

The following is X686 or x86_64 the kernel is 64 bits, i686 or i386 the kernel is 32 bits

FA 2:getconf Long_bit

[[Email protected] ~] #getconf long_bit

[[Email protected] ~] #getconf word_bit

(the int and long types in a 32-bit system are generally 4 bytes, and the int type in the 64-bit system is still 4 bytes, but LONG has become a 8-byte inux "getconf word_bit" and "getconf long_bit" are available in the system Gets the number of digits for word and long. 64-bit systems should be 32 and 64, respectively. )

Act 3:


Look directly at the method that has no/lib64. 64-bit system will have/lib64 and/lib two directories, 32 bits only/lib one.

More ways:

Http://www.blogjava.net/baizhihui19870626/articles/382202.html

To view CPU information:

More/proc/cpuinfo

This whole bunch may not be able to read, an article: Linux cpuinfo Detailed:

In a Linux system, how do you know more about CPU information? Of course it was checked by Cat/proc/cpuinfo, but how about several cores/threads, such as a few physical cpu/, how are these problems determined?
After viewing, my development machine is 1 physical cpu,4 core 8 threads, Intel (R) core (TM) i7 CPU 860

@ 2.80GHz
Record, judge the process and knowledge.

Basis of judgment:
1. CPUs with the same core ID are Hyper-threading of the same core.
2. WithCPUs with the same physical ID are the same CPU-encapsulated thread or coreS
English version:
1.Physical ID and Core ID is not necessarily consecutive but they is unique. Any CPUs with the same core ID is hyperthreads in the same core.
2.Any CPU with the same physical ID is threads or cores in the same physical socket.

echo "Logical CPU Number:"
#逻辑CPU个数
Cat/proc/cpuinfo | grep "Processor" | Wc-l

echo "Physical CPU Number:"
#物理CPU个数:
Cat/proc/cpuinfo | grep "Physical ID" | Sort-u | Wc-l

echo "core number in a physical CPU:"
#每个物理CPU中Core的个数:
Cat/proc/cpuinfo | grep "CPU Cores" | Uniq | Awk-f: ' {print $} '
The number of #查看core IDs, which is the number of cores on all physical CPUs
Cat/proc/cpuinfo | grep "Core ID" |  Uniq | Wc-l

#是否为超线程?
#如果有两个逻辑CPU具有相同的 "Core ID", then Hyper-threading is turned on. Or the number of siblings is larger than the number of CPUs cores.
Number of #每个物理CPU中逻辑CPU (possibly core, threads, or both):
Cat/proc/cpuinfo | grep "Siblings"


The/proc/cpuinfo file contains a paragraph of data for each processor on the system. There are 6 entries in the/proc/cpuinfo description for multi-core and Hyper-Threading (HT) Technical checks: processor, vendor ID, physical ID, siblings, core ID, and CPU cores.
The processor entry includes a unique identifier for this logical processor.
The physical ID entry includes a unique identifier for each physical package.
The core ID entry holds a unique identifier for each kernel.
The siblings entry lists the number of logical processors in the same physical package.
The CPU cores entry contains the number of cores in the same physical package.
If the processor is an Intel processor, the string in the vendor ID entry is Genuineintel.

1. All logical processors with the same physical ID share the same physical outlet. Each physical ID represents a unique physical package.
2.Siblings represents the number of logical processors located on this physical package.
3. Each core ID represents a unique processor core.
4. If more than one logical processor has the same core ID and physical ID, proving that there are multiple threads on one core, the system supports Hyper-threading (HT) technology.
5.core ID different logical processor physical ID is the same, this is a multi-core processor. CPU cores entries can also indicate whether multiple cores are supported.

Determine if the CPU is 64 bits, check the flags section in the Cpuinfo to see if there is an LM logo.
Is the processors 64-bit?
A 64-bit processor'll has LM ("long Mode") in the "The Flags" section of Cpuinfo. A 32-bit processor would not. ------------------------------------------------------Performance Detection: The 1.uptimeuptime command is used to see how long the server has been running and how many users are logged on. Get a quick picture of the load on your server.

The output of the uptime contains a load of average, which shows the last 1, 5, and 15-minute loads. Its value represents the number of processes waiting to be processed by the CPU, and if the CPU does not have time to process these processes, the load average value will rise;

About load Average understanding:

Understanding load average in Linux systems (graphic version)

2:top//knock top directly.

System current time, start time, current number of logins, average load 1, 5, 15 min load value
top-19:43:46 up 4 days, 10:46, 7 users, load average:0.25, 0.37, 0.38
Total number of processes, number of running processes, number of dormant processes, number of termination processes, zombie processes
tasks:222 Total, 1 running, 221 sleeping, 0 stopped, 0 zombie
User occupancy, system occupancy, priority thread occupancy, idle thread occupancy,
Cpu (s): 0.3%us, 0.1%sy, 0.0%ni, 98.5%id, 1.0%wa, 0.0%hi, 0.1%si, 0.0%st
Memory state (total memory, used memory, idle memory, cache usage content)
mem:8183648k Total, 8124052k used, 59596k free, 115072k buffers
Swap memory (total swap memory, used memory, idle memory, cache capacity)
swap:2104472k Total, 1369376k used, 735096k free, 1462236k cached

PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND
1 Root 0 784 S 0 0.0 0:06.28 Init
2 root RT 0 0 0 0 S 0 0.0 0:00.08 migration/0
3 Root 0 0 0 S 0 0.0 0:00.01 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.29 MIGRATION/1
5 Root 0 0 0 S 0 0.0 0:00.00 KSOFTIRQD/1
6 root RT 0 0 0 0 S 0 0.0 0:00.21 MIGRATION/2
7 Root 0 0 0 S 0 0.0 0:00.05 KSOFTIRQD/2
8 root RT 0 0 0 0 S 0 0.0 0:00.08 MIGRATION/3
9 Root 0 0 0 S 0 0.0 0:00.01 KSOFTIRQD/3
Root 10-5 0 0 0 S 0 0.0 0:00.02 events/0
Root 10-5 0 0 0 S 0 0.0 0:00.00 EVENTS/1


Parameter description: The top command lists the system's most sensitive parameter information.
PR: The processing time of the allocation of the system process, if 16, indicates the length of time allocated for 16*10 milliseconds to process the thread. The larger the number, the longer the processing time.
NI: Priority of the process
RES: The total amount of physical memory the process occupies, in kilobytes.
SHR (SHARE): The amount of shared memory that the process uses. Unit is KB
S (STAT): The state of the thread
S: Represents the dormant state;
D: Represents the non-interruptible sleep state;
R: Represents the running state;
Z: Represents the zombie state;
T: Represents the Stop or trace status.
%CPU: The percentage of CPU time and total time that the process has occupied since the most recent refresh
%MEM: The percentage of total memory that the process occupies in physical memory.
Time+: The CPU time since the thread was started

Common usage:
Top-d 3//Every three seconds data is refreshed by default every 5 seconds
Ctrl+l//Erase and rewrite the screen.

3:free

The free command displays all memory usage for the system, including idle memory, used memory, and swap memory space.     The free command display also includes information about the caches and buffers used by the kernel. When using the free command, it is necessary to remember the memory structure of Linux and the management methods of virtual memory, such as the limit of the amount of idle memory, and the use of swap space does not mark the occurrence of a memory bottleneck.

[Email protected]:~# free
Total used free shared buffers Cached
mem:1025632 949516 76116 656 144084 459500
-/+ buffers/cache:345932 679700
swap:0 0 0

More

Http://www.cnblogs.com/itech/archive/2011/06/08/2075145.html

Http://blog.chinaunix.net/uid-26941022-id-3397961.html

Linux View system Information and system performance test commands

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.