Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the tips for using TOP commands under Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces Linux TOP command under the use of tips, the text is very detailed, has a certain reference value, interested friends must read!

1. Detailed command display

Press lowercase c: detail command column

That's the effect. The startup command is very complete.

Not only the complete path of the program, but also the parameters of the startup program are displayed.

2. filtration

o: filtering process

When you press o, it asks you to enter the filter criteria.

And then you can type, for example, I remember my own process has a core keyword.

Enter COMMAND=core.

enter

Now all that's left is the fuzzy matching core keyword process.

Note that COMMAND must be capitalized to correspond to the top title bar

For example, filtering shows CPU usage greater than 3

Note: Press = first to delete the previous filter condition

Press o again to fill in the filter conditions: %CPU>2.0

3. Show only one user's processes

Press lowercase u and enter username

Enter, leaving only devops user processes

4. Do not show idle processes

When we troubleshoot, we often want to troubleshoot busy processes, but

Open top, there will be a lot of idle processes displayed below, a little disturbing our line of sight.

Just press I.

Filter out idle processes directly

The world was suddenly clear.

5. Sort a column

This is also a very commonly used operation, such as sorting cpu or mem display

Capital M: Sort memory display

Capital P: Sort CPU display

Capital T: Sort the elapsed time display

Capital N: sort PID display

The above order is in descending order. To reverse the order, press capital R.

6. Further, you can specify any column for sorting

press F

Enter the interface of selecting columns

Select a column and press s to confirm. Then esc quit

There is a small problem, the default interface can not be seen by which column sorting

Press lowercase xb to highlight sort columns in bold

The above is "Linux TOP command use tips what" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report