Linux Common Commands

Source: Internet
Author: User
Tags scp command

To view the number of connections

Netstat-nat|grep-i "|wc-l"

Half Open connection number

Netstat-an | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '


Query Source IP Sort

Netstat-antp|grep Tcp|awk ' {print $ $} ' |grep-v ':: ' |cut-d:-f1|sort | uniq-c| Sort-nr|less

Netstat-antp|grep ' 8080 ' |awk ' {print $ ' |grep-v ':: ' |cut-d:-f1|sort | uniq-c| Sort-nr|less


SCP command

scp-p2222 a.tar.gz [Email protected]:/home/zwf/

scp-p2222 [email protected]:/home/zwf/xf.txt.


You can use the command to check the 5 processes with the most memory

PS aux | Sort-k4nr | Head-n 5

Or

Top (then press m, note uppercase)

You can use the command to check the 5 processes with the most CPU

PS aux | Sort-k3nr | Head-n 5

Or

Top (then press p, note capitalization)


Inquire

Netstat-nultp

This article is from the "XFICC" blog, make sure to keep this source http://xficc.blog.51cto.com/1189288/1600528

Linux Common Commands

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.