Understanding CPU, Memory, and GPU Usage on Multiple Ubuntu Computers

Abstract: Identify performance bottlenecks and resource exhaustion on Ubuntu systems by monitoring CPU, memory, and GPU usage with open-source tools.

Created: 2026-08-12 by

Monitor CPU, memory, and GPU usage across multiple Ubuntu systems using open-source tools like htop, free, and nvidia-smi. These utilities provide real-time insights into system performance, helping you identify bottlenecks and determine if hardware upgrades are necessary for your infrastructure.

Why Monitor System Resources?

Understanding resource utilization is critical for maintaining stable and efficient Linux servers. When a system becomes unresponsive, it is often due to one of three main resources being exhausted: Central Processing Unit (CPU), Random Access Memory (RAM), or Graphics Processing Unit (GPU) compute power. By tracking these metrics over time, administrators can distinguish between temporary spikes and chronic issues that require immediate attention. This proactive approach allows for better capacity planning and ensures that applications run smoothly without unexpected crashes.

Monitoring CPU Usage

The CPU is the brain of your computer, handling all computational tasks. On Ubuntu, the simplest way to view current CPU activity is through the terminal command top or its more user-friendly cousin, htop. Running htop provides a color-coded interface that shows individual core usage, total load averages, and process priority. If you see sustained high usage on specific cores, it may indicate that a single application is monopolizing processing power. For headless servers where graphical interfaces are unavailable, the mpstat command offers detailed statistics per processor. It is also important to check if the kernel is sending tasks to isolated cores, which can affect performance scheduling as discussed in our guide on Ubuntu Kernel Sending Task to Isolated Core.

Analyzing Memory Consumption

Memory management is often the most confusing aspect of Linux monitoring because of how the kernel handles free RAM. The command free -h displays total, used, and available memory in human-readable format. However, "used" memory includes buffers and cache, which the kernel uses to speed up disk I/O operations. To understand what is actually consuming RAM at the process level, use ps aux --sort=-%mem | head to list the top memory-consuming processes. If you notice a specific process using significantly more memory than expected, it might be leaking memory or running inefficiently. For deeper analysis of why a process behaves differently across environments, refer to our article on Why would a process use more memory running on one OS compared to another?. Swapping occurs when physical RAM is full, leading to severe performance degradation, so keeping an eye on swap usage via swapon --show is essential.

Tracking GPU Utilization

For systems with NVIDIA GPUs, particularly those used for machine learning, video rendering, or gaming, monitoring GPU usage is vital. The primary tool for this is nvidia-smi, which stands for NVIDIA System Management Interface. Running this command without arguments provides a snapshot of GPU temperature, power draw, memory usage, and utilization percentage. If you need to see which specific processes are utilizing the GPU memory, you can append the --query-compute-apps flag. This helps identify rogue scripts or background jobs that might be holding onto VRAM, preventing other applications from running. Understanding how to view these processes is key, as detailed in our tutorial on How to View All Processes Using GPU Memory in Linux. High GPU memory usage does not always mean high compute usage; sometimes the memory is allocated but idle, which requires different troubleshooting strategies.

Automating Multi-System Monitoring

When managing a fleet of Ubuntu computers, manual checks become impractical. You can create simple bash scripts to gather data from multiple machines remotely using SSH. A basic script can loop through a list of hostnames, execute htop -b -n 1 or nvidia-smi on each node, and save the output to a central log file. Alternatively, consider using lightweight monitoring agents like Node Exporter combined with Prometheus and Grafana. These tools provide historical data and visual dashboards, allowing you to spot trends over days or weeks rather than just instant snapshots. This long-term view is crucial for identifying gradual performance declines that might indicate failing hardware components.

Identifying Upgrade Needs

Once you have collected sufficient data, you can make informed decisions about hardware upgrades. If CPU usage consistently hits 100% during peak hours, adding more CPU cores or upgrading to a faster clock-speed processor will help. If memory is constantly near capacity with heavy swapping, adding more RAM is the most effective solution. For GPU-bound workloads, if utilization is low but memory is full, you may need a GPU with larger VRAM. Conversely, if both utilization and memory are high, a more powerful GPU model is required. Regular monitoring prevents emergency purchases by allowing you to budget for upgrades during planned maintenance windows.

Frequently Asked Questions

What causes high CPU usage on an Ubuntu server?

High CPU usage is typically caused by runaway processes, heavy database queries, or insufficient scaling for web traffic. Check active processes with top and investigate any suspicious or unexpectedly busy threads.

How do I know if my system needs more RAM?

If the "available" memory column in free -h is consistently low and swap usage is high, your system is thrashing. This leads to significant slowdowns, indicating that adding physical RAM is necessary.

Can I monitor GPU usage without NVIDIA drivers installed?

No, nvidia-smi requires proprietary NVIDIA drivers to communicate with the hardware. For AMD GPUs, you would use rocm-smi or radeontop instead.

What should I do if a process is stuck using GPU memory?

You can identify the Process ID (PID) using nvidia-smi pmon and then terminate it with the kill command. Always try to stop the application gracefully first before forcing termination.

Is there a built-in GUI for monitoring resources in Ubuntu?

Yes, Ubuntu comes with "System Monitor," a graphical application accessible from the Activities menu. It provides real-time graphs for CPU, memory, and disk usage, making it easy for non-technical users to view status.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More