IO performance, free, PS, view network status, Linux under Grab packet

Source: Internet
Author: User
Tags disk usage

One: Monitoring IO performance

Iostat-x disk usage

The last column indicates that the time taken for the disk is longer than
Iotop disk usage

Two: Free command


From left to right, total size, size used, remaining size
The remainder of the available=free+buffers/cached
Total=userd+free+buffers/cached

Three: PS command

View system process PS aux or ps-elf

PID: ID of the process
STAT: Indicates the status of the process, divided into the following types
D a process that cannot be interrupted (usually IO)
R Running Process
S has interrupted the process, usually, most of it is this state
T a process that has stopped or paused
W indicates that there are not enough memory page allocations
X already dead process (as if never appeared)
Z zombie process, can't kill, fight dead garbage process, generally does not appear
< high-priority processes
N Low-priority processes
L was locked in memory paging
S master Process
I Multithreading Process

    • Represents a process that is running in the foreground
      is typically used with a pipe character to view a process or his quantity
      PS aux|grep-c process name
      results in minus 1 for the number of processes because grep itself is a process.

      Four: View network status

      To print information such as network connection status, ports that are open to the system, routing tables, and so on.
      Common commands: NETSTAT-LNP print which ports the current system launches

      Netstat-an Print network connection status

      Tips:
      Netstat-an |awk '/^tcp/{++sta[$NF]} END {for (key in STA) print key, "\ T", Sta[key]} '

      count the number of processes in all States
      focus on the number of established

      V: Linux under Grab pack

      Tcpdump
      Install yum install-y tcpdump
      Catch packet
      tcpdump-nn-i eth0

      The third and fourth columns show which ip+ port is connected to which ip+ port, and the following information is information about the packet
      - I followed the device name
      -nn to let the third and fourth columns appear as IP and port form, not plus display as host name + service name

      -c Specifies the number of packages
      -W writes the specified file, if not added, is displayed as data flow, not packet
      host specified IP
      Port specified ports
      tcpdump-nn-i eth0 host 192.168.233.130 and Port 22-c 100-w 1.cap
      View 1.cap can be Tcpdump-r 1.cap
      also available To download to Windows with Wireshark view.
      Wireshark
      Install yum install-y wireshark
      Usage tshark-n-t a-r http.request-t fields-e "Frame.time"-E "ip.src" -E "Http.host"-E "Http.request.method"-E "Http.request.uri"
      This is similar to a Web Access log.

IO performance, free, PS, view network status, Linux catch-up package

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.