Process Resource Utilization (CPU, Memory)
- CPU Utilization: It refers to the amount of time the CPU spends executing a program. It is usually measured as a percentage.
# Check CPU utilization using top
top
- Memory Utilization: It refers to the amount of physical and virtual memory being used by processes.
# Check memory utilization using top
top
Monitoring Tools (e.g., top, htop)
top
Command:- Provides a dynamic view of system processes, continuously updating in real-time.
top
htop
Command:- An enhanced alternative to
top
with a more user-friendly interface.
- An enhanced alternative to
htop
Process Tracing (strace, ltrace)
strace
Command:strace
is a powerful diagnostic tool that traces system calls and signals used by a process.
strace -p <PID>
ltrace
Command:ltrace
is used to intercept and record library calls made by a process.
ltrace -p <PID>
Analyzing System Load
- System Load Average: The system load average indicates the average number of processes in the run queue over a certain period of time.
# Check load average uptime
- Load Average Thresholds:
- A load average of 1.0 on a single-core CPU indicates that the system is fully utilized. Higher values suggest a potential bottleneck.
- Monitoring Disk Activity:
- Tools like
iostat
oriotop
can be used to monitor disk activity.
- Tools like
iostat
These tools and commands provide essential capabilities for monitoring processes and system performance. They help administrators and users gain insights into resource utilization, diagnose issues, and optimize system performance.