Introduction to several tools to view System state

Source: Internet
Author: User

Introduction to several tools to view System state


Linux performance analysis is extensive and detailed, please see Man and reference network articles for details of each tool.

One, check the host traffic 1) iftopiftop –n –f  "port 80"   understand the current traffic situation of the service port. iftop –i eth0 –nn  understand the traffic conditions for the specified NIC. 2) Iptraf Image interface 3) netstatnetstat -ant display the corresponding process: Netstat -antp[[email protected] ~]# netstat  -antp |grep  ': tcp        1     '   0 10.0.200.10:39670            23.62.109.17:80             close_wait   3348/clock-applet   tcp        1       0 10.0.200.10:48423            23.62.109.73:80             close_wait   3082/clock-applet   tcp        0       0 :::80                        :::*                          LISTEN       23616/DOCKER-PROXY  4) SS View TCP connection ss -antss -ant src  : The 80 SS -ANT DST 10.0.200.21:80 Plus-P parameter also looks at the corresponding process [[EMAIL PROTECTED] ~]# SS  -antp src :80State      Recv-Q Send-Q                                  Local Address:Port                            &nbsP;       peer address:port listen     0       128                                                :::80                                                 :::*       users: ((" Docker ", 23616,4)) 5) Lsof view processes using the 80 port [[email protected] ~]# lsof -i :80    command     pid user   fd   type device  size/off node nameclock-app  3082 root   15u  ipv4 733274       0t0  TCP 10.0.200.10:48423-> a23-62-109-73.deploy.static.akamaitechnologies.com:http  (close_wait) clock-app  3348 root    15u  IPv4 733273      0t0  TCP  10.0.200.10:39670->a23-62-109-17.deploy.static.akamaitechnologies.com:http  (CLOSE_WAIT) docker     23616 root    4u  IPv6 319706       0t0  TCP *:http  (LISTEN) Second, view System 1) SAR For example: View hard disk status, 1 seconds interval [[email protected]  ~]# sar -d -p 1Linux 3.8.13-16.2.1.el6uek.x86_64  (test79.company.com)       06/08/2015      _x86_64_          (24 CPU) 04:39:00 PM   &Nbsp;   dev       tps  rd_sec/s  wr_sec/s   avgrq-sz  avgqu-sz     await     svctm      %util04:39:01 PM       sdb    1264.58  29166.67  18333.33     37.56      16.59     14.08      0.83     104.3804:39:01 PM       sda       0.00      0.00      0.00       0.00      0.00      0.00       0.00      0.002) Iostat Example: View hard drive status, 1-second interval [[email  Protected] ~]# iostat -d -k -x 1   linux 3.8.13-16.2.1.el6uek.x86_64  ( test79.company.com)       06/08/2015      _x86_64_          (24 CPU) device:          rrqm/s   wrqm/s     r/s     w/s     rkb/s    wkb/s avgrq-sz avgqu-sz   await   svctm  %utilsdb                0.00    18.54  202.34  121.90  7422.97   4829.88    75.58     0.06    0.20    0.45  14.52sda                0.10     1.40    1.67    3.39   197.00    577.35   306.03     0.05    9.50    0.62   0.313) Vmstat[[email protected] ~]# vmstat 1procs  -----------Memory---------- ---swap-- -----IO---- --system-- -----CPU----- R   b   swpd   free   buff  cache    si   so    bi    bo   in    cs us sy id wa st 1  3  75916 1871204  251592 16264876    0    0   321    228    0    0  3  3 92  2   0 5  8&Nbsp; 75916 1871096 251592 16265388    0    0  13712  4304 21781 50339 12  3 70 15  0 1   9  75916 1870600 251592 16265660    0     0 12304  7904 19914 38188 10  3 71 16   0 3  4  75916 1870448 251592 16265952    0     0 11808  5868 15572 32363  7  2 75  15  0 3  0  75916 1870232 251592 16266236     0    0  5264  4516 16314 34406  7   3 82  9  0 6  2  75916 1869892 251592  16266740    0    0  5632  3832 18121 48512  7  3  84  5  0  4) iotoptotal disk read: 11.67 m/s |  Total DISK WRITE: 7.81 M/s  TID  PRIO  USER      DISK READ  DISK WRITE  SWAPIN      IO>    COMMAND                                                                                                                                                                                                    25359 be/4 mysql    1043.11 k/s   857.35 k/s  0.00 % 99.99 % mysqld --defaults-file= Q: Exit R: Reverse sort left and right ARROW key: Sort by a column


Introduction to several tools to view System state

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.