CPU Performance Metrics
1. Ratio of CPU used by user process
2. Ratio of CPU used by system process
3. Wio, waiting for I/O but the CPU is in idle state ratio.
4. CPU Idle Rate
5. CPU Ratio for context exchange
6,nice
7,real-time
8, run the length of the process queue
9, average load
the common tools for monitoring CPU performance under Linux are
1. Iostat
Only the average information for all CPUs can be viewed
2. Vmstat
Can view the average informat
are cache. Vmstat: Can monitor virtual memory usage, free memory, buffer, cache, and other indicators, and a similar to the tools. Whether the server occurs swap can be viewed through Vmstat 1. C, disk I/O relatedCommon tools: Iostat, Fio, SwaponIostat: Can obtain read-write data per second block number, all read and write blocks, and so on, can have a general understanding of disk Read and write performance, and can simulate the sequence and random
Tags: lin-o using usage network transport meaning call build timesReal-time monitoring-network monitoring: netstat-netstat command for displaying native network links, running ports, routing tables, and moreNetstat parameter description:-N: Reject display aliases, can show all numbers converted to digital-L: Lists only the service states that are in listen (listening)-P: Shows the name of the program that established the related link-T: Show TCP-related options-U: Show only UDP-related options-I
. Establish userFor user in chuji001 chuji002 chuji003 net001 senior001 manager001DoUseradd $userecho "111111" |passwd--stdin $userDone2, establish 5 developers, belong to the Phpers groupGroupadd-g 999 phpersFor N inseq 5DoUseradd-g phpers php00$nDoneFor user in kaifamanager001 seniorphpersDoUseradd $userecho "111111" |passwd--stdin $userDone3, use Visudo edit vi/etc/sudoers new configuration is as follows
Defaults Logfile=/var/log/sudo.log# #Cmnd_Alias by tim# #2018/01/16Cmnd_alias cy_cmd_1
);System>bibo too large (reference value, over 2000)Command usage scenarios:Vmstat monitoring if us is very high, nearly 100%, you need to use the top name to see which process is causing it, and then in the analysis process;Sy is very high, can try strace to see the system kernel call situation;If the IO is abnormal, you can try using Iostat to seeIostat (easy to understand)perform iostat alone, showing th
attention to two points, disk read and write speed and IO usage, we use the Iopp and Iostat tools to observe respectively.Test Write Speed:Test write 20G data, the larger the amount of data, the test value should be more accurate.# sync;/usr/bin/time-p Bash-c "(dd If=/dev/zero of=test.dd bs=1m count=20000)"20000+0 Records in20000+0 Records outReal 92.87User 0.00SYS 18.08The time to write 20000M is 92.87s, so the write speed of the disk is 215.35mb/se
support for network and multiuser functionality, but does not support GUI functionality. If you really need a GUI, you can enter startx into the GUI at the command line.If your Linux system is entering the GUI by default, you can adjust the configuration to let him enter RunLevel 3 by default. The specific method is:1 open a terminal, Su to root account 2 with your favorite editor (vi/emacs/... Open/etc/inittab file 3 to find the Initdefault keyword, change "id:5:initdefault:" to "Id:3:initdefa
powerful commands:
[01-iostat]
[02/03-meminfo/free]
[04-mpstat]
[05-netstat]
[06-nmon]
[07-pmap]
[08/09-ps/pstree]
[10-sar]
[11-strace]
[12-tcpdump]
[13-top]
[14-uptime]
[15-vmstat]
[16-wireshark]
[01-iostat]The Iostat command displays the detail status of your storage system. You can usually use
you to schedule a subsystem for process execution. You can schedule the execution of these usage programs so that statistics can be collected on a regular basis over time and can be viewed at a specific time, such as between a high load or a low loadIostat commandThe Iostat command provides you with different information about the system, including CPU time statistics, I/O devices, partitions, and network Files (NFS).This command is useful for monito
monitoring, diagnostic tools TopThere are several types of common combinations:
Detection of CPU bottlenecks with Vmstat, SAR, Iostat
Use free, vmstat to detect if it is a memory bottleneck
Detection of disk I/O bottlenecks with Iostat and DMESG
Detection of network bandwidth bottlenecks with Netstat
2.1 VmstatThe meaning of the Vmstat command is to display the virtual memory stat
5. System Maintenance5.1 Solaris SystemInvolved server account1 (218.29.0.239), Account2 (218.29.0.240), oradb1 (218.29.0.244), oradb2 (218.29.0.245)5.1.1 System Overview1. Basic information of the Operating System: uname-A displays the name, hostname, major version information, minor version information, hardware type, CPU type, and platform information of the operating system in sequence.2. kernel information: Modify the/etc/system file to change the default kernel parameters. modinfo displays
exceeds 80%
Disk I/O restrictions
Vmstat
When % iowait exceeds 40% (aix4.3.3 or later ),
Application disk restrictions
Iostat
When % tm_act exceeds 70%
Less storage space
LSPs,-
When the page space activity rate exceeds 70%
Page feed restrictions
Iostat, stat
Virtual logical volume % tm_act exceeds 30% of I/O (
1. Each simulated user needs about 2 MB of memory. It is recommended that the number of users should not exceed 200, and the CPU usage should not exceed 75%.
2. Generally, one user is started every one second or two seconds, or two users can be started every five seconds. Generally, the one-time testing requirement is more than 15 minutes. The experience is that 15-minute sampling is relatively scientific.
3. commands and methods for viewing performance indicators in Linux: Vmstat: Virtual
bottleneck. Next we can use the relevant I/O diagnostic tools for specific verification and troubleshooting.
PS: if you do not know how to use top, please refer to: Linux system monitoring, diagnostic tool top Command details
There are several common combinations:
Use vmstat, sar, and iostat to detect CPU bottlenecks
Use free and vmstat to detect memory bottlenecks
Use iostat and dmesg to detect disk I
|+ --------------- + ----------- +| Com_selected | 222693559 |+ --------------- + ----------- +
Calculate the table scan rate:
Table scan rate = handler_read_rnd_next/com_select
If the scanning rate of a table exceeds 4000, too many table scans are performed. It is very likely that the index has not been created. Increasing the value of read_buffer_size may be advantageous, but it is best not to exceed 8 Mb.
Postscript:
Some numbers mentioned in this article are reference values. You c
corresponding to Wireshark;
Host,The DNS resolution query tool resolves a host name to an IP address or an IP address to a host name;
Dig,The DNS resolution query tool is more explicit than the host command, but not easy to understand;
Lsof,Is short for list open files. It is a tool used to list open files in the current system;
Dstat,Collect the running data of the system and collect the specified performance resources;
Iostat,A query
performed. It is very likely that the index has not been created. Increasing the value of read_buffer_size may be advantageous, but it is best not to exceed 8 mb.
Postscript:
Some numbers mentioned in this article are reference values. You can understand the basic principles. In addition to the various status values provided by mysql, some performance indicators of the operating system are also very important, such as the commonly used top and iostat
also use the init 3 command to set the server running level immediately.
Once your server runs under init 3, you can start to use the following Shell programs to see what is happening on your server.
Iostat
The iostat command details the storage subsystem. You usually use iostat to monitor the overall running status of the storage subsystem, and detect the slow
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.