Skip to content

How to Monitor System Activity in linux top Command

How to Monitor System Activity in linux top Command
Share

Reading Time: 3 minutes

In this tutorial “How to Monitor System Activity in linux top Command”, we will explain how you can use top commands in Linux and monitor system activity. The TOP command shows the summary information of the system and the list of processes or threads that the Linux Kernel currently manages

What is TOP Command in Linux

You can use top commands in Linux and monitor system activity. The TOP command shows the summary information of the system and the list of processes or threads that the Linux Kernel currently manages. The TOP command in Linux provides a summary of system information and a list of processes or threads managed by the Linux Kernel. It is a powerful tool for monitoring system activity.

How to Monitor System Activity in Linux Using ‘top’ Command

To monitor system activity, execute the command ‘$ top’ in the terminal. The displayed information includes process ID (PID), process priority (PR), virtual memory usage (VIRT), user name (USER), CPU usage (%CPU), CPU time (TIME+), shared memory size (SHR), Nice Value (NI), memory usage (%MEM), physical RAM usage (RES), and the command that initiated the process (COMMAND).

To monitor system activity in Linux, utilize the ‘top’ command in the terminal. Execute ‘$ top’ to access a summary of system information and a list of processes, displaying key details such as CPU usage, memory usage, and process IDs. Use ‘top -c’ to reveal complete commands and ‘top -u root’ for user-specific process details.

$ top

  • PID: This Shows task’s unique process id.
  • PR: The process’s priority. The lower the number, the higher the priority.
  • VIRT: Total virtual memory used by the task.
  • USER: The user name of the owner of the task.
  • %CPU: Represents the CPU usage.
  • TIME+: CPU Time, the same as ‘TIME’, but reflecting more granularity through hundredths of a second.
  • SHR: Represents the Shared Memory size (kb) used by a task.
  • NI: Represents a Nice Value of task. A Negative nice value implies higher priority, and a positive Nice value means lower priority.
  • %MEM: Shows the Memory usage of the task.
  • RES: How much physical RAM the process is using, measured in kilobytes.
  • COMMAND: The name of the command that started the process.
How to Monitor System Activity in linux top Command

How to Monitor System Activity in linux top Command

How to check the complete command using top

$ top -c

You can use ‘top -c’ command to get the running process’s complete command and this will help you to find the exact process. You can find all “Linux” tutorial on this page

How can I get information on a specific user’s processes using ‘top’?

For user-specific process details (e.g., root), use ‘$ top -u root’ to focus on monitoring processes associated with the specified user.

$ top -u root

How do I check the complete command using ‘top’?

Use ‘top -c’ to retrieve the complete command of running processes, aiding in process identification.

You can also find all our Articles on Linkedin

Conclusion

Effectively leveraging the ‘top’ command empowers Linux system administrators and users to identify bottlenecks, troubleshoot performance issues, and ensure optimal resource utilization. By following this comprehensive guide, readers will gain a solid understanding of how to harness the power of ‘top’ for efficient system monitoring in Linux.

Remember to adapt the content based on the depth and target audience of your readers. We hope this tutorial “How to Monitor System Activity in linux top Command” explains you well however please let us know if any query.


Share

Leave a Reply

Your email address will not be published. Required fields are marked *