Linux Top Commands: How to List System CPU Core/Threat Usage, Users, Memory usage, etc.
Published on Aug. 22, 2023, 12:14 p.m.
Linux top command is used to monitor system resources and usage in an elegant way.
When we start the top command the processes are listed with lots of information like users, memory usage, etc. You can see it in the %CPU column. The process list is updated 2 seconds intervals. It is based on the CPU usage for the last 3 seconds.
$ top
How to List System CPU Core/Threat Usage
We can list the CPU usage for separate cores. Press 1 to list all CPU and CPU usage information.
How to List Processes For Specific User Owner
We can list a specific user process by providing the user name and filtering it. The -u option is used to filter certain users.
$ top -u ismail
How to Export/Save CPU Usage To A File
In the following example , we put the process list with the CPU usage information into a txt file.
$ top -n 1 -b > top_cpu.txt
$ cat top_cpu.txt