Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log the Ram and CPU usage for Linux Processes

How would I track the CPU and Ram usage for a process that may run, stop, and then re-run with a different PID?

I am looking to track this information for all processes on a Linux server but the problem is when the process stops and restarts, it will have a different PID and I am not sure how to identify it as the same process.

like image 763
Jared Avatar asked Dec 12 '25 22:12

Jared


1 Answers

What you're looking for here is called "process accounting".

http://tldp.org/HOWTO/Process-Accounting/


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!