Top Processes by CPU and Memory

Understanding Process Monitoring in Server Scout

The top processes feature in Server Scout provides essential insights into which applications are consuming the most CPU and memory resources on your servers. This optional monitoring capability helps you quickly identify performance bottlenecks, resource hogs, and potential issues before they impact your systems.

Enabling Top Processes Monitoring

The top processes metric is disabled by default to keep the agent lightweight. To enable it, you have two options:

Using the Configuration Command

The easiest way to enable top processes monitoring is through the agent's configuration utility:

sudo serverscout --configure

Navigate to the optional metrics section and enable the top processes feature when prompted.

Manual Configuration

Alternatively, you can edit the configuration file directly. Open /opt/scout-agent/scout.conf and add:

top_processes=1

After making changes, restart the Server Scout agent:

sudo systemctl restart serverscout

How Data Collection Works

Once enabled, the Server Scout agent collects process information every 5 minutes as part of its slow tier collection cycle. This measured approach ensures minimal impact on system performance whilst providing valuable insights into resource utilisation patterns.

The agent identifies and records:

  • Top 3 CPU-consuming processes by percentage usage
  • Top 3 memory-consuming processes by resident set size (RSS)

For each process, the following data is captured:

  • Process ID (PID)
  • Process name or command
  • CPU percentage (for CPU rankings)
  • Memory percentage and RSS in kilobytes (for memory rankings)

Viewing Process Data

Process information appears in the Load & Processes panel on your server's detail page. You'll find two dedicated tables:

  • Top Processes by CPU - showing the most processor-intensive applications
  • Top Processes by Memory - displaying the largest memory consumers

The data refreshes every 5 minutes, providing a recent snapshot of your system's resource allocation rather than real-time monitoring.

Practical Applications

Identifying Runaway Processes

The CPU table quickly highlights processes that are consuming excessive processor time. This is particularly valuable for identifying:

  • Applications stuck in infinite loops
  • Poorly optimised scripts or queries
  • Processes that should normally be idle but are unexpectedly active

Detecting Memory Leaks

The memory table helps spot applications with growing memory footprints over time. By monitoring these values across multiple collection cycles, you can identify:

  • Applications with gradual memory leaks
  • Processes holding onto resources longer than expected
  • Services that may benefit from regular restarts

Capacity Planning

Regular review of top processes data supports informed decisions about:

  • Server resource allocation
  • Application deployment strategies
  • When to scale infrastructure

Troubleshooting Performance Issues

When users report slow response times or system sluggishness, the top processes tables provide immediate visibility into potential culprits, allowing you to:

  • Quickly narrow down performance investigations
  • Correlate resource usage with reported issues
  • Make data-driven decisions about process management

Understanding the Data

Remember that the 5-minute collection interval means you're viewing a snapshot rather than continuous monitoring. This approach strikes a balance between system visibility and agent efficiency. For real-time process monitoring, you'll still want to use traditional tools like htop or top when actively troubleshooting issues.

The process rankings reset with each collection cycle, so a process might appear in the top 3 during one interval but not the next, depending on current system activity.

Next Steps

With top processes monitoring enabled, you'll gain valuable insights into your server's resource utilisation patterns. Consider reviewing this data regularly as part of your system maintenance routine, and use it alongside Server Scout's other metrics for comprehensive server monitoring.

Frequently Asked Questions

How do I enable top processes monitoring in ServerScout?

Use the command `sudo serverscout --configure` and navigate to the optional metrics section to enable top processes. Alternatively, add `top_processes=1` to `/opt/scout-agent/scout.conf` and restart the agent with `sudo systemctl restart serverscout`.

How often does ServerScout collect process data?

ServerScout collects process information every 5 minutes as part of its slow tier collection cycle. This measured approach ensures minimal impact on system performance while providing valuable insights into resource utilization patterns.

What process information does ServerScout track?

ServerScout tracks the top 3 CPU-consuming processes and top 3 memory-consuming processes. For each process, it captures the Process ID (PID), process name or command, CPU percentage, and memory percentage with RSS in kilobytes.

Where can I view top processes data in ServerScout?

Process information appears in the Load & Processes panel on your server's detail page. You'll find two dedicated tables: Top Processes by CPU showing processor-intensive applications and Top Processes by Memory displaying the largest memory consumers.

Why is top processes monitoring disabled by default?

The top processes metric is disabled by default to keep the ServerScout agent lightweight and minimize system impact. You can enable it when you need detailed process monitoring for performance troubleshooting or capacity planning.

Can ServerScout help detect memory leaks?

Yes, the memory table helps spot applications with growing memory footprints over time. By monitoring these values across multiple collection cycles, you can identify applications with gradual memory leaks or processes holding onto resources longer than expected.

Is ServerScout process monitoring real-time?

No, ServerScout provides snapshots every 5 minutes rather than real-time monitoring. This approach balances system visibility with agent efficiency. For real-time process monitoring during active troubleshooting, use traditional tools like htop or top.

Was this article helpful?