Monitor IO performance, free command, PS command, view network status, Linux under Grab package

Source: Internet
Author: User
Tags cpu usage

Monitoring IO Performance

Iostat View disk condition (requires installation of Sysstat package)

You can run the command directly
iostat

Or add a 1 to the back, which is the dynamic display.
iostat 1

Iostat and Iostat 1 show things, with the SAR can be manifested, but with the iostat-x will not be able to use the SAR reflected
iostat -x

Iostat-x has a very important indicator,%util, that indicates how much time the disk consumes CPU time, waits for IO time, and waits for disk read-write time to take up the total time.

If the number of this column is large, 50 or 60, and the WKB/S column is also very large that means disk IO is relatively busy, but if the wkb/s column is not big, then the disk has failed.

Slow drives can affect the performance of your system.

Iotop See how the process reads and writes to disk, much like the top command (requires installation of iotop)
yum install -y iotop

Total DISK Write write speed
Actual DISK WRITE Read speed

We mainly look at the IO column
iotop

Free command

Free to view memory usage
free

The first line illustrates, the second row is memory usage, and the third line is the swap partition.

The first column total is the overall size (the default is KB, you can use-m to specify megabytes, or use-H to use the appropriate units), the second column used is used, the third column is the remaining, the fourth column shared is the share, the fifth column Buff/cache, Sixth column available.

The system will reserve a bit of memory for Buff/cache (buff is buffered, cache is cached)

Free view memory usage The main thing to see is avaliable.

PS command

PS Viewing process

PS aux (Statically lists all processes of the system)
ps aux

The front and back are the running user, PID, CPU usage, memory footprint, virtual memory, physical memory, TTY, stat (status of the process), when it was started, how long it was running, and the command.

PID We will use when we want to end a process, such as we want to end 2086, then use Kill 2086 (2086 pid for this process)
kill 2086

We then use the pipe character to see if the process we just ended 2086 still exists (we learned that the process was top before we finished the process)
ps aux |grep top

We want to focus on stat (the state of the process).

STAT (Status of the process) is:

D cannot be interrupted.

R (run) running process (CPU is used within a time period).

The S (sleep) process may be paused and will be activated

T paused process (CTRL + Z paused process)

+ Foreground Process

Z Zombie Process

< high-priority processes (CPU priority processing)

N Low-priority

Memory is locked in memory paging

S master Process

L Multithreading Process

PS aux usage: see if a process is running (it has been used once) to see if top is running
ps aux |grep top

View network Status

Netstat viewing network status (TCP/IP communication status)

NETSTAT-LNP Viewing the Listening port (port required for user and server communication)
netstat -lnp

Like TCP6,UDP6 so add 6, is the IPv6 port, no add, such as TCP,UDP is IPv4 port

Stream internal communication

View TCP/IP status
netstat -an

View only ports for TCP and TCP6
netstat -ltnp

View only TCP and TCP6 and UDP ports
netstat -ltunp

Monitor IO performance, free command, PS command, view network status, Linux under Grab package

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.