The server feels slow and someone asks you the dreaded question: is it the network, or is the box itself struggling? Two quick checks answer most of it. One tells you who is eating the bandwidth. The other tells you whether the CPU is queueing up work it can’t get to.
For the first, three small tools do the job: nload, iftop and nethogs. For the second, you need to read the load average properly, which most people only half understand. This post covers both, and finishes with a three-command routine you can run the next time someone says “it’s slow”.
Everything was run on Ubuntu 26.04.1 LTS and AlmaLinux 10.2, so the commands apply to Ubuntu, Debian and the RHEL family. Hosts, process IDs and numbers will differ on your server.
Install iftop, nload and nethogs
All three are small packages. On Ubuntu and Debian they live in the standard repositories:
sudo apt update
sudo apt install iftop nload nethogs
On RHEL, AlmaLinux and Rocky they come from EPEL, so enable that first:
sudo dnf install epel-release
sudo dnf install iftop nload nethogs
Next, find the name of your network interface. It’s eth0 on my test machines, but real servers often use names like ens3 or enp1s0:
ip -br link
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
eth0 UP 00:15:5d:c6:a5:c3 <BROADCAST,MULTICAST,UP,LOWER_UP>
Pick the one that’s UP and isn’t lo. I’ll use eth0 below, so swap in your own name.
To get something to measure, I started a big download in another terminal. Any large file works:
curl -s -o /dev/null https://ash-speed.hetzner.com/100MB.bin
nload: Is the Link Busy Right Now?
Start here when you only want one answer: how much is flowing in and out? nload draws two live graphs, incoming on top and outgoing below.
nload -u M eth0
-u M shows MByte/s instead of the default bits, which is easier to compare with file sizes. The numbers panel next to each graph looked like this mid-download:
Incoming: Curr: 2.73 MByte/s Avg: 3.61 MByte/s Min: 1.51 MByte/s Max: 7.40 MByte/s Ttl: 172.99 MByte
Outgoing: Curr: 0.02 MByte/s Avg: 0.02 MByte/s Min: 0.01 MByte/s Max: 0.04 MByte/s Ttl: 1.27 MByte
Read it like this: Curr is right now, Avg is since you started, and Ttl is the total moved since the interface came up. A big Ttl with a quiet Curr means traffic already happened. A big Curr means it’s happening live. Press q to quit. If you have several interfaces, the arrow keys switch between them.
What nload can’t tell you is who is talking. That’s the next tool.
iftop: Which Hosts Are Talking?
iftop is top for connections. It lists every pair of hosts and how much they’re exchanging, sorted by traffic. It needs root because it reads raw packets:
sudo iftop -i eth0
The interactive screen is great, but for a copy-paste friendly view use text mode. -n skips DNS lookups (faster, and no extra traffic), -N shows port numbers, and -s 6 collects six seconds of data and then exits:
sudo iftop -n -N -i eth0 -t -s 6
# Host name (port/service if enabled) last 2s last 10s last 40s cumulative
--------------------------------------------------------------------------------------------
1 172.21.3.249:40114 => 181Kb 142Kb 142Kb 107KB
5.161.7.195:443
Two things trip people up here. First, the arrows: => is data leaving this machine, <= is data coming in. Second, the units. iftop shows bits per second (Mb), while nload above showed bytes. 28.7 megabits is about 3.6 megabytes a second, which matches nload's reading, so the two tools agree.
A few keys worth knowing in the interactive view: n toggles DNS names, P shows ports, p pauses the screen, and q quits. To watch just one service, add a filter, for example sudo iftop -i eth0 -f "port 443".
nethogs: Which Process Is Using the Bandwidth?
iftop gives you an IP address. Sometimes you need a program name. nethogs groups traffic by process instead of by host, which is exactly what you want when you suspect a backup job, a runaway script or a stray container.
sudo nethogs eth0
Trace mode prints plain text, one line per process, which works fine over SSH and in logs. -c 4 means four refreshes:
sudo nethogs -t -c 4 eth0
Refreshing:
curl/2930/1000 6.35273 1234.13
unknown TCP/0/0 0 0
Refreshing:
curl/2930/1000 12.9988 2087.53
unknown TCP/0/0 0 0
Refreshing:
curl/2930/1000 17.309 2804.35
unknown TCP/0/0 0 0
Each line is program/PID/user-ID, then KB/s sent, then KB/s received. So curl, process 2930, running as user 1000, pulled in about 2.8 MB/s by the third refresh. The ramp-up shows nicely too: 1.2 MB/s, then 2.0, then 2.8.
You'll often see an unknown TCP line. That's traffic nethogs can't map to a process, such as connections that closed before it noticed them. A small number there is normal.
Which Network Tool Should You Use?
| Your question | Reach for |
|---|---|
| Is the interface busy right now? | nload |
| Which remote hosts are we talking to? | iftop |
| Which program is responsible? | nethogs |
| What connections are open at all? | ss -tupn |
In practice you go left to right. nload says "yes, something's flowing", iftop says "to this address", nethogs says "from this process".
Linux Load Average Explained
Now the other half. Run uptime and you get three numbers:
uptime
20:04:09 up 3:02, 1 user, load average: 0.67, 1.29, 0.65
Those are the average load over the last 1, 5 and 15 minutes. The same figures sit in /proc/loadavg, which is where uptime reads them from.
"Load" is a count of tasks that want to run. On Linux that means processes that are running on a CPU, waiting for a CPU, or stuck in uninterruptible sleep (usually waiting on disk or an NFS mount). So the load average is not CPU percentage. It's closer to the average length of the queue.
That's why the number means nothing until you compare it with your core count:
nproc
22
On a 1-core server, a load of 1.0 means the CPU is fully used, and 3.0 means two extra tasks are waiting every moment. On a 4-core server, 3.0 is comfortable. A decent rule of thumb is that sustained load below about 0.7 per core is healthy, near 1.0 per core is full, and well above that means queueing.
Let me show it rather than claim it. My test machine has 22 cores, so I forced the issue: four busy processes, pinned to just two cores with taskset:
for i in 1 2 3 4; do taskset -c 0,1 yes > /dev/null & done
ps -eo pid,stat,pcpu,psr,comm --sort=-pcpu | head -5
PID STAT %CPU PSR COMMAND
2979 R+ 50.2 0 yes
2982 R+ 49.9 1 yes
2980 R+ 49.8 1 yes
2981 R+ 49.8 0 yes
Four tasks share two cores, so each gets about half a core. The R in the STAT column means running or ready to run. Now watch the load average climb:
20:04:55 up 3:03, 1 user, load average: 2.43, 1.67, 0.81
20:05:40 up 3:04, 1 user, load average: 3.26, 2.00, 0.97
The 1-minute number moves first and fastest, heading for 4. The 5 and 15 minute numbers lag behind. Then I killed the processes and waited a minute:
20:06:40 up 3:05, 1 user, load average: 1.20, 1.63, 0.90
The 1-minute figure fell from over 3 to 1.2, while the 15-minute one barely moved. That gives you a quick way to read the trend:
- 1-minute higher than 15-minute: load is rising. Something just started.
- 1-minute lower than 15-minute: load is falling. The problem may already be over.
- All three high and similar: a steady problem, not a spike.
High load but the CPU looks idle?
This one confuses everybody the first time. Because Linux counts tasks stuck waiting on I/O, you can have a load of 15 with the CPU nearly asleep. Look for processes in the D state:
ps -eo state,pid,comm | awk '$1 ~ /^[RD]/'
Lots of R means CPU pressure. Lots of D means something is waiting on a slow disk, a full volume or a hung network mount. In top, the wa value on the %Cpu(s) line backs that up.
Putting Both Together: Is It the Network or the Server?
Next time someone reports slowness, run these three in order:
uptime # is the load above your core count?
sudo iftop -n -i eth0 # is the link saturated, and by whom?
sudo nethogs eth0 # which process is behind it?
Here's how to read the combinations. High load and a quiet network means the problem is local: CPU, disk or memory. A busy network and low load means you're short on bandwidth, not processing power. Both high, and you probably have one busy process doing both, which nethogs will name. Both quiet and the app is still slow? Look at the application itself, or at the database behind it.
Setup Confirmation
Before relying on the tools, confirm that they installed and run. First the binaries:
command -v iftop nload nethogs
/usr/sbin/iftop
/usr/bin/nload
/usr/sbin/nethogs
Same paths on Ubuntu 26.04.1 and AlmaLinux 10.2. Now the installed versions. On Ubuntu:
dpkg-query -W -f='${Package} ${Version}\n' iftop nload nethogs
iftop 1.0~pre4-10
nethogs 0.8.8-1
nload 0.7.4-2build4
On AlmaLinux:
rpm -q iftop nload nethogs
iftop-1.0-0.34.pre4.el10_0.x86_64
nload-0.7.4-30.el10_1.x86_64
nethogs-0.8.8-1.el10_1.x86_64
The real test is whether they see traffic. Start a download, run sudo iftop -n -N -i eth0 -t -s 6, and you should see the remote host with a receive rate well above zero, as in the iftop section above. On AlmaLinux the same test showed a total receive rate of 31.6Mb, and nethogs listed curl with 2.8 MB/s received. If your host row shows traffic and nethogs names the process, the setup works. There's no web page here, so terminal output is the proof.
Frequently Asked Questions
Why do iftop and nethogs need sudo?
They capture raw packets from the network interface, which only root can do by default. You can grant the capabilities to a single binary with setcap if you want to avoid running them as root, but on a shared server plain sudo is the simpler and safer habit.
What is a good load average for my server?
Divide the load by the number of cores. Around 0.7 or below per core is comfortable, 1.0 per core is fully used, and anything sustained above that means tasks are waiting. A load of 8 on an 8-core machine is busy. The same 8 on a 2-core machine is a problem.
Does network traffic raise the load average?
Not directly. Load counts tasks waiting for CPU or uninterruptible I/O. Heavy traffic can raise it indirectly, for example when a process spends CPU encrypting data or blocks on a slow NFS mount, but a saturated link with low load is perfectly possible.
Why does iftop show megabits and nload megabytes?
iftop reports bits per second by default, which is how network speeds are usually quoted. nload can show either, and -u M picks megabytes. Divide bits by eight to compare them.
Can I use these tools inside Docker containers?
Yes, but run them on the host, or in a container with --net=host. Inside an isolated container you only see that container's own interface. On the host, nethogs shows container processes by their host process names.
What is a Linux load average of 0.00?
It means nothing is waiting to run and nothing is blocked on I/O. A completely idle machine sits very close to zero.
Where to Go Next
Run uptime on a few of your servers today and divide by nproc. It takes ten seconds and gives you a baseline for next time. If you want the wider picture of metrics, logs and alerts, Linux Monitoring: Metrics, Logs, Traces and Alerts shows how these single-machine checks fit into proper monitoring. The man pages for iftop and /proc/loadavg cover the options we skipped.