Added option -[0-9]* to sar to show data of that days ago.
Mail from Don <do1@yandex.ru> 22/06/2012:
Hello Sysstat author(s),
Please add option `-[0-9]+' like `-1', `-2', etc. to sar tool, to show
data of that days ago. That would be handy and useful for everybody.
Example implementation in bash:
function sar() {
case "$1" in -[0-9]*) local OPT="-f /var/log/sa/sa`date +%d
--date=${1#-}' day ago'`"; shift;; esac
command sar $OPT "$@"
}
Limitation of this implementation is that -1 option should be first, but
if you implement this type of options in main code you can avoid it and
also many people will benefit. It will easier than to rememebr proper
date and type `-f /var/log/sa/saXX'.