Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1595102
  • 博文数量: 317
  • 博客积分: 10283
  • 博客等级: 上将
  • 技术积分: 3566
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-04 11:38
个人简介

哥使用Linux

文章分类

全部博文(317)

分类: LINUX

2008-03-09 11:14:03

This script takes information from "SHOW STATUS LIKE..." and "SHOW VARIABLES LIKE..."
to produce sane recomendations for tuning server variables.
It is compatable with all versions of MySQL 3.23 and higher (including 5.1).

Currently it handles recomendations for the following:

  • Slow Query Log
  • Max Connections
  • Worker Threads
  • Key Buffer
  • Query Cache
  • Sort Buffer
  • Joins
  • Temp Tables
  • Table (Open & Definition) Cache
  • Table Locking
  • Table Scans (read_buffer)
  • Innodb Status

    Recent Changes

  • Correct awk display error which formats integers > 4294967296 in scientific notation.
    - Was manfest in MEMORY USAGE section where total system RAM > 4GB.
  • Fixed rounding error where mysql will lose 4K from the join_buffer_size value.
    - Other values may have the same issue but are not yet reported
  • Added support for FreeBSD and MacOS (thanks Sam and Geert)
  • Added support for Solaris
  • Changed how system memory is derived on Linux.
    - Use /proc/meminfo vs free -b and avoid inclusion of swap space.
  • Include note warning of instability when key_buffer_size > 4GB in versions 5.0.51 and lower

    This script takes information from "SHOW SLAVE STATUS" from MySQL +4.1 to show what
    the delay between the retrieved master's position and the slave's execution position.

    This script has a 1 second granularity.

    This script produces no output when replication slave is running normally.
    If either IO or SQL threads are not running it will print a message indicating so
    and print the contentsof the "Last_error:"

    I typically set it up on a 2minute cron. It has some logic in place to avoid repeat
    e-mailing from CRON when down status is found. It will wait 15 minutes before producing
    the next message. You can also disable the scripts checking by changing the "active"
    variable to "no". This allows users without direct access to cron to controll the script.
    This script assumes that a ~/.my.cnf will be in place for authentication.

    This script pulls hot backups of MyISAM tables and flushes the binary log files when called with the 'DAILY' option
    When called with 'HOURLY' option it will rsync the binlogs for the server to the specified backup directory.
    Recently added support for InnoDB with the 3rd party 'ibbackup' utility Added support for MySQL 4.1 and 5.0.

  • 阅读(1663) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~