![Forrest logo](/images/logo.png)
nettop:tldr:eb315
The nettop command is a command-line utility in macOS that provides real-time network monitoring and displays network activity statistics. It allows you to view and analyze network connections and the corresponding data transfer rates between different processes on your system.
When you run the nettop command, it presents a dynamic and interactive view of network activity, similar to the 'top' command which shows CPU and memory usage. The output is updated continuously, allowing you to monitor network connections and traffic in real-time.
The nettop utility displays various information columns such as process identifier (PID), process name, source and destination IP addresses, port numbers, network interface, transfer rates, and more. It also indicates the state of connections (e.g., established, closed, listening).
You can use nettop to identify which processes or applications are sending or receiving network data, as well as monitor bandwidth usage, detect network anomalies, troubleshoot network issues, and investigate suspicious network activities.
The command provides several options to customize the nettop output, such as filtering the displayed information, sorting columns, and adjusting the refresh rate. By using these options, you can focus on specific network connections or processes and obtain a more targeted and detailed network monitoring experience.
Overall, nettop is a powerful command-line tool for monitoring live network traffic and gaining insights into network utilization and connectivity on your macOS system.