BCE-O535 Linux and Shell Programming

0 of 30 lessons complete (0%)

Module 5 Processes

Process Monitoring and Performance

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 
  • Memory Utilization: It refers to the amount of physical and virtual memory being used by processes.
# Check memory utilization using top 

Monitoring Tools (e.g., top, htop)

  • top Command:
    • Provides a dynamic view of system processes, continuously updating in real-time.
  • htop Command:
    • An enhanced alternative to top with a more user-friendly interface.

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 or iotop can be used to monitor disk activity.

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.