# outil a utiliser sur Linux (Suse ...)
MOIS=`date '+%m'`
ANNEE=`date '+%Y'`
echo "Moyennes 'sar' : verif faite le `date` : "
echo "Mois Jour        CPU     %user      %nice   %system   %iowait     %idle"

cd /var/log/sa
for fic in `ls sa.20??_??_?? |grep "${ANNEE}_${MOIS}"`
 do
     # MOIS=`ls -l $fic |awk '{print $6}'`
     # JOUR=`echo $fic |sed 's:sa::'`
     JOUR=`echo $fic |sed -e 's/sa//' -e "s/${ANNEE}//" -e "s/${MOIS}//" -e "s/_//g" -e "s/\.//" `
     echo " $MOIS $JOUR `sar -f $fic |grep -i Average`" | sed "s/Average://"
 done
