codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

Ā© 2026 codingstuff.io. All rights reserved.

Built with ā¤ļø for developers everywhere

/
/
All Tutorials
🐧

Linux & Bash

30 / 60 topics
29Cron Jobs30System Monitoring31Log Management
Tutorials/Linux & Bash/System Monitoring
🐧Linux & Bash

System Monitoring

Updated 2026-05-15
10 min read

System Monitoring

Introduction

In the world of Linux, understanding how to monitor your system's performance and resource usage is crucial for maintaining optimal operations. Whether you're a beginner or an intermediate developer, being able to track CPU usage, memory consumption, disk I/O, and network activity can help you troubleshoot issues and optimize your system.

This tutorial will guide you through the basics of system monitoring using Linux commands and tools. We'll cover how to monitor various aspects of your system, including CPU, memory, disk, and network performance.

Concept

System monitoring involves keeping track of various metrics that indicate the health and performance of your system. These metrics can include:

  • CPU Usage: The amount of time the CPU spends executing tasks.
  • Memory Usage: The amount of RAM being used by processes.
  • Disk I/O: Input/output operations on disk drives.
  • Network Activity: Data transfer rates over network interfaces.

By monitoring these metrics, you can identify bottlenecks and optimize your system for better performance.

Examples

Monitoring CPU Usage

To monitor CPU usage, you can use the top command. This command provides a real-time view of the running processes and their resource usage.

Terminal
Output
total        used        free      shared  buff/cache   available
Mem:           7.5G        2.3G        120M        2.0G        5.1G        4.9G
Swap:          2.0G          0B        2.0G

Info

The available column indicates the amount of memory that can be given instantly to processes without the system going into swap.

Monitoring Disk I/O

To monitor disk I/O, you can use the iostat command. This command provides detailed information about input/output operations on disk devices.

Terminal
Output
1.23Kb                2.46Mb                4.92Mb
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│     to      │ from        │   rate      │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ 192.168.1.1 │ 10.0.0.1    │ 1.23Kb/s    │
│ 192.168.1.2 │ 10.0.0.2    │ 2.46Mb/s    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Info

The rate column shows the current bandwidth usage between two IP addresses.

What's Next?

In this tutorial, we covered how to monitor system performance and resource usage using Linux commands. In the next section, we will explore log management, which is essential for maintaining a record of system events and diagnosing issues.

Stay tuned for more tutorials on Linux and BASH scripting!


PreviousCron JobsNext Log Management

Recommended Gear

Cron JobsLog Management