Linux for Developers Course
Linux for Developers
/
Intermediate

System Monitoring

Definition

The continuous observation of a Linux system's resource utilization (CPU, RAM, Disk I/O, Network traffic) using tools like `top`, `vmstat`, `iostat`, and `free`.

Explain Like I'm New

Taking the vital signs (heart rate, blood pressure) of the server to make sure it isn't having a heart attack.

Real World Example

A database is responding incredibly slowly, but CPU usage is low. The admin runs `iostat`. The tool reveals that the physical Hard Drive is at 100% capacity trying to read/write data. The admin realizes they need to upgrade to a faster SSD.

Common Use Cases

  • •Performance tuning
  • •Bottleneck identification

Interview Questions

basic

  • What simple command instantly shows you exactly how much total RAM is installed on the server and how much is currently free?

intermediate

  • If a Linux server uses 95% of its RAM, but the `free` command shows almost all of it is being used for 'buff/cache', should you be worried?

Flash Cards

Question

Which RAM command?

Click to reveal answer
Answer

`free -m` (or `free -h`).

Question

Worried about cache?

Click to reveal answer
Answer

No! Linux is designed to intentionally hoard free RAM and use it to cache hard drive files to speed up the system. If a real application suddenly needs that RAM, Linux will instantly dump the cache and give it to the app. Unused RAM is wasted RAM.