top
shows instant resource usage.
Also it has -d
option that sets refresh rate.
But how can I get average %CPU for processes for 1 minute?
Htop has additional meters one of them is CPU average (in HTOP Press F2 (or S) for setup menu -> Select “Meters” under setup -> Use right arrow to go to “Available Meters” column -> Use down arrow to select “CPU average” -> Press “F5″, which will add “CPU average” to the list under the “Left columns”.) But I think this meter shows averege of use of all cores not ucpu utilization for period of time...
You can accomplish this by using cacti, munin or zabbix. This software instanlty collecty data about cpu usage. There you can see average CPU usage in period of time
Avg CPU%
column to main table? I want to see it for each process.
sysstat
package contains sadc
daemon together with sar
and sa
reporting utilities. In most distros by default sadc
will collect statistics every five or ten minutes, but that can be easily changed by modifying crontab.
Anyway, you can use sar in real time like this:
sar 60
That would show you CPU statistics once per minute. If you want to see statistics once per minute for ten times, then
sar 60 10
would do.
sar -b 60
would show you I/O statistics per minute.
man sar
will show you all the possible options sar has -- it has plenty