Dienstname
sysstat
Beschreibung
Der sysstat-Dienst (/etc/init.d/sysstat ) ist für die regelmäßige Erfassung von Systemleistungsinformationen verantwortlich. Durch die Verwendung von cron und sadc (System Activity Data Collector) , sammelt sysstat sar-Daten (/var/log/sa/ ) in 10-Minuten-Intervallen täglich. Der Dienst hat nur geringe Auswirkungen auf die Gesamtleistung des Servers. Die standardmäßige sysstat-Konfiguration (/etc/sysconfig/sysstat ) überschreibt gesammelte Leistungsinformationen alle 7 Tage. Sysstat wird als Teil des sysstat-Pakets bereitgestellt – Es bietet auch nützliche Dienstprogramme zur Erfassung der Systemleistung, darunter; mpstat, iostat und sar .
Konfiguration
Die Standard-Sysstat-Konfigurationsdatei ist /etc/sysconfig/sysstat . Unten ist die Beispielkonfigurationsdatei.
# cat /etc/sysconfig/sysstat # sysstat-9.0.4 configuration file. # How long to keep log files (in days). # If value is greater than 28, then log files are kept in # multiple directories, one for each month. HISTORY=28 # Compress (using gzip or bzip2) sa and sar files older than (in days): COMPRESSAFTER=31 # Parameters for the system activity data collector (see sadc manual page) # which are used for the generation of log files. SADC_OPTIONS="-S DISK" # Compression program to use. ZIP="bzip2"
Die Standard-Sysstat-Cron-Tab-Datei ist /etc/cron.d/sysstat . Die Beispiel-Cron-Datei wird unten gezeigt.
# cat /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib64/sa/sa1 1 1 # 0 * * * * root /usr/lib64/sa/sa1 600 6 & # Generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib64/sa/sa2 -A