psrecord in a EC2 instance
mytluo opened this issue · comments
Hi,
I've been using psrecord
to monitor various processes that were run in an Amazon EC2 instance -- all of them had 0.00% for CPU usage during the entire time. Is it because they were run in an instance and the CPU usage couldn't be recorded?
A couple of the activity logs also seem off in terms of Elapsed Time... for example, one process only recorded up to 67.617 seconds, but the process took much longer than 67 seconds to finish; I also had --interval
set to 5, but it had a data point every 0.01 (seconds?)... could it be possible this was somehow recorded in a different time unit?
In case anyone else runs into this --
if you specify process.cpu_percent(interval=1)
in the get_percent()
function in the main.py
file, it seems to resolve the issue.