User Tools

Site Tools


unix_commands:top

The top command in Linux and Unix-like systems like FreeBSD is used to display real-time information about the system's processes, including the CPU and memory usage, process IDs, and other system statistics. It provides an interactive, scrolling view of the processes running on a system, sorted by the amount of system resources they are using.

Here are a few examples of how the top command can be used in Linux and FreeBSD:

  1. Display real-time information about system processes: top
  2. Display real-time information about a specific process by its PID : top -p PID
  3. in Linux sort the process by memory usage instead of CPU usage : top -o %MEM
  4. in FreeBSD sort the process by memory usage instead of CPU usage : top -o size
  5. Display real-time information about all processes and threads: top -H

The top command without any options will display real-time information about all processes running on the system, sorted by the percentage of CPU usage. The -p option can be used to display real-time information about a specific process by its PID. The -o option can be used to sort the process by memory usage instead of CPU usage. The -H option can be used to display real-time information about all processes and threads running on the system

Please note that the options for top command may vary depending on the version of Linux or FreeBSD installed. Please review the man pages for more options.

Top command is very useful for monitoring the performance of the system, it's widely used by system administrators for troubleshooting and performance tuning

unix_commands/top.txt ยท Last modified: 2023/01/18 13:20 by admin

CIFNet is a leading hosting solution provider, offering a wide range of services including IP bandwidth, co-location, VMware and KVM hosting.
Host Your Site with CIFNet!