

However, as we want to avoid the time format confusion, we set the 24-hour format locally for the sar call with LC_TIME=en_UK.utf8. Consequently, the time’s been displayed in the 12-hour (AM/PM) format so far. Let’s emphasize that the sar output is locale-sensitive.

Moreover, we need to read data from a file for these options to work.

We should use the hh:mm:ss 24-hour time format. So, we can use the s option for the statistic’s start time and e for the end one. Now let’s be more specific about the time range within one day. In addition, we’ve got the information about the system start time. We should notice the difference – the collecting interval is now 10 minutes. Now, as an example of historical data, let’s show the corresponding figures for the current day. So, let’s show 5 samples of the CPUs activity counters every 10 seconds, with count = 5 and interval = 10: $ sar 10 5 Moreover, we can limit the number of samples with the count option. In addition, the default statistic is the collective activity of all CPUs.įor current data, we should provide an interval between gathering consecutive data samples. Now, let’s note that sar can provide both current and past data about the system activity.
