You can view CPU usage by using the top command. When you run the top command, the CPU usage status is displayed in full-screen mode and is in a dialog-based top
command, you can control the display mode and so on. The command to exit Top is Q (the Q key is struck once in the top run).
Top explanations are as follows:
1. Role
The top command is used to display the program process in progress, and the permissions are all users.
2. Format
Top [-] [D delay] [Q] [C] [s] [s] [n]
3. Main parameters
D: Specifies the interval of the update, in seconds.
Q: There are no delayed updates. If the user has a superuser, the top command will be executed with the highest precedence.
C: Displays the full path and name of the process.
S: Cumulative mode, which accumulates the CPU time of a child stroke that has completed or disappeared.
S: Safe mode.
I: Do not display any idle (idle) or useless (Zombie) travel.
N: Displays the number of updates and exits top when finished.
Linux top command to view CPU usage