Linux performance history
Sarr command handles long term data of system performance
Linux Performance History
Basic command
sar -u
This displays all CPU related information.
Memory lookup
sar -r
This displays all memory related information
File usage
sar -f /var/log/sa/sa01
This is the add on for searching a saves file
How to find an average of usage over the course of a month.
Combine sar files.
cd /var/log/sa/
cat /var/log/sa/sa* >> combined_sar_data
Find total bandwidth for the month excluding averages and displaying as TB
sar -n DEV -f combined_sar_data | awk '/eth0/ && !/Average/ {tx += $6} END {total_tx = tx / (1024 * 1024); printf "Total TX for eth0 in the month: %.2f TB\n", total_tx}'
due to some findings this may not be the best way as sar does not track every second