Linux System Management commands-system detection tools

Source: Internet
Author: User
Tags time interval

1, Tcpdump

-N uses an IP address to represent a host, not a hostname; use a number to denote a port number instead of a service name

-i specifies the NIC interface to listen for, "-I any" means fetching packets on all NIC interfaces

-V outputs a slightly more detailed message, for example, to display TTL and TOS information in an IP datagram

-T does not print timestamps

-e Display Ethernet frame header information

-C fetches only a specified number of datagrams

-X Displays the contents of the packet in hexadecimal, but does not display header information for the Ethernet frame in the package

The-X and-X options are similar, but also print the ASCII characters corresponding to each hexadecimal byte

-XX, same as-X, but also prints Ethernet frame header information

-S sets the fetch length when grasping the packet. When the datagram is longer than the fetch length, the tcpdump will fetch the truncated datagram

-S displays the ordinal of the TCP segment, not the relative value, in absolute terms

-W directs the output of tcpdump to a file in a special format

-R reads the datagram information from the file and displays it

2. lsof Display file descriptor

-I displays the socket file descriptor.

-U displays all file descriptors opened by all processes that the specified user initiated

-P Displays all file descriptors for the specified process open

-T displays only the PID of the process that opened the target file descriptor

3, NC is used to quickly build a network connection, let him run as a server, listen to a port and receive customer connections

-I set the time interval for packet delivery

-L runs as server and listens on the specified port

-K repeatedly accepts and processes all connections on a port

-N uses an IP address to represent the host instead of the hostname, using numbers to denote the port number instead of the service name

-P When the NC command is run as client, force it to use the specified port.

4. Strace is an important tool for detecting server performance, which keeps track of the system calls and received signals that are executed during the program run and the system call name. The parameter return value and the signal name are output to the standard output or to the specified file.

-C statistics per system call execution time, number of executions, and number of errors

-F Tracing of child processes generated by fork calls

-T plus time information before each line of output

-e Specifies an expression to control how system calls are traced

5, Netstat Network information statistics tools

Can print all links on the local NIC interface routing table information NIC interface information, etc.

-N uses an IP address to represent the host, not the host name, using numbers to denote the port number instead of the service name

-A monitor socket is also included in the display result

-T shows only TCP links

-R Display Routing information

-I display data traffic for the NIC interface

-c output once every 1s

-O Displays information about the socket timer

-P shows the PID and name of the process to which the socket belongs


6, Vmstat Real-time output system of the use of various resources

-F Displays the number of fork executions since the system was started

-S displays memory-related statistics and the number of activities for various systems

-D Display disk-related statistics

-P displays statistics for the specified disk partition

-S uses the specified units to display

7, Ifstat Simple network traffic monitoring tool

-a monitor all NIC interfaces on the system

-i specifies the NIC interface to monitor

-T adds a timestamp before each line of output information

8, Mpstat Real-time monitoring the use of each CPU on multiprocessor systems


Linux System Management commands-system detection tools

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.