🐧 Day 3 of 100DaysOfDevOps Interview: Approaches to Debugging Performance Issues: Initial Steps without Tool Installation, Followed by Utilizing Specific Diagnostic Tools 🐧

Prashant Lakhera
2 min readJul 5, 2023

First, we delve into debugging methodologies without resorting to installing additional tools. The performance hitch might be a result of excessive CPU usage, memory overload, I/O bottlenecks, or network congestion.

🎥 YouTube link:

📚 Course link: https://lnkd.in/gncDbGHK

🖥️ CPU Debugging

The ‘w’ command presents a snapshot of the system’s operations, offering load averages for 1, 5, and 15-minute periods:

$ w

🔍 Memory Debugging

The ‘free’ command offers a clear picture of used and free physical memory y spaces, also shedding light on buffers utilized by the kernel. The ‘-m’ flag provides the information in MB:

$ free -m

🔍 Network Debugging

The ‘ifconfig’ command is an integral tool to display or configure a network interface, providing information about received and transmitted packets, errors, and dropped packets:

$ ifconfig

💡 Note that many distributions no longer include the ifconfig command or net-tools package pre-installed. The ‘ip’ command is now favored over ‘ifconfig’, due to its extensive functionality and active maintenance.

🔍 I/O or Disk Debugging

The ‘top’ command in Unix-like systems proffers a real-time, dynamic view of system processes. The ‘wa’ column is especially valuable for diagnosing performance issues as it displays the amount of time the CPU remains idle while awaiting I/O operations:

top

🔑 Key limitation — these commands provide usage stats but don’t specifically point out the process causing an issue. For example, the ‘w’ command portrays CPU utilization over time, but it doesn’t identify the process responsible for high CPU usage.

🔍 CPU Debugging with Tools

‘top’ command is a powerful command-line utility offering a real-time dynamic view of system processes. Pressing ‘1’ will break down CPU usage per individual CPU:

top

🔍 Memory Debugging with Tools

Typing SHIFT+m while running ‘top’, you can sort processes based on memory utilization:

top (then SHIFT+m)

🔍 Network Debugging with Tools

‘dstat’ offers a versatile tool for monitoring systems during performance tuning tests or troubleshooting. The ‘ — net’ and ‘ — top-io-adv’ flags can monitor network stats and show the most expensive I/O process. Note that it requires separate installation:

$ dstat — net — top-io-adv

🔍 I/O Debugging with Tools

The ‘iotop’ command monitors I/O usage information and presents a table of existing I/O utilization per process. However, it’s not typically preinstalled and requires separate installation:

$ sudo iotop

✅ If you’re interested in expanding your knowledge of DevOps and exploring related concepts, we invite you to join our vibrant community:

https://www.linkedin.com/groups/14272707/

✅ Course link: https://www.101daysofdevops.com/courses/100-days-of-devops-interview

✅ If you require additional assistance, kindly refer to the FAQ.: https://www.101daysofdevops.com/faq-101-days-of-interview/

✅ GitHub Repo: https://github.com/100daysofdevops/100DaysofDevOpsInterview

✅ YouTube Playlist: https://www.youtube.com/playlist?list=PLckUzKjgYDgZ4AE6D-fKs1Z0gWCHBrk65

--

--

Prashant Lakhera

AWS Community Builder, Ex-Redhat, Author, Blogger, YouTuber, RHCA, RHCDS, RHCE, Docker Certified,4XAWS, CCNA, MCP, Certified Jenkins, Terraform Certified, 1XGCP