UNDER DEVELOPMENT... Learning never stops. Your comments, encouragement or criticism to my blog tkokhing.github.io are most welcome to help me grow. Thank you! ...UNDER DEVELOPMENT

Home / topics / AtoZ / terrified-by-linux / chapter1-4


Chapter 1-4: System Monitoring and Performance

Cover Image for Chapter 1-4: System Monitoring and Performance
tkokhing
tkokhing
Posted on:

Chapter 1-4: System Monitoring and Performance

System performance monitoring is crucial for understanding your machine's resource usage and maintaining a healthy environment. In this chapter, we’ll explore commands that help you monitor running processes, memory usage, and system performance on both Windows and Linux.

These tools will give you insights into how your system is performing, allowing you to make informed decisions for resource management, troubleshooting, and optimization.


11. View Running Processes

🎯 Purpose

To view all running processes, their resource usage, and the associated command-line arguments.

💻 Windows

tasklist

🧾 Sample Output

Image Name                     PID Session Name        Session#    Mem Usage
=========================      ====== ================  ========    ==========
svchost.exe                     1324 Services                   0     30,000 K
chrome.exe                      1296 Console                    1     150,000 K
explorer.exe                    3204 Console                    1     85,000 K

🐧 Linux

ps aux

🧾 Sample Output

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root       1324  0.2  0.1  24124  1848 ?        Ss   10:00   0:05 /usr/sbin/sshd
user       1296  2.5  3.8  245396 78932 pts/1    Sl+  10:15   1:22 /usr/bin/gnome-shell
📝 Note:
In Linux, top provides a dynamic, real-time view of running processes. You can use top instead of ps aux for continuous updates.

12. Check Memory Usage

🎯 Purpose

To check how much physical memory (RAM) is being used by the system and individual processes.

💻 Windows

systeminfo

🧾 Sample Output

Total Physical Memory:     16,384 MB
Available Physical Memory: 10,122 MB
Virtual Memory: Max Size:  18,000 MB
Virtual Memory: Available: 12,500 MB
⚠️ Alert:
If you notice that the available memory is consistently low or high, it might indicate a memory leak or unnecessary background processes consuming resources.

🐧 Linux

free -h

🧾 Sample Output

              total        used        free      shared  buff/cache   available
Mem:           16Gi        4.1Gi        8.4Gi        452Mi        3.5Gi        11Gi
Swap:          4.0Gi       0B           4.0Gi
💡 Tip:
You can also use vmstat for more detailed memory stats, including swap usage:
vmstat -s

13. Check System Performance

🎯 Purpose

To monitor system performance metrics like CPU utilization, disk I/O, and memory stats over time.

💻 Windows

perfmon

🧾 Sample Output

Performance Monitor displays graphical data on CPU, memory, disk, and network usage.

🐧 Linux

vmstat

🧾 Sample Output

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so   bi   bo   in   cs us sy id wa st
 1  0      0  824456  12216 2420604    0    0   35  116   34  116  1  0 98  1  0
📝 Note:
The vmstat command provides a snapshot of system performance, including processes, memory, swap, I/O, and CPU usage.
⚠️ Alert:
The perfmon tool in Windows offers detailed graphs of performance metrics. For advanced performance monitoring, consider setting up custom Data Collector Sets in perfmon.

✅ Coming Up Next

Coming up, we’ll dive into Part 5: Software and Package Management —comparing how both Linux and Windows handle software installation, package updates, and system management.

Stay tuned.