Sar
From Tuxunix
SAR est une commande qui permet de collecter, et réaliser des rapports sur l’activité de votre système.
ex:
#>05:10 root@tuxedo /tmp $ sar -u 2 5 Linux 2.6.26-2-486 (tuxedo) 09.12.2010 _i686_ 17:12:06 CPU %user %nice %system %iowait %steal %idle 17:12:08 all 0,50 0,00 1,99 0,00 0,00 97,51 17:12:10 all 4,02 0,00 1,01 0,00 0,00 94,97
Voici un script File:SarConvertRRd.txt qui permet de générer des graphes en utilisant les résultats d'un sar:
#> sar -u 2 5 >datafile #> ./sarConvertRRd.pl -f datafile First Pass: determine the time range... Analysing 'sar' output for a linux System: tuxedo 5 measures detected Range starts from 17:00:54 to 17:01:02 Use Interval of 2 seconds Second Pass: create the graphs... Analyzing data for CPU
Infos :
- collect CPU : sar -u 2 2240 > resultSar_CPU.log
- Collect DISK : sar -dp 2 2240 | grep VolGroup00-LogVol00 > resultSar_DISK.log