I'm trying to troubleshoot some CPU spikes that occur every so often on a Linux server. I can use sar to see the resource utilization in the past, and pidstat to see what processes are using what resources, but pidstat doesn't go into the past.
So what I'm looking for is a combination of both - Something that I can use to see what processes were taking up what resources. I haven't been able to find anything, and I know I can write a simple bash script to save the output of pidstat to a file, but if there's already a solution for this (which I would be surprised if there isn't), then I'd rather not re-invent the wheel.
Thanks!