What to do if the top command in Linux is not fully displayed

WBOY
Release: 2022-05-31 18:19:11
Original
8796 people have browsed it

Method: 1. Set the "-w" parameter of the top command, the syntax is "top -parameter-w..."; 2. Set the "-c" parameter of the top command, this parameter can switch the results The display mode can display the complete path and name in the result, and the syntax is "top -c".

What to do if the top command in Linux is not fully displayed

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What to do if the top command in Linux is not fully displayed

The Linux top command is used to display the dynamics of the process in real time.

Usage permissions: all users.

Syntax

top [-] [d delay] [q] [c] [S] [s] [i] [n] [b]
Copy after login

Parameter description:

  • d: Change the display update speed, or press s in the interactive command bar (interactive command)

  • q: Display speed without any delay. If the user has superuser permissions, top will be executed with the highest priority

  • c: Switch the display mode, there are two modes, one is to display only the name of the executable file, the other is to display the complete path and name

  • #S: Accumulation mode, will Accumulate the CPU time of completed or disappeared child processes (dead child processes)

  • s: Safe mode, cancel conversational instructions to avoid potential crises

  • i: Do not display any idle or useless processes

  • n: Number of updates, top will be exited after completion

  • b: Batch file mode, used with the "n" parameter, can be used to output the top results to the file

The example is as follows: Use python's paramiko to obtain the top information of Linux

The command is:

top -b -n 1
Copy after login

-b is the batch mode, -n is the number of refreshes

1. It is found that the information is not displayed completely. Finally, man top, after adding a parameter w, it will be fully displayed

top -b -n 1 -w 512
Copy after login

2. If you need to display the complete COMMAND command, use the top -c parameter

top -c
Copy after login

What to do if the top command in Linux is not fully displayed

Recommended learning:Linux video tutorial

The above is the detailed content of What to do if the top command in Linux is not fully displayed. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!