Linux system management commands-system detection tools and linux System Management

Source: Internet
Author: User
Tags add time

Linux system management commands-system detection tools and linux System Management

1. tcpdump

-N: the IP address is used to indicate the host, not the host name. The number is used to indicate the port number, not the service name.

-I indicates the interface of the NIC to be monitored. "-I any" indicates that packets on all interfaces of the NIC are captured.

-V outputs a slightly detailed information, for example, displaying the TTL and TOS information in the IP Datagram

-T: No timestamp is printed.

-E: Display Ethernet frame header information

-C: only capture a specified number of data packets

-X displays the packet content in hexadecimal notation, but does not display the header information of the Ethernet frame in the packet.

The-X option is similar to the-x option, but the ASCII characters corresponding to each hexadecimal byte are also printed.

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

-S: Specifies the capture length during packet capture. When the length of the datagram exceeds the capture length, tcpdump captures the truncated datagram.

-S displays the serial number of the TCP packet segment in absolute values, rather than relative values.

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

-R reads and displays the datagram information from the file

2. lsof displays the file descriptor

-I: displays the socket file descriptor.

-U: displays all file descriptors opened by all processes started by the specified user.

-P: displays all file descriptors opened by the specified process.

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

3. nc is used to quickly build a network connection so that it can run as a server, listen to a port, and receive client connections.

-I: set the time interval for data packet transmission.

-L runs as a server and listens to the specified port

-K repeatedly accepts and processes all connections on a port

-N: the IP address is used to indicate the host, not the host name. The number is used to indicate the port number, not the service name.

-P: When the nc command is run as a client, force it to use the specified port,

4. strace is an important tool for detecting server performance. It tracks the system calls and received signals executed during the running of the program, and name the system calls. Parameter return values and signal names are output to standard output or specified files.

-C: Calculate the invocation time, number of executions, and number of errors of each system call.

-F tracks the sub-processes generated by fork calls.

-T add time information before each output line

-E specifies an expression to control how to track system calls.

5. netstat network information statistics Tool

You can print all the link route table information on the local Nic interface. Nic interface information, etc.

-N: the IP address is used to indicate the host, not the host name, and the number is used to indicate the port number rather than the service name.

-The result displayed by a also contains a listener socket.

-T: Only TCP links are displayed.

-R: Display route information

-I: displays the data traffic of the NIC interface.

-C Outputs every 1 s

-O: Display socket timer Information

-P: displays the PID and name of the process to which the socket belongs.


6. vmstat outputs the usage of various resources of the system in real time.

-F indicates the number of fork executions since the system was started.

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

-D: Displays disk-related statistics.

-P: displays statistics of the specified disk partition.

-S is displayed in the specified unit.

7. ifstat Simple Network Traffic Monitoring Tool

-A: All Nic interfaces in the monitoring system

-I: Specify the NIC interface to be monitored

-T add a timestamp before the output of each row

8. mpstat monitors the usage of each CPU on a multi-processor system in real time



For more information about Linux, see the command list!

The Linux system information mentioned above is detailed in the command list.

Common backup methods for Linux application servers are as follows:

System backup is a very important part of system management. This article describes in detail the backup methods of various Linux systems, and I believe it will be helpful for your daily management work.

Backup is an important task, but many people do not. Once data is lost due to improper use, backup becomes a real life-saving person. This article will discuss how to set backup policies and how to select backup media, and introduce tar and cpio tools for backup.

Set backup policy

Setting backup policies and schedules increases the possibility of backup. Before the backup starts, determine the data to be backed up, the backup frequency, and the media used for backup. Full backup should be performed during Backup.

Backup is usually scheduled in idle time. In most systems, the minimum number of users is allowed, and the minimum number of files is allowed. Because the backup takes up some system resources, the user will find the system slow response when running the backup.

If a Linux computer has only one user, you can back up the entire system once a week or month. If there are critical files, they should be systematically copied to a removable disk.

Before backup, make sure that the backup device is correctly set. Most tape backup systems can be correctly installed. After the system starts, open a terminal window and enter the following command: $ dmeg less

Scroll through the list and find the driver for your tape system. If no driver is found, a component driver needs to be loaded.

If a Linux server is running, a backup plan is required, but this does not mean that everything is backed up every day. There are only a few items in the system that need to be backed up every day. The items to be backed up are listed below:

User Files: User Files in the/home directory are backed up every day.

Configuration File: the configuration files in the/etc and/var directories do not need to be backed up frequently. You can back up the files once a week or every month, depending on the frequency of configuration changes.

Program Files: The program files in the/usr and/opt directories rarely change. After installation, make a backup. Generally, program files can be easily recovered from the original installation disk.

Select backup media

There are multiple options for storing backups. The following describes some optional backup media:

Floppy Disk: If you want to quickly back up important files or take them to your home, the floppy disk is still an optional backup medium.

Disc writer: As the disc writer becomes more reliable, the price is getting lower, and the disc itself is also very cheap. One advantage of this option is that the disc is not easily damaged and its backup reliability is high. There are two disadvantages to using the CD Writer: they are slow and can only be saved about 650 MB.

Rewritable disc: the rewritable disc drive is much more expensive than the disc writer and works in a similar way. However, these discs can be rewritten, and they are much more expensive than only one write. Other features of the rewritable disc are similar to those of the disc writer.

Jaz and Zip: Zip drives are popular and have become the standard configuration for many PCs, and their disks and drives are not expensive. One disk can hold MB of data, which is a good choice for fast and removable backup. The Jaz disk can accommodate GB of data and use more advanced technologies for better performance. The Jaz drive and the Jaz disk are both expensive. Both Jaz and Zip are prone to damage and the retention time is relatively short.

Tape drive: the tape backup device is the standard configuration for most Linux servers. Tape is reliable and rarely produces errors. It takes almost a longer time to store than other media. For point-to-point workgroup networks and medium-sized networks, Travan and high-end digital audio tapes (DAT) are usually the best choice. The compression of the Travan drive can process 8 GB of data, which is sufficient for a small network with 5-10 PCs. The DAT drive delivers better performance and can process 24 GB of data. DAT drives are more expensive than Travan drives, but they are cheaper than Travan QIC tape volumes ....... Remaining full text>

In Linux, how does one use commands to check system hardware configuration?

Cat/proc/cpuinfo view CPU
Cat/proc/meminfo view memory
Fdisk-l view Hard Disk
I just got in touch with you. I don't know if it's right for you.

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.