Monitor 7 command line tools in Linux

Source: Internet
Author: User

Monitor 7 command line tools in Linux

Here are some basic command line tools that allow you to more easily explore and operate Linux.

Image courtesy Meltys-stock

 

In-depth

One of the best things about Linux is that you can go deep into the operating system, explore how it works, and find opportunities to fine tune performance or diagnose problems. Here are some basic command line tools that allow you to more easily explore and operate Linux. Most of these commands have been built in your Linux system, but if they do not exist, use Google to search for the command name and your release name, you will find the packages to be installed (note that some commands are bundled with other commands to form a package, and the package you are looking for may contain other names ). If you know some other tools you are using, please comment.

 

How do we get started?

Note: This article is taken from a virtual machine running in Oracle VirtualBox 4.3.28 under OS X 10.10.3 ("Yosemite") On Debian Linux 8.1 ("Jessie. To create your Debian virtual machine, please refer to my tutorial-"How to install Debian under VirtualBox VM ".

 

Top

As an easy-to-use Linux system monitoring tool, the top command can take us to a list of almost everything in Linux. The following figure shows its default Interface, but you can change the display color by pressing the "z" key. Other hotkeys and commands have other functions, such as displaying summary information and memory information (second in line 4 ), sort and terminate process tasks according to different conditions (you can find the complete list here ).

 

Htop

Compared with top, its alternative Htop is more refined. Wikipedia describes this as follows: "users often deploy htop to prevent Unix top from providing sufficient information about system processes, for example, when you try to find a small memory leak in the application, Htop can also be used as a system listener. Compared with top, it provides a more convenient cursor control interface to send signals to processes ." (For more details, click here)

 

Vmstat

Vmstat is a simple tool for monitoring Linux system performance data, which makes it more suitable for use in shell scripts. Use vmstat and cron to do some exciting things. "The following report shows the average value after the previous system restart, And the other report shows the information in the interval from the previous report. Other processes and Memory reports are transient. "(Click here to get more information ).

 

Ps

The ps command displays the list of running processes. In this case, we use the "-e" option to display each process, that is, all running processes (I scroll the list to the front, otherwise the column name will not be seen ). This command has many options that allow you to format the output as needed. You only need to use the above-mentioned Regular Expression skills to get a powerful tool. Click here to obtain more information.

 

Pstree

Pstree "displays running processes in a tree. The process tree uses a pid as the root node. If the pid is omitted, the tree uses init as the root node. If the user name is specified, all process trees are displayed with the process to which the user belongs as the parent process ." You can use a tree chart to classify the relations between processes. This is indeed a very effective tool (Click here ).

 

Pmap

In the debugging process, it is vital to understand how an application uses memory, and pmap displays relevant information when giving a process ID. The above shows some outputs produced by using the "-x" option. You can also use the "-X" option of pmap to obtain more details, but only if you have a wider terminal window.

 

Iostat

A crucial performance indicator for Linux systems is the CPU and storage usage, which is also reported by the iostat command. Like the ps command, iostat has many options that allow you to select the output format you need. In addition, you can sample multiple times in a certain period of time. Click here for details.

Via: http://www.networkworld.com/article/2937219/linux/7-command-line-tools-for-monitoring-your-linux-system.html

Author: Mark jobs Translator: ZTinoZ Proofreader: wxy

This article was originally translated by LCTT and launched with the Linux honor in China

This article permanently updates the link address:

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.