, and there is another important reason why the load is--io not clearly demonstrated. Linux provides the Iostat command to understand the cost of IO.
Enter the iostat-x 1 command to start monitoring the input and output status,x to display all parameter information, 1 to monitor every 1 seconds, 10 to monitor 10 times .
Where rsec/s is read in, WSEC/S is written every second, and these two parameters, at a
Linux system monitoring has the following commands:
Uptime: Display system load condition
Mpstat: Show CPU performance
Free: Displaying memory usage
Vmstat: Displaying virtual memory usage
Iostat: Show System I/O activity
Netstat: Displays the activity of the network
DF/DU: Displaying disk usage
1. Uptime
fdipzone@ubuntu:~$ uptime
00:06:00 up min, 2 users, load average:0.00, 0.03, 0.07
00:06:00 indicates the current time
32min indicat
+ Free
Available memory = Free + buffers + Cached
(-buffers/cache) Number of used memory = used–buffers–cached in mem line
(+buffers/cache) Free memory = Free + buffers + cached in mem line
Iostat
Format: iostat [Options] [
Example:
Iostat-d
Iostat-d 2 2
Iostat-x 1 2
Nets
of CPU wasted on I/O wait; the higher the number, the more CPU resources are waiting for I/O permissionsWA--iowait amountoftimethecpuhasbeenwaitingfor I/O to complete.Find which disk is being writtenThe top command above explains I/O wait from a whole, but does not indicate which disk is affected, and to know which disk is causing the problem, we use another command Iostat command[[email protected] ~]# iostat
用/占用的内存;对应用程序来说-/+ buffers/cache是可用/占用内存,因为buffers/cache很快就会被使用。We should look at the application from the perspective of our work.1.3 Hard Drive View 1, view hard disk and partition information:fdisk -l2. Check the disk space usage of the file system:df -h3. Check the I/O performance of the hard disk (show once every second, show 5 times):iostat -x 1 5The Iostat is included in the package Systat and can be
system efficiency is better. Swap Si the number of memory-swapping areas that are entered by memory. The so is entered into memory by the memory swap area. IO Bi reads the total amount of data (read disk) (in kilobytes per second) from the block device. The total amount of data written by the Bo Block device (KB per second) Here we set the Bi+bo reference value of 1000, if more than 1000, and the large WA value should consider balancing the disk load, can be combined with the
Installation Method
When installing a software
Yum-y install httpd
When installing similar software
Yum-y install httpd *
When multiple non-similar software are installed
Yum-y install httpd php-gd mysql
When a software is uninstalled
Yum-y remove httpd
When multiple similar software are uninstalled
Yum-y remove httpd *
When multiple non-similar software are uninstalled
Yum-y remove httpd php-gd mysql
There is also a great usage
If I want to execute the
How Yum installs and uninstalls software in CentOSInstallation methodWhen installing a softwareYum-y Install httpdWhen installing multiple similar softwareYum-y Install httpd*When installing multiple non-similar softwareYum-y Install httpd php php-gd mysqlWhen uninstalling a softwareYum-y Remove httpdWhen uninstalling multiple similar softwareYum-y Remove httpd*When uninstalling multiple non-similar softwareYum-y Remove httpd php php-gd MySQLAnd there's a very good usage.If I want to execute
commands
You can use several commands to manage the Linux system performance. The following lists the five most commonly used Linux performance commands, including top, vmstat, iostat, free, and sar, they help system administrators quickly solve performance problems.
(1) top
The Top command not only displays the tasks of the current kernel service, but also displays many statistics about the host status. By default, it automatically updates the displ
be seen: http://www.cnblogs.com/ggjucheng/archive/2012/01/05/2312625.html
After paying attention to the CPU, you can also use the iostat command to view the IO situation. The command format is similar to vmstat. iostat 1 30 indicates the same meaning: print the statistical information once per second, print 30 times and exit.
Here I use iostat-DX 1 every second
ArticleDirectory
Iostat
Meminfo and free
Mpstat
Netstat
Nmon
Pmap
PS and pstree
SAR
Strace
Tcpdump
Top
Uptime
Vmstat
Wireshark
Original article link
If you want to know what your server is doing, you need to know some basic commands. Once you are proficient in these commands, you are a professional Linux system administrator.
Some Linux distributions provide the GUIProgramFor example, SuSE Lin
the system: ● when a large application program, for example, when OpenOffice and Firefox run at the same time, the computer may start to slow down and the memory insufficiency may increase. ● If the startup is really slow, it may take a long loading time for the application to start for the first time. Once the application is started, it will run normally. Otherwise, it is likely that the hard disk is too slow. ● High CPU load and sufficient memory, but low CPU utilization. You can use the CPU
Makefile# uname -m
[Root @ localhost nicstat-1.92] # makeGcc-O3-m32 nicstat. c-o nicstatNicstat. c: 99: 1: warning: "DUPLEX_UNKNOWN" redefinedIn file encoded ded from nicstat. c: 84:/Usr/include/linux/ethtool. h: 691: 1: warning: this is the location of the previous definitionMv nicstat './nicstat. sh -- bin-name'
[root@localhost nicstat-1.92]# ./nicstat.sh
Disk I/O usage
Iostat [-t] [-c] [interval [count]
The parameters are described as follows:
How to install and uninstall software in Centos yumInstallation MethodWhen installing a softwareYum-y install httpdWhen installing similar softwareYum-y install httpd *When multiple non-similar software are installedYum-y install httpd php-gd mysqlWhen a software is uninstalledYum-y remove httpdWhen multiple similar software are uninstalledYum-y remove httpd *When multiple non-similar software are uninstalledYum-y remove httpd php-gd mysql also has a very good usage. If I want to execute the
trace and havingWait for the next time the problem occurs for the additional data.Tracking is to collect performance data for a long time to diagnose problems. For remote performance analysis, this is a good method;However, this method also has some disadvantages. When analyzing large files, performance issues cannot be repeated;Important objects and parameters are not tracked;Vmstat commandOne way to track disk usage on a Linux system is by using the vmstat tool. The importantColumns in vmstat
processes.
# iotop
For information about how to install and use Iotop, see install iotop in Linux.
8. Iostat-input/output statistics
Iostat is a simple tool for collecting and displaying input and output status statistics of system storage devices. This tool is often used to track the performance of storage devices, including devices, local disks, and remote disks such as NFS.
# iostatLinux 2.6.18-238.9.1
. Monitor memory usage
The system is running, because the physical memory is often insufficient, you need to use the virtual memory to solve this problem.
By sharing the virtual memory between processes, the system seems to have more memory than the actual memory. The Linux system supports Virtual Memory, that is, the disk is used as the RAM Extension to expand the available memory.
(1) monitors memory usage in real time in Linux systems. Generally, the free command is used to monitor memory usa
want to specify the refresh interval and add the-d parameter at startup, you can start top at www.2cto.com, for example, top-d 5, in addition, after refreshing every 5 seconds and entering the top, press the following button to have the corresponding function: space to immediately refresh the display information M sort by memory usage N sort by process ID P sort by CPU usage c Extend Command Line Information Display complete command line? Display help information q exit top program
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.