📟

Process Monitor

Verified

by Community

Guides process monitoring and management including identifying resource-heavy processes, understanding process states, and optimizing system performance through process control.

systemprocessesmonitoringperformanceCPUmemory

Process Monitor

Monitor and manage system processes for optimal performance. Identifies resource-heavy processes, explains process states, and provides tools for systematic process management.

Usage

Describe the performance issue or monitoring need. The guide provides commands to diagnose the situation, explains what the output means, and recommends actions to resolve process-related problems.

Parameters

  • Issue: High CPU, High memory, Zombie processes, Slow system, or General monitoring
  • System: Linux, macOS, or Docker containers
  • Detail: Quick check, Deep investigation, or Ongoing monitoring setup
  • Tool: top/htop, ps, strace, or Comprehensive toolset

Examples

  1. CPU Spike Investigation: Identify which process is consuming 100% CPU — use top with sorting, check process tree with pstree, examine what it's doing with strace, and decide whether to optimize or kill.
  1. Memory Leak Detection: Track a process's memory growth over time — monitor RSS/VSZ with ps, identify the leak rate, check for OOM killer activity in dmesg, and set up memory limit safeguards.
  1. Zombie Process Cleanup: Find and explain zombie processes — why they exist, which parent process isn't reaping them, and whether to fix the parent or restart the process tree.
  1. Container Resource Monitoring: Monitor Docker container resource usage — docker stats, cgroup limits, CPU throttling detection, and memory pressure analysis.

Guidelines

  • Process states are explained: Running, Sleeping, Stopped, Zombie, and what each means
  • top and htop output fields are decoded: PID, USER, %CPU, %MEM, VSZ, RSS, STAT
  • Signal handling is explained: SIGTERM (graceful) vs SIGKILL (force), and when to use each
  • Nice and ionice values adjust process priority without killing
  • Background process management covers nohup, disown, screen, and tmux
  • Process limits (ulimit) prevent single processes from consuming all resources
  • Systemd service management provides restart-on-failure and resource limiting
  • Logging process performance over time enables trend analysis and capacity planning
  • Alert thresholds are configured for proactive notification before problems impact users
  • Process trees show parent-child relationships for understanding cascading issues