Linux Performance Optimization Toolkit Sysstat and Sysstat Services

Source: Internet
Author: User

1. Sysstat Service

1.1./etc/cron.d/sysstat

Performance analysis under Linux, without the need to use the commands in the Sysstat Toolkit. At the same time, the Sysstat service automatically collects system state information every 10 minutes and stores them in the/var/log/sa directory. One file per day, filename is SA1, SA2,... sa30.

[Root@localhost SA] # pwd/var/log/sa[root@localhost sa]#  lssa01  sa03  Sa05  sa06  sa07  sa08  sa09  sa10  sa11  sa12  sa13  sa14  sa15  Sa25  sa26  sa27  sa28  sa29  sa30  sar25

Automatic collection of system information is achieved through/etc/cron.d/sysstat:

[Root@localhost SA] # cat/etc/cron.d/sysstat# Run system activity Accounting tool every minutes*/11 # 0 * * * * ROOT/USR/LIB/SA/SA1 6 Generate A daily summary of process accounting at 23:53  -  * * * * root/usr/lib/sa/sa2-a

The above is marked each 10 minutes, run once/USR/LIB/SA/SA1 1 1, the command man SA1:

Sa1-collect and store binary data in the system activity daily data file.

SYNOPSIS:/USR/LIB/SA/SA1 [--boot | interval Count]

SA1 collects binary data. So sa2-a is responsible for converting the binary files of the day into text files.

Sa2-write a daily report in The/var/log/sa directory

The frequency at which information is collected can be modified as needed.

1.2./etc/sysconfig/sysstat

The relevant configuration such as file save time in/var/log/sa/directory exists in file/etc/sysconfig/sysstat:

[Root@localhost~]#cat/etc/sysconfig/sysstat# sysstat-9.0.4 Configuration file.# How long-keep log files (in days). # If Value is GRE Ater than, then log files is kept in# multiple directories, one for each month.history= -#Compress (using gzip or bzip2) SA and SAR files older than (in days):Compressafter= to#Parameters for the system Activity Data Collector (see SADC manual page) # which is used for the generation of log fi Les.sadc_options="- s DISK"#Compression.zip="bzip2"

The history=28 represents up to 28 days of data retention. Save time, we can make changes as needed.

1.3. Ensure that the Sysstat service starts:

[Root@localhost ~] # chkconfig--level 3--level 5 Sysstat on [Root@localhost ~] # chkconfig |grep sysstatsysstat         0: Off   1: On    2: on    3 : On    4: On    5: On    6: Off

Above is the knowledge of Sysstat service operation. Here's how the command line in the SYSSTAT Toolkit uses the information gathered to understand how the system works.

2. Commands in the Sysstat Toolkit

Linux Performance Optimization Toolkit Sysstat and Sysstat Services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.