Linux Learning Summary (23) System Management Tips 2

Source: Internet
Author: User

1 Monitoring IO Performance

Nload-x

The%util key number is too large to indicate poor IO performance, which may be disk aging, or the disk itself fails.
The Iotop command is also dynamically displayed, similar to top, to see how fast the disk reads and writes
View Memory usage

2 free-h

View memory conditions

Here's a relationship:
Toal=used+free+buff/cache
Avavilable=free+ the remaining Buff/cache
So look at the rest of the memory, available-based, you can assume that both free and used are defined by physical memory

3 PS Viewing process

ps aux |grep mysqlFilter out a process
A displays all programs under the current terminal, including other users ' programs
U display program status in user-oriented format
X Show All programs, not the terminal to distinguish
Filter out a process
Usage: PS aux or ps-elf

STAT Section Description
D a process that cannot be interrupted
The process of R run state
The process of the S sleep state
T paused process
Z Zombie Process
< high-priority processes
N Low-priority processes
Memory paging is locked in memory
S master Process
L Multithreading Process
+ Foreground Process

4 netstat

Monitoring network status, listening port
netstat -lnp
-l lists only the service states that are in Listen (listening)
-N refuses to display aliases, showing all numbers converted to numbers
-P Displays the program name that establishes the associated link
NETSTAT-LNP |grep + port number or service name
You can see if a service is started, or you can view the process with PS
netstat -ltnpView Only TCP
netstat -lunpView Only UDP

Netstat-an List all port states

If the server you are administering is a server that provides Web services (80 ports), you can use Netstat-an |grep 80 to see what IP is currently connected to the Web service
Little Tricks
netstat -an |awk ‘/^tcp/ {++sta[$NF]} END {for(key in sta) print key,"\t",sta[key]}‘

Count the listening state and the number of connection states at the beginning of the TCP

5 Tcpdump Grab Bag tool

Tcpdump-nn-i + NIC Name

Let's focus on the third and fourth columns, which one ip+port is connecting which ip+port

Linux Learning Summary (23) System Management Tips 2

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.