displaying total CPU usage

Eugene Grosbein eugen at grosbein.net
Fri Oct 23 13:15:38 UTC 2020


23.10.2020 18:03, Wojciech Puchar wrote:

> how to do it in batch - something like this line
> 
> CPU:  0.8% user,  0.0% nice,  1.3% system,  0.0% interrupt, 97.9% idle
> 
> from top but produced in non terminal/batch mode
> 
> all my attempts to do it with top failed - this line is missing

$ top -s3 -d2 | grep '^CPU'
CPU:  0.3% user,  0.0% nice,  0.5% system,  0.0% interrupt, 99.2% idle

-s3 specifies 3 seconds interval for sampling data.



More information about the freebsd-hackers mailing list