In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
MultiTail is a software used to monitor multiple documents at the same time, similar to tail commands.
The difference between him and tail is that he opens multiple windows in the console, which makes it possible to monitor multiple log documents at the same time.
What is MultiTail?
MultiTail is an open source ncurses utility that can be used to display real-time tail commands in a window or a single shell, which splits the console into the last few lines of log files for more child windows (much like displaying multiple log files to the standard output screen command). It also supports color highlighting, filtering, adding and deleting windows, etc.
Features
Multiple input sources. Use color display of regular expressions in the case of important information. Line filtering. Interactive menus for removing and adding shell.
The multitail command is useful when you want to view multiple files (especially log files) at the same time. It works similar to the tail-f command in the form of multiple windows. That is, it displays the bottom of these files and the new lines added. Although usually easy to use, multitail provides some command-line and interactive options that you should know before you start using it.
Basic multitail usage
The simplest use of multitail is to list the name of the file you want to view on the command line. This command splits the screen horizontally (that is, the top and bottom) and displays the bottom of each file as well as updates.
$multitail / var/log/syslog / var/log/dmesg
The display will be split like this:
+-- +
| | |
| | |
+-|
| | |
| | |
+-- +
Each file has a line showing the file number (starting at 00), file name, file size, date and time when the latest content was added. Each file will be allocated half the space, regardless of its size and activity. For example:
Content lines from my1.logmore contentmore lines00] my1.log 59KB-2019-10-14 12:12:09content lines from my2.logmore contentmore lines01] my2.log 120KB-14:22:29 on 2019-10-14
Please note that if you ask multitail to display non-text files or files that you do not have permission to view, it will not report an error. You just can't see the content.
You can also use wildcards to specify which files to view:
$multitail my*.log
One thing to remember is that multitail will split the screen evenly. If you specify too many files, you will only see the first few lines of the first seven files unless you take additional steps to view the subsequent files (see the scrolling option below). The exact result depends on how many lines are available in the terminal window.
Press Q to exit multitail and return to the normal screen view.
Split the screen
If you prefer, multitail can also split your terminal window vertically (that is, left and right). To do this, use the-s option. If three files are specified, the window on the right side of the screen will be separated horizontally. If you have four files, you will have four windows of equal size.
+-+-+
| | |
| | |
| | +-+
| | |
| | |
+-+-+
2 files, 3 files, 4 files.
If you want to divide the screen into three columns, use multitail-s 3 file1 file2 file3.
+-+
| | |
| | |
| | |
| | |
| | |
+-+
3 files with-s 3 option
Rolling
You can scroll the file up and down, but you need to press b to select the menu, and then use the up and down arrow buttons to select the file you want to scroll through. Then press enter. You can then use the up and down arrows again to scroll through the lines in the enlarged area. Press Q when you are finished to return to the normal view.
Get help
Pressing h in multitail opens a help menu that describes some basic operations, but the man pages provide more information, and if you don't want to learn more about using this tool, please read it carefully.
By default, multitail is not installed on your system, but using apt-get or yum makes it easy for you to install. The tool provides a lot of functionality, but it is based on characters, and the window border is just a string of Q and x. It is very convenient when you need to pay attention to file updates.
Summary
The above is the tutorial of using Multitail command on Linux introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.