A funcionalidade que você está solicitando é fornecida por sar
, um componente de sysstat
. A página Web original do sar afirma:
Under Linux, sar serves to log and evaluate a variety of information regarding system activity. With performance problems, sar also permits retroactive analysis of the load values for various sub-systems (CPUs, memory, disks, interrupts, network interfaces and so forth) and limitation of problems in this manner.
Também encontrei, inicialmente, esta página da Web muito útil. Afirma, no início:
Whenever I perform any type of activity that requires me to look at historical system statistics such as load average, CPU utilization, I/O wait state, or even memory usage; I usually skip the System Monitoring Applications like Nagios or Zenoss and start running the sar command. While I’m not saying that sar completely replaces those tools I am saying that sar is quick and dirty and if all you want is some raw numbers from a certain time frame, sar is a great tool.
What is sar? sar (System Activity Reporter) is a command that ships with the sysstat package. Sysstat is a collection of Unix tools used for performance monitoring, the package includes tools such as iostat, mpstat, pidstat, sadf and sar.
Along with the real time commands sysstat will install a cronjob that will run every 10 minutes and collect the systems performance information. Sar is the command you can use to read the collected
Cuidado ao configurá-lo no Debian (que é onde eu o executo), você precisa ativar o registro automático, que o pacote padrão baixado dos repositórios não faz não para você. No arquivo etc / default / sysstat, defina os parâmetros Enabled
como true, você deve fazê-lo manualmente.