My role
Root cause analysis and fix
Period
2026
Scale
Production application server on AWS EC2
Stack
Bash, pidstat, cron, RHEL, AWS EC2
<40%peak CPU after tuning the agent scan
1 scripttargeted pidstat capture that caught the real process

Context

The application team reported high CPU on a production server on AWS, recurring daily at about 11:28 a.m.

The problem, stated precisely

A predictable, time-based CPU spike on a production server, with no obvious owner and no visible cause in the usual monitoring views.

Investigation

First suspect: cron. I checked all cron jobs for root and the application account and found an application job scheduled at 11:25 a.m., three minutes before the spike. It was commented out as a test.

It wasn’t cron. The next day, the spike returned at 11:28 a.m. With the cron job disabled, that suspect was ruled out.

Capturing evidence instead of guessing. I wrote a script that watched CPU utilisation and, whenever it crossed 50%, captured pidstat output showing exactly which processes were consuming CPU at that moment.

Root cause. The next day’s capture showed the Nexus agent running several find scans of the filesystem at the same time.

Fix and rollout

I reduced the agent’s scanning load, sizing the find scans to the server’s vCPU count. After the change, CPU did not go above 40%.

This was reflected in entire Env where CPU was since abrupt increase at certain time.

What I learned