If you don't know how to use this tool, your Linux server is just a decoration!

Hello everyone, my network worker friend

In the area of ​​operation and maintenance, it is difficult to move without tools.

A good Linux operation and maintenance, in order to improve your work efficiency, you will inevitably find some tools that suit your business needs. When you use them, your work efficiency will be high, and your work happiness index will rise sharply.

Today I sorted out a few tools that are extremely useful for operation and maintenance, and are also recognized by the industry as useful tools. If you have never used any of them, you are out!

Today's article reading benefits: "2023 Internet Workers Must-Have Efficient Tools Download"

In addition to the several tools in the article, Mr. Yang also compiled a collection of tools that net workers love most for fans and friends.

Friends who need it, private message me , send the password "Tool 60", and the top 20 will give away a collection of tool resources for free .

01 Tcpdump

Tcpdump is a powerful network monitoring tool that allows users to efficiently filter packets and traffic on the network.

This can get detailed information about TCP/IP and packets transmitted on the network.

When you encounter network protocol problems and are unable to do anything, you can often use tcpdump to see what happened in the network communication process to help quickly locate the problem.

You can also integrate the tcpdump utility with cron to automate various tasks such as logging.

Since its many features make it very versatile, tcpdump can be used as both a troubleshooting tool and a security tool.

02 Top

The summary area of ​​the top command tool displays five areas of system performance information:

Load: time, number of logged-in users, average system load;

process: run, sleep, stop, zombie;

cpu: user state, core state, NICE, idle, waiting for IO, interrupt, etc.;

Memory: total, used, free (system perspective), buffer, cache;

Swap partition: total, used, free

The task area displays by default: process ID, effective user, process priority, NICE value, virtual memory, physical memory and shared memory used by the process, process status, CPU usage, memory usage, cumulative CPU time, and process command line information.

03 Htop

htop is an interactive process viewer for Linux, a text-mode application (in console or X terminal), requires ncurses.

htop allows user-interactive operation, supports color themes, can scroll through the process list horizontally or vertically, and supports mouse operation.

Compared with top, htop has the following advantages:

  • You can scroll through the process list horizontally or vertically to see all processes and complete command lines
  • On startup, faster than top
  • No need to enter the process number when killing the process
  • htop supports mouse operation

04 Vmstat

vmstat (VirtualMeomoryStatistics, virtual memory statistics) is a common tool for monitoring memory in Linux, which can monitor the overall situation of the virtual memory, process, CPU, etc. of the operating system.

General usage of vmstat:

vmstat interval times means sampling once every interval seconds, a total of times sampling times, if times is omitted, data will be collected until the user manually stops. Simply give an example:

You can use ctrl+c to stop vmstat collecting data.

The first line shows the average value of the system since it was started, the second line starts to show what is happening now, the next line will show what happened every 5 seconds interval, the meaning of each column is in the header, as follows:

procs: r This column shows how many processes are waiting for cpu, and column b shows how many processes are sleeping uninterruptibly (waiting for IO).

memory: The swapd column shows how many blocks have been swapped out of disk (page swapping), the remaining columns show how many blocks are free (unused), how many blocks are being used as buffers, and how many are being used Operating system cache.

swap: Shows swap activity: how many blocks are being swapped in (from disk) and swapped out (to disk) per second.

io: Shows how many blocks were read (bi) and written (bo) from the block device, usually reflecting hard disk I/O.

system: Displays the number of interrupts (in) and context switches (cs) per second.

cpu: Displays the percentage of all cpu time spent on various operations, including executing user code (non-kernel), executing system code (kernel), idle and waiting for IO.

Insufficient memory performance:

Free memory has decreased sharply, and recycling buffers and caches is of no avail. Extensive use of swap partitions (swpd), frequent page swaps (swap), increased number of read and write disks (io), increased page fault interrupts (in), and the number of context switches (cs) Increase, the number of processes (b) waiting for IO increases, and a lot of CPU time is spent waiting for IO (wa).

05 iostat

iostat is used to report central processing unit (CPU) statistics and input/output statistics for the entire system, adapters, tty devices, disks, and CD-ROMs. By default, it displays the same cpu usage information as vmstat. Use the following command to display extended Device Statistics:

The first row shows the average since system boot, and then the delta average, one row per device.

The abbreviation habit of common linux disk IO indicators: rq is request, r is read, w is write, qu is queue, sz is size, a is verage, tm is time, svc is service.

rrqm/s and wrqm/s: Combined read and write requests per second, "combined" means that the operating system takes multiple logical requests from the queue and merges them into one request to the actual disk.

r/s and w/s: The number of read and write requests sent to the device per second.

rsec/s and wsec/s: The number of sectors read and written per second.

avgrq –sz: number of requested sectors.

avgqu –sz: The number of requests waiting in the device queue.

await: The time spent on each IO request.

svctm: actual request (service) time.

%util: Percentage of time spent with at least one active request.

06 dstat

dstat shows the cpu usage, disk io status, network packet sending status and page changing status. The output is colored and readable. Compared with the input of vmstat and iostat, it is more detailed and intuitive. When in use, just enter the command directly, of course you can also use specific parameters.

As follows: dstat –cdlmnpsy

07 PulseAudio

One of my favorite features of modern Linux is PulseAudio. Pulse offers amazing flexibility for audio on Linux, including automatic discovery of local network streams.

For me, the benefit of this feature is that I can play podcasts and tech conference videos on my work site in the office, and then play those audios from my phone.

This ability existed long before PulseAudio, but Pulse makes it even easier.

Before using, first, you must ensure that the PulseAudio preferences (paprefs) package is installed so that you can enable network audio in your PulseAudio configuration.

In paprefs, enable network access to local sound devices, probably without authentication, and enable your computer last night playback/RTP sender.

08 Samba

Samba is a kind of free software, which is used to connect the UNIX series operating system with the SMB/CIFS (Server Message Block/Common Internet File System) network protocol of the Microsoft Windows operating system.

Although mostly low-level code, many users never bother to use it, but its importance cannot be underestimated.

The project ensures that Linux and Windows computers can easily run on the same network, in other words, Samba makes it easy to share files over a local network, regardless of the platform used.

On the KDE Plasma desktop, you can right-click on any directory option and select Properties. In the Properties dialog box, click the Sharing tab and select "Share with Samba (Microsoft Windows)".

Just like that, a directory with read-only access has been opened for users on the local network.

This means that when you're at home, anyone on the same WiFi network in your home can access this folder, and of course, to access it, other users need to know where to find it.

The computer's path can be expressed as an IP address or as a hostname (depending on your network configuration).

Finishing: Lao Yang 丨 10-year senior network engineer, more network workers to improve dry goods, please pay attention to the official account: Network Engineer Club

Guess you like

Origin blog.csdn.net/SPOTO2021/article/details/132534066