Windows Resource Monitoring
In an IT support role, managing processes is essential, particularly when system processes become unstable or resource-heavy. Windows provides tools to monitor system resources, including Resource Monitor and Get-Process via PowerShell. Below is a breakdown of how these tools work.
🔍 Resource Monitor
Resource Monitor provides a graphical interface to observe system resources and manage processes. It offers five main tabs:
Overview - Displays an overview of all system resources.
CPU - Information about CPU usage by processes.
Memory - Data on how processes utilize system memory.
Disk - Monitoring of disk activity per process.
Network - Details on network activity by processes.
Each tab shows processes and their resource consumption, such as CPU usage, memory (indicated by Private Bytes), and disk IO (input/output).
⚙️ Command-Line Resource Monitoring
For users who prefer the command line, PowerShell offers the Get-Process
command. This command retrieves detailed information about each running process, including non-paged memory (NPMK) in kilobytes (K). To further refine the information, users can filter processes using pipes (|
) and sorting commands. Here’s an example of how to display the top 3 CPU-consuming processes:
💡 Explanation of Command
Get-Process
– Retrieves all running processes.| Sort-Object CPU -Descending
– Sorts processes by CPU usage in descending order.| Select-Object -First 3 -Property ID, ProcessName, CPU
– Displays only the top three processes based on CPU usage, showing their ID, name, and CPU consumption.
📈 Process Explorer
In addition to Resource Monitor, Windows also offers Process Explorer to visualize process performance. By selecting a process and viewing its properties, users can see real-time performance graphs of:
CPU activity.
Memory usage (Private Bytes).
Disk IO activity.
🧠 Key Takeaways
Resource Monitor provides a graphical way to manage processes.
PowerShell's Get-Process allows command-line resource monitoring and filtering.
Process Explorer offers detailed performance insights for each process.
Effective process management helps troubleshoot performance issues and optimize resource use.
🐧 Linux Resource Monitoring
In Linux, several commands allow you to monitor system utilization and manage processes effectively. Understanding and using these commands is crucial for troubleshooting performance issues. Below is a breakdown of key commands and how they help manage system resources.
📊 top
Command
top
CommandThe top
command provides real-time monitoring of system resources. It displays the top processes consuming the most resources, offering insights into:
Total tasks: Running or idle.
CPU usage: Percentage of CPU resources being used.
Memory usage: Percentage of memory resources used by each task.
Key Fields:
%CPU: Shows the CPU usage of individual tasks.
%MEM: Shows the memory usage of individual tasks.
Usage Tip: Press q
to exit the top
command.
⚙️ Common Scenario: High Resource Usage
When a computer is running slowly, it’s often due to overuse of hardware resources. Use top
to identify any tasks with high CPU or memory usage. If necessary, you can investigate or terminate these processes to free up resources.
⏲️ uptime
Command
uptime
CommandThe uptime
command provides essential system information, including:
Current time.
How long the system has been running.
Number of logged-in users.
System load averages: Displays CPU load over the past 1, 5, and 15 minutes.
This is useful for assessing system performance over time, especially when monitoring load fluctuations.
📂 lsof
Command
lsof
CommandThe lsof
(List Open Files) command helps track processes that are using files. For example, if you can’t eject a USB drive because the system reports "device or resource busy," lsof
can identify which processes are holding open files on the device.
This command is highly effective for managing open files and resolving issues like blocked USB ejection.
💻 Hardware Monitoring
If you’re interested in monitoring CPU or memory usage independently of processes, Linux offers various commands for that purpose. These may not be critical for single-machine monitoring, but they become valuable when managing multiple machines or a fleet of systems.
🧠 Key Takeaways
The
top
command is invaluable for real-time process monitoring.uptime
provides load averages to track system performance over time.Use
lsof
to troubleshoot open file issues, especially with removable drives.Monitoring hardware separately from processes can be useful for system administrators managing many machines.
Last updated