Locations of visitors to this page

Thursday, August 27, 2009

how to find ip address of network interface

how to find ip address assigned to network interface
如何取得网卡分配的IP地址

运行脚本:
/sbin/ifconfig -a|awk '
{
  if ( $0 ~ /^[^ ]/ ) {
    ifname=$1
    do {
      getline
      if ( $0 ~ /inet addr/ ) {
        ifaddr=substr($2, index($2, ":")+1)
      }
    } while ( $0 ~ /^[ ]/ )
    print ifname, ifaddr
    ifname=""
    ifaddr=""
  }
}
'
bond0 192.168.11.18
eth0
eth1
lo 127.0.0.1
sit0
tun0 172.16.220.94
列出系统中所有网卡对应的IPv4地址


-fin-

red herring

red herring
熏鲱鱼

意指:
1. 故意引起误导, 转移注意的虚假线索
The way Barclay keeps his novels on the move is to put each book's protagonist up against a series of events that fall into a netherworld between clues and red herrings.
巴克莱推动小说情节发展的方式是设置真实和虚假的线索将故事中的主人公置于一系列陷入可怕的境地的事件中

2. 提出无关话题, 借以从原主题转移注意力的一种逻辑谬论
Cheney's 'Torture Works' Argument Is a Red Herring
切尼"虐囚有理"的争辩实属混淆视听

3. 成语: 难以名状的, 非驴非马, 不伦不类
neither fish nor fowl(flesh) (nor good red herring)
I guess that's why I'm a lukewarmer--neither fish nor fowl nor good red herring.
我想这就是为什么我是个温和主义者--非驴非马


起源:
通常认为, 起源于猎人在训练猎狗时用熏鲱鱼的气味干扰其追踪猎物.
事实并非如此, 这种说法最早出现在19世纪初一名英国记者写的一篇小说中, 用来隐喻抨击当时新闻界的错误报道, 由于这个比喻广泛流传深入人心, 后来被人误认为是一种训练猎狗的方法.


外部链接:
Red herring (idiom)
red herring
THE LURE OF THE RED HERRING

Fallacy: Red Herring
Red Herring

"NEITHER FISH NOR FLESH" AND ITS VARIATIONS*

Herring

-fin-

Sunday, August 23, 2009

InnoDB Index Structure

InnoDB Index Structure
InnoDB索引结构


题问:
查看下面查询语句, 字段b是数字类型, 建立了索引, 查询条件是LIKE, 为何使用了索引全扫描(type=index)?
mysql> desc t1;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| a     | int(11) | NO   | PRI | 0       |       |
| b     | int(11) | YES  | MUL | NULL    |       |
| c     | int(11) | YES  |     | NULL    |       |
+-------+---------+------+-----+---------+-------+
3 rows in set (0.01 sec)

mysql> explain select a, b from t1 where b like '50';
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows | Extra                    |
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|  1 | SIMPLE      | t1    | index | b             | b    | 5       | NULL | 4866 | Using where; Using index |
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
1 row in set (0.00 sec)

mysql>


回答:
这条查询语句用到了覆盖索引(covering index), 跟InnoDB索引的结构有关.


1. 存储结构
InnoDB存储引擎中, 每一个表具有一个特殊的索引,叫聚集索引(clustered index, 又叫primary index), 行数据存储在该索引节点上, 这相当于Oracle的索引组织表的结构.
聚集索引建立的规则如下:
1)如果有主键, 那么选择该主键
2)如果没有主键, 有非空列的唯一索引, 则选择第一个非空唯一索引
3)否则, InnoDB存储引擎内部为每一条记录分配一个6字节的唯一标识(row id)
以此作为行的唯一标识创建聚集索引, 每条记录的数据存储在聚集索引的叶子节点上, 所以InnoDB聚集索引就是表本身.

其它索引称为二级索引(Secondary index)
二级索引的节点不仅保存索引键值(索引字段的值), 还保存了对应行的聚集索引(primary key)的键值. 此值起到指针的作用, 查询通过它去访问聚集索引, 扫描主键(primary key)从而得到行数据.(Oracle IOT的二级索引保存的是逻辑行标识符[logical rowid]). 这意味着, 通过二级索引查询要扫描两个索引, 二级索引和聚集索引

如图所示:
.
  primary key
         o  <-------
         |          |
      -------       |
     |       |      |
     o       o      |
     |       |      |
    ---     ---     |
   |   |   |   |    |
   o   o   o   o    |
  k+r k+r k+r k+r   |
                    |
  secondary key     |
         o          |
         |          |
      -------       |
     |       |      |
     o       o      |
     |       |      |
    ---     ---     |
   |   |   |   |    |
   o   o   o   o    |
  k+p k+p k+p k+p   |
                |   |
                 ---
.
primary key: 即primary index, 即聚集索引
secondary key: 即secondary index
k+r: key value + row data, 即索引键值和行数据
k+p: key value + primary key values, 即索引键值和主键键值

2. 选择主键
由于InnoDB索引存储结构的特殊性, 因此在设计表时对主键的选择显得格外重要, 主要原则有:
1) 显式指定主键, 不要让系统自动创建
如果不指定主键, 系统会自动创建一个自增长类型的隐含的字段(row id)作为主键, 长6字节
演示如下:
建一个表, 不带主键, 查看事务锁的状态
drop table if exists test;
create table test(a int, b int, c int) engine=innodb;
insert into test values(1, 16, 17), (2, 32, 34);
-- connection 1:
set transaction isolation level serializable;
start transaction;
select * from test;
-- connection 2:
set transaction isolation level serializable;
start transaction;
update test set a = 9;
-- connection 3:
SHOW ENGINE INNODB STATUS\G
------------
TRANSACTIONS
------------
Trx id counter 0 5673
Purge done for trx's n:o < 0 5672 undo n:o < 0 0
History list length 24
Total number of lock structs in row lock hash table 2
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 4304, OS thread id 1162881344
MySQL thread id 20, query id 7423 localhost root
SHOW ENGINE INNODB STATUS
---TRANSACTION 0 5672, ACTIVE 3 sec, process no 4304, OS thread id 1162615104 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 368
MySQL thread id 19, query id 7422 localhost root Updating
update test set a = 9
------- TRX HAS BEEN WAITING 3 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 35 page no 3 n bits 72 index `GEN_CLUST_INDEX` of table `motoaccounts0/test` trx id 0 5672 lock_mode X waiting
Record lock, heap no 2 PHYSICAL RECORD: n_fields 6; compact format; info bits 0
 0: len 6; hex 000000002604; asc     & ;; 1: len 6; hex 000000001625; asc      %;; 2: len 7; hex 80000000340110; asc     4  ;; 3: len 4; hex 80000001; asc     ;; 4: len 4; hex 80000010; asc     ;; 5: len 4; hex 80000011; asc     ;;

------------------
---TRANSACTION 0 5670, ACTIVE 8 sec, process no 4304, OS thread id 1162348864
2 lock struct(s), heap size 368
MySQL thread id 18, query id 7419 localhost root
系统创建的索引的名字是GEN_CLUST_INDEX
索引结构中的字段个数(n_fields)为6, 第0个的长度是6字节(0: len 6;), 就是系统自动创建的隐含rowid; 后面两个1和2是系统内部使用的; 接下来第3,4,5代表表中的实际的字段

表如果带主键, 则是另一种情况
drop table if exists test;
create table test(a int primary key, b int, c int) engine=innodb;
insert into test values(1, 16, 17), (2, 32, 34);
-- connection 1:
set transaction isolation level serializable;
start transaction;
select * from test;
-- connection 2:
set transaction isolation level serializable;
start transaction;
update test set a = 9;
-- connection 3:
SHOW ENGINE INNODB STATUS\G
------------
TRANSACTIONS
------------
Trx id counter 0 5682
Purge done for trx's n:o < 0 5681 undo n:o < 0 0
History list length 27
Total number of lock structs in row lock hash table 2
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 4304, OS thread id 1162881344
MySQL thread id 20, query id 7434 localhost root
SHOW ENGINE INNODB STATUS
---TRANSACTION 0 5681, ACTIVE 2 sec, process no 4304, OS thread id 1162615104 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 368
MySQL thread id 19, query id 7433 localhost root Searching rows for update
update test set a = 9
------- TRX HAS BEEN WAITING 2 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 36 page no 3 n bits 72 index `PRIMARY` of table `motoaccounts0/test` trx id 0 5681 lock_mode X waiting
Record lock, heap no 2 PHYSICAL RECORD: n_fields 5; compact format; info bits 0
 0: len 4; hex 80000001; asc     ;; 1: len 6; hex 00000000162e; asc      .;; 2: len 7; hex 800000002d0110; asc     -  ;; 3: len 4; hex 80000010; asc     ;; 4: len 4; hex 80000011; asc     ;;

------------------
---TRANSACTION 0 5679, ACTIVE 6 sec, process no 4304, OS thread id 1162348864
2 lock struct(s), heap size 368
MySQL thread id 18, query id 7430 localhost root
索引变成PRIMARY. n_fields值减少了一个, 变为5(n_fields 5;). 第0个是主键字段(0: len 4; hex 80000001; asc ;;).

2) 因为数据是按主键顺序存储的, 如果插入记录, 主键的值是随机的, 为了保证索引树的平衡, 聚集索引将重组, 这会产生较多写操作, 并导致产生索引碎片. 所以记录应该按主键升序顺序插入, 可以选择自增长类型字段作为主键.

3) 主键数据值应该尽可能小. 因为在所有索引中都包含了主键键值, 如果主键很大, 其它二级索引也会很大, 占用更多的空间. 如果自然主键很大, 可增加一个自增长列作主键.

4) 对主键字段更新操作也会引起聚集索引重组, 导致索引节点上的行数据的移动, 因此应尽量避免主键更新.

3. 问题解答
select a, b from t1 where b like '50';
语句查询了a,b两个字段, 字段b上有二级索引, 因为二级索引节点内包含了主键, 从二级索引中可以得到主键的值, 所以不用去查询表, 只要查询此二级索引一次就可以得到a,b字段的值. 执行计划的extra信息显示出"Using index", 表明可以从索引中取得所有要查询的列, 这种方式被称为索引覆盖(index covering).



外部链接:

13.6.10. InnoDB Table and Index Structures
InnoDB Internals: InnoDB File Formats and Source Code Structure
High performance MySQL By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek Balling

How to exploit MySQL index optimizations
Everything you need to know about designing MySQL InnoDB primary keys
Index Layouts - Pro MySQL By Michael Kruckenberg, Jay Pipes
Innodb Performance Optimization



-fin-

Thursday, August 20, 2009

1z0-043 lesson 12 Automatic Storage Management

1z0-043 lesson 12

是否显示鄙人做的答案
是否显示标准答案


1.
QUESTION 14:
Consider the following configuration:
/devices/D1 is a member of disk group dgroupA.
/devices/D2 is a member of disk group dgroupA.
/devices/D3 is a member of disk group dgroupA.
You plan to add a new disk, /devices/D4, to then disk group dgroupA.
You execute the following command:
SQL> ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
Which task would be accomplished by the command?
A. The command adds the new disk, D4, to the disk group.
B. The command would result in an error because there is no disk by the name "'/devices/D*'"
C. The commnad will be ignored because disks starting with "D" are already members of the disk group.
D. The command would result in an error because no wildcard characters can be used in the disk name.
E. The command fisrt detaches all the member disks start with "D", and then reattaches them including the new disk.
A
A
见教材12-28


2.
QUESTION 16:
Immediately after adding a new disk to or removing an existing disk from an Automatic Storage Management(ASM) instance, you find that the performance of the database decreases initially, until the addition or removal process is completed. Performance then gradually returns to normal levels. Which two activities could you perform to maintain a consistent performance of the database while adding or removing disks?(Choose tow.)
A. increase the number of checkpoint processes
B. define the POWER option while adding or removing the disks
C. increase the number of DBWR processes by setting up a higher value for DB_WRITER_PROCESSES
D. increase the number of slave database writer processes by setting up higher value for DBWR_IO_SLAVES
E. increase the number of ASM Rebalance processes by setting up a higher value for ASM_POWER_LIMIT during the disk addition or removal
BE
E不对, 应该是减少才对
BE
见教材12-23
重新平衡会导致额外的IO, 影响了数据库性能, 所以应该是减小ASM_POWER_LIMIT


3.
QUESTION 19:
You are using an Automatic Storage Management(ASM) instance to manage the files of your production database. You have two disk groups, DG1 and DG2 with one device each. In the parameter file of the production database, the following parameters have been specified:
DB_CREATE_ONLINE_LOG_DEST_1='+dg1'
DB_CREATE_ONLINE_LOG_DEST_2='+dg2'
What would be the impact of this setting?
A. When a new log group is added, it would have one member in each disk group.
B. When a new log group is added, it would have two member in each disk group.
C. When a new tablespace is added, it would have one data file in each disk group.
D. When a new log file is added, it would have one member spread across the disk groups.
D
不知道
A
这个跟ASM没关系


4.
QUESTION 37:
Your production database uses an Automatic Storage Management(ASM) instance to manage its files. You want to add a new disk group to the ASM instance to manage the increased data load. What action would you perform to include the new disk group in the ASM instance without causing any impact on the currently connected users?
A. mount the new disk group in the ASM instance
B. restart the ASM instance and the production database instance
C. register the new disk groups in the production database instance
D. restart the ASM instance without restarting the production database instance
E. include the new disk group in the ASM_DISKSTRING parameter in the parameter file and restart the ASM instance
A
A
教材12-4
"This is done while the database is active."


5.
QUESTION 39:
In your production database you want to use an Automatic Storage Management(ASM) instance to manage the database files. Which option would you use to migrate the database files from a non-ASM instance to an ASM instance?
A. Oracle Migration Assistant
B. Recovery Manager(RMAN)
C. Oracle Data Pump Export and Import
D. conventional Oracle Export and Import
E. operating system uilities to copy the files to the ASM instance
B
B
教材12-34



6.
QUESTION 81:
You have a disk group, DGROUP1, with three disks and NORMAL redundancy. You execute the following command to create a template for the disk group:
ALTER DISKGROUP dgroup1
ADD TEMPLATE my_temp
ATTRIBUTES(MIRROR FINE);
Which statement is true?
A. When a file is created in DGROUP1 with the template, it would have three-way mirroring.
B. When a file is created in DGROUP1, the MY_TEMP template becomes the default template.
C. When a file is created in DGROUP1 with the template, it would have two-way mirroring and file striping.
D. When a file is created in DGROUP1 with the template, it would have three-way mirroring and file striping.
E. When a file is created in DGROUP1 with the template, it would have two-way mirroring but no file striping.
C
C
教材12-22, 缺省是两路镜像
PDF教材14-36


7.
QUESTION 91:
Consider the following command to add a new disk group called "tdgroupA" with two failover groups:
CREATE DISKGROUP tgroupA NORMAL REDUNDANCY
FAILOVERGROUP control01 DISK
'/devices/A1',
'/devices/A2',
'/devices/A3'
FAILOVERGROUP control02 DISK
'/devices/B1',
'/devices/B2',
'/devices/B3';
The disk "/devices/A1" is currently a member disk of a disk group by the name "tdgroup1".
Which task would be accomplished by the command?
A. This command would result in an error because a disk group can have only on failover group.
B. This command would result in an error because the /devices/A1 disk is a member of another disk group tdgroup1.
C. A new disk group called tdgroupA will be added with two failover groups and the /devices/A1 disk will get reattached to the new disk group without being detached from the existing one.
D. A new disk group called tdgroupA will be added with two failover groups and the /devices/A1 disk will be ignored for the new disk group becuase it is a member of an existing disk group tdgroup1.
E. A new disk group called tdgroupA will be added with two failover groups and the /devices/A1 disk gets detached from the existing disk group tdgroup1 and atteched to the new disk group tdgroupA.
B
不知道
B
教材12-27
FORCE indicates that a specified disk should be added to the specified disk group even though the disk is already formatted as a member of an ASM disk group.


8.
QUESTION 98:
Consider the following scenario:
You have a directory, data, under the disk group tdgroupA. You want to create an alias for on of the data files and you execute the following command:
ALTER DISKGROUP tdgroupA
ADD ALIAS '+tdgroupA/data/datafile.dbf'
FOR '+tdgroupA.231.45678';
Which task would be accomplished by the command?
A. The command drops the file +tdgroupA.231.45678.
B. The command physically relocated the file to +tdgroupA/data and renames the file to datafile.dbf.
C. The command creates a copy of the +tdgroupA.231.45678 file and places it in +tdgroupA/data after renaming the file to datafile.dbf.
D. The command creates an alias, datafile.dbf, and places it in +tdgroupA/data and does not remove the tdgroupA.231.45678 file.
E. The command creates a file, datafile.dbf, in +tdgroupA/data and removed the references for +tdgroupA.231.45678 from the data.
D
D
Oracle Database Administrator Guide Ch12 P25

PDF教材14-36


9.
QUESTION 108:
You have been assigned to manage a set of databases. The previous DBA did not leave you notes regarding the structure of each of the databases. While analyzing an instance, you notice that the system identifier(SID) for the instance is set to '+ASM'. What is the purpose for this instance?
A. This instance is being used to manage the operating system files.
B. This instance is being used to manage the files of other databases.
C. This instance is being used to manage the instances of other databases.
D. This instance is being used to manage the background processes of other instances.
B
B
教材12-9
DB_UNIQUE_NAME specifies the service provider name for which this ASM instance manages disk groups. The default value of +ASM must be modified only if you run multiple ASM instances on the same node.


10.
QUESTION 129:
Consider the following command to create a tablespace in your production database(which is using an Automatic Storage Management[ASM] instance to manage the database files):
CREATE TABLESPACE user_tbsp
DATAFILE '+dgroup3(user_temp)/user_files/user_tbsp' SIZE 200M;
What would be the result of this command?
A. It would result in an error because the template cannot be used along with the disk group.
B. It would result in an error because the path cannot be specified while creating a tablespace in a disk group.
C. It would create a tablespace with a data file that has an alias, and its attributes are set by the user-defined template.
D. It would create a tablespace with a data file that does not have an alias, and its attributes are set by the user-defined template.
C
C

PDF教材14-33讲了一点


11.
QUESTION 134:
Consider the following scenario:
You have a directory, data, under the disk group tdgroupA. You want to create an alias for one of the data files and you execute the following command:
ALTER DISKGROUP tdgroupA
ADD ALIAS '+tdgroupA/data/datafile.dbf'
FOR '+tdgroupA.231.45678';
Which task would be accomplished by the command?
A. The command drops the file +tdgroupA.231.45678
B. The command physically relocates the file to +tdgroupA/data and renames the file to datafile.dbf.
C. The command creates a copy of the +tdgroupA.231.45678 file and places it in +tdgroupA/data after renaming the file to datafile.dbf.
D. The command creates a synonym, datafile.dbf, and places it in +tdgroupA/data and dose not remove the +tdgroupA.231.45678 file.
E. The command creates a file, datafile.dbf, in +tdgroupA/data and removes the references for +tdgroupA.231.45678 from the data dictionary views.
D
D
Alias names(or just""aliases") are intended to provide a more use-friendly means of referring to ASM files, rather than using the system-generated filenames. You can create an alias for a file when you create it in the database, or you can add an alias to an existing file using the ADD ALIAS clause of the ALTER DISKGROUP statement. You can create an alias in any system-generated or user-created ASM directory. You cannot create an alias at the root level(+), however. The following statement adds a new alias name for a system-generated file name:
ALTER DISKGROUP dgroup1
ADD ALIAS '+dgroup1/mydir/second.dbf'
FOR '+dgroup1/sample/datafile/mytable.342.3';
REF.:Oracle(r) 10g Administrator Guide, 12-28

同第8题
PDF教材14-36


12.
QUESTION 152:
In your Automatic Storage Management(ASM) instance, one of the nonempty disk groups, DGROUP2, is no longer required and you want this disk group to be removed. You execute the following command to a achieve this objective:
DROP DISKGROUP dgroup1 EXCLUDING CONTENTS;
What would be the result of this command?
A. This command would result in an error because the disk group is not empty.
B. The command would distribute the contents of the specified disk group among all other disk groups and then drop the specified disk group.
C. The command would result in the contents being moved to the parent disk group and dropping of the disk group.
D. The command would result in the disk group being marked as INVALID because it cannot be dropped.
E. The command would drop the disk group, ignoring the EXCLUDING CONTENTS option.

A
有EXCLUDING这么用的吗?
A


Dropping Disk Groups
The default is EXCLUDING CONTENTS, which provides syntactic consistency and prevents you from dropping the disk group if it has any contents
DROP DISKGROUP
Specify EXCLUDING CONTENTS to ensure that Automatic Storage Management drops the disk group only when the disk group is empty. This is the default. If the disk group is not empty, an error will be returned.


13.
QUESTION 178:
You have an Automatic Storage Management(ASM) instance managing the database files of your production database. The database contains ASM files and non-ASM files. Using Recovery Manager(RMAN), you migrate the complete production database to use the ASM instance. Which statement is true?
A. RMAN would relocate all the data files to an ASM disk group and other files to an operating system location, defined using Oracle Managed Files(OMF).
B. RMAN would relocate the ASM files to an ASM disk group and the non-ASM files to an operating system location, defined using OMF.
C. RMAN would relocate all the database files to an ASM disk group.
D. RMAN would change the file definitions in the control file to use the ASM but would not relocate the database files physically.
C
C
教材12-34
Although files in a tablespace may be both ASM files and non-ASM files as a result of the tablespace history, RMAN commands enable non-ASM files to be relocated to an ASM disk group.


-----


14.
32. An ASM disk group can manage database files from how many different databases?
A. 1
B. 2
C. Limited only by disk space.
D. ASM disk groups manage tablespaces, not database files.
C
C
C. An ASM disk group can manage database files for essentially an unlimited number of different databases. Creating ASM disk groups is discussed in Chapter 9.

教材12-29
However, a disk group may contain files belonging to several databases, and a single database may use storage from multiple disk groups.


15.
33. High redundancy disk groups must have how many failure groups? (Choose the best answer.)
A. 1, because high redundancy disk groups rely on external RAID hardware or software
B. 2
C. Exactly 3
D. 3 or more
D
D
D. High redundancy disk groups require disks in at least three failure groups, but they can contain more if a higher level of redundancy or performance is desired. Controlling disk group redundancy is detailed in Chapter 9.

教材12-22
High redundancy:
Three-way mirroring
At least three failure groups


16.
34. Automatic Storage Management (ASM) disk group mirroring is done at which level?
A. Tablespace level
B. Extent level
C. Segment level
D. Datafile level
B
B
B. Disk group mirroring for ASM is done at the extent level. To learn about Automatic Storage Management mirroring, see Chapter 9.

说的不准确, 应该是以分配单元(AU)为单位

PDF教材14-21, (这个教材比较老, 所以说的不准确)
ASM does not mirror disks; rather, it mirrors extents.

教材12-20
ASM always spreads files evenly in 1 MB allocation unit (AU) chunks across all the disks in a disk group.
教材12-22
ASM does not mirror disks; rather, it mirrors allocation units.


17.
35. Identify two valid types of Oracle instances.
A. RMAN
B. DSKMGR
C. ASM
D. DBMS
E. RDBMS
CE
CE
C, E. ASM instances manage ASM disk groups, and RDBMS instances are the traditional and only type of instance available before Oracle Database 10g. Configuring ASM and RDBMS instances for Automatic Storage Management is covered in Chapter 9.

教材12-9
INSTANCE_TYPE should be set to ASM for ASM instances.
教材12-10
INSTANCE_TYPE defaults to RDBMS and specifies that this instance is an RDBMS instance.

---

18.
1. Extents in an ASM file are allocated in units of which size?
A. 100KB
B. 10MB
C. 1MB
D. 64KB
C
忘了
C
C. ASM disks are partitioned in allocation units of one megabyte each.

教材12-20
ASM always spreads files evenly in 1 MB allocation unit (AU) chunks across all the disks in a disk group.


19.
2. To prevent connections to an ASM instance, you can use which of the following commands? (Choose the best answer.)
A. ALTER SYSTEM ENABLE RESTRICTED SESSION
B. SHUTDOWN IMMEDIATE
C. ALTER SYSTEM DISABLE CONNECTIONS
D. ALTER DATABASE ENABLE RESTRICTED SESSION
A
A
A. Similar to an RDBMS instance, you can use ALTER SYSTEM ENABLE RESTRICTED SESSION to prevent connections to the instance. While SHUTDOWN IMMEDIATE will prevent connections to the ASM instance, this is most likely overkill if all you want to do is temporarily prevent connections. Choices C and D are not valid commands and will generate an error message.

PDF教材14-8
Finally, you can prevent database instances from connecting to an ASM instance. When the command ALTER SYSTEM ENABLE RESTRICTED SESSION is issued to an ASM instance, database instances cannot connect to that ASM instance. Conversely, ALTER SYSTEM DISABLE RESTRICTED SESSION enables connections from database instances. This command permits an ASM instance to start up and mount disk groups for purposes of maintenance without allowing database instances to access the disk groups.


20.
3. Which initialization parameter in an ASM instance specifies the disk groups to be automatically mounted at instance startup?
A. ASM_DISKMOUNT
B. ASM_DISKGROUP
C. ASM_DISKSTRING
D. ASM_MOUNTGROUP
B
B
B. The initialization parameter ASM_DISKGROUP, valid only in an ASM instance, specifies the disk groups to be automatically mounted when the ASM instance starts. ASM_DISKSTRING is operating system dependent and restricts the file system devices that can be used to create disk groups. ASM_DISKMOUNT and ASM_MOUNTGROUP are not valid initialization parameters.

教材12-9
ASM_DISKGROUPS is the list of names of disk groups to be mounted by an ASM instance at startup, or when the ALTER DISKGROUP ALL MOUNT command is used.


21.
4. Which of the following command options is not valid for an ASM instance?
A. STARTUP OPEN
B. STARTUP NOMOUNT
C. STARTUP MOUNT
D. STARTUP OPEN RESTRICT
E. SHUTDOWN ABORT
A
D也不行?
A
A. An ASM instance can be started up and shut down in the same way that an RDBMS database can, except that an ASM instance cannot be in the OPEN state because it does not have a data dictionary or a control file.

为啥D可以?


22.
5. When an ASM instance receives a SHUTDOWN NORMAL command, what command does it pass on to all database instances that rely on the ASM instance’s disk groups?
A. TRANSACTIONAL
B. IMMEDIATE
C. ABORT
D. NORMAL
E. None of the above
D
D
D. When an ASM instance receives a SHUTDOWN command, it passes the same option (NORMAL, IMMEDIATE or TRANSACTIONAL) to all database instances that rely on the ASM instance for disk group services.

PDF教材14-18
Upon receiving the shutdown command, the ASM instance forwards the shutdown command with the same shutdown mode (NORMAL, IMMEDIATE, TRANSACTIONAL) to all database instances dependent on the ASM instance.


23.
6. When creating a disk group, what keyword must be specified if you need to reuse a disk that has previously been used as part of another disk group?
A. NOFORCE
B. REUSE
C. USE
D. FORCE
E. INCLUDING CONTENTS
D
D
D. You must use FORCE if the disk has previously been used as part of a disk group. If the disk has never been used as part of a disk group, using the FORCE keyword returns an error.

教材12-27
FORCE indicates that a specified disk should be added to the specified disk group even though the disk is already formatted as a member of an ASM disk group.


24.
7. Which of the following ASM file templates is not striped as fine?
A. FLASHBACK
B. ARCHIVELOG
C. CONTROLFILE
D. ONLINELOG
A
或者是B?
B
B. Files such as ARCHIVELOG files use coarse-grained striping. Fine striping stripes the files every 128KB while coarse striping stripes the files every 1MB. All file types with the exception of FLASHBACK, CONTROLFILE, and ONLINELOG are striped coarse.

见PDF教材14-35表格


25.
8. You want to migrate your database to ASM, so you’ve done a clean shutdown, made a closed backup of the entire database, noted the location of your control files and online redo log files, and changed your SPFILE to use OMF. The last step is running an RMAN script to do the conversion. Using the following steps, what is the correct order in which the following RMAN commands should be executed?
1. STARTUP NOMOUNT
2. ALTER DATABASE OPEN RESETLOGS
3. SQL "ALTER DATABASE RENAME 'logfile1 path' TO '+dgrp4 '"   # plus all other log files
4. SWITCH DATABASE TO COPY
5. BACKUP AS COPY DATABASE FORMAT '+dgrp4'
6. ALTER DATABASE MOUNT
7. RESTORE CONTROLFILE FROM 'controlfile_location'
A. 2, 5, 3, 1, 7, 6, 4
B. 1, 7, 6, 5, 4, 3, 2
C. 5, 1, 2, 7, 4, 6, 3
D. 7, 3, 1, 5, 6, 2, 4
B
B
B. After the RMAN script is run and the database is up and running successfully, you may delete the old database files.

教材12-34


26.
9. How can you reverse the effects of an ALTER DISKGROUP ... DROP DISK command if it has not yet completed?
A. Issue the ALTER DISKGROUP ... ADD DISK command.
B. Issue the ALTER DISKGROUP ... UNDROP DISKS command.
C. Issue the ALTER DISKGROUP ... DROP DISK CANCEL command.
D. Retrieve the disk from the recycle bin after the operation completes.
B
B
B. If the DROP DISK operation has not yet completed, you can cancel and roll back the entire DROP DISK operation by using ALTER DISKGROUP ... UNDROP DISKS, with the disk group still being continuously available to all users.

教材12-30
The third statement shows how to cancel a disk drop operation. The UNDROP command operates only on pending drops of disks; it has no effect on drops that have completed.


27.
10. To reference existing ASM files, you need to use a fully qualified ASM filename. Your development database has a disk group named DG2A, the database name is DEV19, and the ASM file that you want to reference is a datafile for the USERS02 tablespace. Which of the following is a valid ASM filename for this ASM file?
A. dev19/+DG2A/datafile/users02.701.2
B. +DG2A/dev19/datafile/users02.701.2
C. +DG2A/dev19/users02/datafile.701.2
D. +DG2A.701.2
E. +DG2A/datafile/dev19.users.02.701.2
B
好像D也是合法的?
B
B. A fully qualified existing ASM filename has the format +group/dbname/filetype/tag.file.incarnation. In this case, filetype is datafile, and tag is the tablespace name to which it belongs, or users02.

题目中问的是全称(fully qualified name), 所以不选D
PDF教材14-32


28.
11. Which background process coordinates the rebalance activity for disk groups?
A. ORBn
B. OSMB
C. RBAL
D. ASMn
C
C
C. RBAL coordinates rebalance activity for a disk group in an ASM instance, ORBn actually performs the extent movement in an ASM instance, and OSMB acts as a bridge between the ASM instance and the RDBMS instance. There is no such process name ASMn.

教材12-5
One coordinates rebalance activity for disk groups. It is called RBAL.


29.
12. On the development database rac0 there are six raw devices: /dev/raw/raw1 through /dev/raw/raw6. /dev/raw/raw1 and /dev/raw/raw2 are 8GB each, and the rest are 6GB each. An existing disk group +DATA1, of NORMAL REDUNDANCY, uses /dev/raw/raw1 and /dev/raw/raw2. Which series of the following commands will drop one of the failure groups for +DATA1, create a new disk group +DATA2 using two of the remaining four raw devices, and then cancel the drop operation from +DATA1?
A.
ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;
CREATE DISKGROUP DATA2 NORMAL REDUNDANCY
  FAILGROUP DATA1A DISK '/dev/raw/raw3'
  FAILGROUP DATA1B DISK '/dev/raw/raw4';
ALTER DISKGROUP DATA1 UNDROP DISKS;
B.
ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;
CREATE DISKGROUP DATA2 HIGH REDUNDANCY
  FAILGROUP DATA1A DISK '/dev/raw/raw3'
  FAILGROUP DATA1B DISK '/dev/raw/raw4'
ALTER DISKGROUP DATA1 UNDROP DISKS;
C.
ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;
CREATE DISKGROUP DATA2 NORMAL REDUNDANCY
  FAILGROUP DATA1A DISK '/dev/raw/raw3'
  FAILGROUP DATA1B DISK '/dev/raw/raw4';
ALTER DISKGROUP DATA1 UNDROP DATA1_0001;
D.
ALTER DISKGROUP DATA1 DROP DISK DATA1_0001
  ADD DISKGROUP DATA2 NORMAL REDUNDANCY
  FAILGROUP DATA1A DISK '/dev/raw/raw3'
  FAILGROUP DATA1B DISK '/dev/raw/raw4';
ALTER DISKGROUP DATA1 UNDROP DISKS;
A
题意不清,B也对?
A
A. Note that the UNDROP operation will cancel a drop operation in progress but cannot reverse a drop operation that has already completed. For HIGH REDUNDANCY, at least three failure groups must be specified. While you can combine a drop and add operation into one command, the command can reference only one disk group.

高冗余度至少需要3个硬盘, 所以不选B


30.
13. Which type of database file is spread across all disks in a disk group?
A. All types of files are spread across all disks in the disk group.
B. Datafiles
C. Redo log files
D. Archived redo log files
E. Control files
A
A
A. All types of database files are spread across all disks in the disk group to ensure redundancy unless the redundancy is set to EXTERNAL.

教材12-19
ASM files are always spread across all the ASM disks in the disk group.


31.
14. How can you reverse the effects of an ALTER DISKGROUP ... DROP DISK command if it has already completed?
A. Issue the ALTER DISKGROUP ... ADD DISK command.
B. Issue the ALTER DISKGROUP ... UNDROP DISKS command.
C. Issue the ALTER DISKGROUP ... DROP DISK CANCEL command.
D. Retrieve the disk from the recycle bin after the operation completes.
B
A
A. If the DROP DISK operation has already completed, you must use ALTER DISKGROUP ... ADD DISK to add the disk back to the disk group. In any case, the disk group is continuously available to all users.

教材12-30


32.
15. Which of the following ALTER DISKGROUP commands does not use V$ASM_OPERATION to record the status of the operation?
A. ADD DIRECTORY
B. DROP DISK
C. RESIZE DISK
D. REBALANCE
E. ADD FAILGROUP
A
A
A. The ADD DIRECTORY command does not use V$ASM_OPERATION to track its progress, because this operation adds only a small amount of metadata—a directory object—to the disk group and takes a minimal amount of time to complete.

教材14-29
The ALTER DISKGROUP DROP, RESIZE, and REBALANCE commands return before the operation is complete. To monitor progress of these long-running operations, you can query the V$ASM_OPERATION fixed view.


33.
16. If you use ALTER DISKGROUP ... ADD DISK and specify a wildcard for the discovery string, what happens to disks that are already a part of the same or another disk group?
A. The command fails unless you specify the FORCE option.
B. The command fails unless you specify the REUSE option.
C. The command must be reissued with a more specific discovery string.
D. The other disks already part of the disk group are ignored.
D
D
D. The ALTER DISKGROUP ... ADD DISK command adds all disks that match the discovery string but are not already part of the same or another disk group.

教材12-28
The second command adds A4 to the DGROUPA disk group. It ignores the other disks, even though they match the discovery string, because they are already part of the DGROUPA disk group.


34.
17. Choose the set of the following initialization parameters that is valid and recommended for an ASM instance.
A. INSTANCE_TYPE=RDBMS
ASM_POWER_LIMIT=2
LARGE_POOL_SIZE=8MB
DB_UNIQUE_NAME=+ASM
ASM_DISKGROUPS=DATA1,DATA2
B. INSTANCE_TYPE=ASM
ASM_POWER_LIMIT=2
LARGE_POOL_SIZE=8MB
DB_UNIQUE_NAME=+ASM
ASM_DISKGROUPS=DATA1,DATA2
C. INSTANCE_TYPE=ASM
ASM_POWER_LIMIT=15
LARGE_POOL_SIZE=8MB
DB_UNIQUE_NAME=+ASM
ASM_DISKGROUPS=DATA1,DATA2
D. INSTANCE_TYPE=ASM
ASM_POWER_LIMIT=2
LARGE_POOL_SIZE=4MB
DB_UNIQUE_NAME=+ASM
ASM_DISKGROUPS=DATA1,DATA2
B
B
B. The INSTANCE_TYPE for an ASM instance is ASM; otherwise, it is RDBMS, whether it uses ASM or not. The ASM_POWER_LIMIT command controls the speed of a disk group rebalance, but its maximum value is 11. For an ASM instance, the minimum recommended value for LARGE_POOL_SIZE is 8MB.

教材12-9


35.
18. Which of the following scenarios concerning ASM instance shutdown is correct?
A. When an ASM instance is shut down with NORMAL, IMMEDIATE, or TRANSACTIONAL, the same shutdown command is passed to the dependent instances and the ASM instance waits for all dependent instances to shut down before it shuts down.
B. When an ASM instance shuts down with NORMAL, an alert is sent to all dependent instances, notifying the DBA to shut down the dependent instances manually before the ASM instance shuts down.
C. When an ASM instance shuts down with the TRANSACTIONAL option, all dependent instances shut down with NORMAL, IMMEDIATE, or TRANSACTIONAL, depending on the dependent database’s default.
D. When an ASM instance is shut down with NORMAL, IMMEDIATE, or TRANSACTIONAL, the same shutdown command is passed to the dependent instances and the ASM instance does not wait for all dependent instances to shut down before it shuts down.
E. When an ASM instance shuts down with the IMMEDIATE option, the ASM instance shuts down immediately and all dependent instances shut down with ABORT.
A
A
A. When an ASM instance shuts down with NORMAL, IMMEDIATE, or TRANSACTIONAL, the same shutdown option is passed to all dependent instances and the ASM instance waits for the dependent instances to shut down before shutting itself down. If an ASM instance shuts down with ABORT, it immediately shuts down, the dependent instances lose their connection to the ASM instance, and as a result, they shut down with ABORT either before or after the ASM instance shuts down completely.

PDF教材14-18


36.
19. A database can create datafiles in how many different disk groups? (Choose the best answer.)
A. Each datafile in the database can reside in a different disk group.
B. One
C. Disk groups manage tablespaces, not datafiles.
D. A maximum of two, one for SYSTEM and SYSAUX and the other tablespaces in another disk group.
A
A
A. Each database datafile can reside in a different disk group; each disk group can also contain datafiles from other databases.

教材12-19


37.
20. ASM supports all of the following file types except for which of the following? (Choose all that apply.)
A. Database files
B. SPFILEs
C. Redo log files
D. Archived log files
E. RMAN backup sets
F. Password files
G. init.ora files
FGB
FG
F, G. ASM supports datafiles, log files, control files, archive logs, RMAN backup sets, SPFILEs, and other Oracle database file types, but not password files or init.ora files.

PDF教材14-34表格



-fin-

Thursday, August 13, 2009

gone fishing

gone fishing

去钓鱼就是指去度假(vacation)了, 大概因为美国人度假时比较喜欢钓鱼?
有旷工的(absent from duty),关闭的(closed),停止服务(out of service)的意思

例句:
One Republican congressman complained that "it was hard for Mr. Bush to get his message out if the White House lectern had a ‘Gone Fishing' sign on it."

Gone Fishin'. Okay, not really. But after some consideration, I’ve decided to take the summer off from blogging.

I've been looking through the documentation, and I don't seem to see mentioned anywhere how I can setup auto-replies, or canned replies on an account by account basis. I seem to remember having done this on other mailer systems using a .gone-fishing or .vacation file.



-fin-

Slow queries issue

Troubleshooting case study: Slow queries issue


提问1
Focus on the queries of this form:
### 423 Queries 
### Total time: 13459, Average time: 31.8179669030733
### Taking 13  to 74  seconds to complete
### Rows analyzed 0 - 38
use db1;
SELECT *     FROM t_u_sch     WHERE s_time <= XXX     ORDER BY s_time ASC     LIMIT XXX     FOR UPDATE;

use db1;
SELECT *     FROM t_u_sch     WHERE s_time <= 1234567890     ORDER BY s_time ASC     LIMIT 38     FOR UPDATE;


These are scheduler related queries in the DB1 for FB, Twitter, MySpace, etc. We’re selecting a bunch of accounts to schedule work items for. So we select then update the last scheduled sync time column. We also insert new accts in these tables.


回答1
it's still hard to tell the root cause at the moment. but we found index of t_u_sch is fragmented,

mysql> show table status like
    -> 't_u_sch';
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| Name              | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation       | Checksum | Create_options | Comment                                                                          |
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| t_u_sch           | InnoDB |      10 | Compact    | 1140 |            172 |      196608 |               0 |    336592896 |         0 |           NULL | 2009-06-29 23:59:29 | NULL        | NULL       | utf8_general_ci |     NULL |                | InnoDB free: 3072 kB; (`b_a_id      `) REFER `db1/t_u     `(`b_a_id      `) ON D |
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
1 row in set (0.13 sec)

as you can see index length is abnormally larger than the data length, it may be caused by frequently deletion and insertion on table. when an index becomes fragmented, index scan query will take longer time. to defrag it and free up spaces, you can use "optimize table ..." or "alter table ... engine=innodb"

mysql> alter table t_u_sch ENGINE=INNODB;
Query OK, 763 rows affected (0.25 sec)
Records: 763  Duplicates: 0  Warnings: 0

mysql> show table status like 't_u_sch';
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| Name              | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation       | Checksum | Create_options | Comment                                                                          |
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| t_u_sch           | InnoDB |      10 | Compact    |  871 |            131 |      114688 |               0 |        49152 |         0 |           NULL | 2009-08-06 10:46:00 | NULL        | NULL       | utf8_general_ci |     NULL |                | InnoDB free: 0 kB; (`b_a_id      `) REFER `db1/t_u     `(`b_a_id      `) ON DELE |
+-------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
1 row in set (0.00 sec)


other *_u_sch* tables also need to be defragmented by this way.

thanks.

发现有些InnoDB表的索引很大, 而且随着时间推移不断的增大, 与实际数据量很不相符, 实际只有1000条左右的记录.
对这个表的操作主要是大量的UPDATE, 怀疑索引因此产生了碎片或平衡树的结构"失衡"了(Oracle数据库中也有这种情况)
但不能确定, 也不知道如何在测试系统上重现此错误(测试时发现如果不提交, UPDATE操作确实会导致索引一直变大, 但提交后, 发现过一段时间MySQL会自动收缩索引, 可以看到index_length变小)
临时的解决方法是, 定期优化表(optimize table ...), 达到重建索引, 释放空间的目的



提问2

We are continuing to get slow queries and used "SHOW TABLE STATUS' to see if there is index fragmentation. For some tables, I am finding that 'Index_length' is zero even though there are indexes on the table. This is happening on db.some.where.com.

For example:
# Time: 090806 21:48:12
# User@Host: user1[user1] @ a1.some.where.com [12.34.56.78]
# Query_time: 7  Lock_time: 0  Rows_sent: 6  Rows_examined: 6
use db1;
SELECT * FROM t_s_ch      WHERE b_a_id = '123456ABC' AND           s_a >= 28924     ORDER BY s_a ASC     LIMIT 2147483647;

mysql> show table status like 't_s_ch';
+-------------------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| Name              | Engine | Version | Row_format | Rows    | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation       | Checksum | Create_options | Comment                                                                          |
+-------------------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
| t_s_ch            | InnoDB |      10 | Compact    | 9462693 |            164 |  1559756800 |               0 |            0 |         0 |           NULL | 2009-04-24 17:21:19 | NULL        | NULL       | utf8_general_ci |     NULL |                | InnoDB free: 45056 kB; (`b_a_id      `) REFER `db1/f_u     `(`b_a_id      `) ON  | 
+-------------------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------------------------------+
1 row in set (0.70 sec)

Is there a reason why 'Index_length' would be zero? I am checking Google and I haven't found a reason so far. Does this table not have an index anymore?


回答2

I think it's an expected behavior. In InnoDB, every table must have a clustered index, data records are stored as leaf nodes of this index, which means clustered index is the data records, it is counted as data_length not index_length. In your case, the primacy key is the clustered index, and no other indexes exist, so index_length is zero.

InnDB表都必须有一个聚集索引(clustered index), 记录数据存储在这个聚集索引中, 类似于Oracle的索引组织表(index-organized table).
如果表上定义了主键, 则使用主键作为聚集索引
否则选择第一个非空的唯一索引作为聚集索引
如果都没有, 则内部创建一个隐藏的rowid单调递增列, 基于该列创建隐藏的聚集索引
(参考13.6.10.1. Clustered and Secondary Indexes)

所以聚集索引也就是记录数据, 算作data_length,而不是index_length


回答3

1.
from mysqladmin status output and slow query log, it seems there are some slow queries using full table scans

so we suggest:
1)add an index on customer_tab(custid,deptid)

2)extend the index in con_gr_tab/con_tab/con_id_tab/con_tab2 from (cust_id) to (cust_id,sn)

3)for following select statement, it is better to use "=" for comparision rather than "like"
SELECT d.deptid, d.customid, d.sn, d.version, d.email, d.dmi, d.area, d.provider, d.manufacturer, d.nation, d.number FROM custominfo d WHERE d.deptid LIKE '1234567890' LIMIT 100;

4)change dept_id in db_a_tab/db_base_tab/db_queue_tab/db_b_tab from varchar(80) to bigint(20)

5)decrease the size of cust_id in customs_tab from varchar(512) to varchar(80)


2.
in dbs, general/slow query logs are growing huge,
[db1.some.where.com]
-rw-rw---- 1 mysql mysql           0 Aug 11 15:56 /mysql_logs/error.log
-rw-rw---- 1 mysql mysql 41254683176 Aug 12 06:41 /mysql_logs/general.log
-rw-rw---- 1 mysql mysql  2117239370 Aug 12 06:41 /mysql_logs/slow-queries.log
[db2.some.where.com]
-rw-rw---- 1 mysql mysql           0 Aug 11 15:56 /mysql_logs/error.log
-rw-rw---- 1 mysql mysql 32935022398 Aug 12 06:41 /mysql_logs/general.log
-rw-rw---- 1 mysql mysql   458081312 Aug 12 06:41 /mysql_logs/slow-queries.log
[db3.some.where.com]
-rw-rw---- 1 mysql mysql           0 Aug 11 15:56 /mysql_logs/error.log
-rw-rw---- 1 mysql mysql 30089483757 Aug 12 06:41 /mysql_logs/general.log
-rw-rw---- 1 mysql mysql  1156294323 Aug 12 06:41 /mysql_logs/slow-queries.log
[db4.some.where.com]
-rw-rw---- 1 mysql mysql           0 Aug 11 15:56 /mysql_logs/error.log
-rw-rw---- 1 mysql mysql 29886541601 Aug 12 06:41 /mysql_logs/general.log
-rw-rw---- 1 mysql mysql  1871892345 Aug 12 06:41 /mysql_logs/slow-queries.log

these logs need to be cleaned up, logrotate can do this, for example:
# cat /etc/logrotate.d/mysql
/mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log {
  daily
  create 0660 mysql mysql
  notifempty
  #size 100M
  missingok
  nocompress
  rotate 120
  sharedscripts
  postrotate
    /usr/bin/mysqladmin flush-logs
  endscript
}
 
# logrotate -f /etc/logrotate.d/mysql

it is also recommended to turn on general query log only when needed, since it is probably an impact on performance. to disable it, a restart of mysql server is required.
if using mysql 5.1, it can be disabled/enabled dynamically without restarting mysql.


3. for better innodb performance, increase innodb_buffer_pool_size, for example to 6g. in general, it can be set up to 80% of phsical memory size.


1.使用命令"mysqladmin extented-status -r -i60", 查看指定时间间隔内的数据库状态值的变化情况
Select_scan,Sort_scan说明存在全表扫描
通过查看慢速查询日志(slow query log), 能够发现运行时间超过指定时长的SQL语句
2.Linux自带Logrotate工具实现Mysql查询日志的归档
3.InnoDB缓冲池最好设大些, 比如通常可以设置为物理内存的80%



-fin-

Tuesday, August 11, 2009

Rotating MySQL log files

Rotating MySQL log files
轮换MySQL日志文件

用Logrotate维护MySQL日志


通常打开MySQL的普通查询日志(general query log)和慢速查询日志(slow query log), 以便查找(可能)出现的问题
在繁忙的系统中, 日志文件增长很快, 对大文件查询起来不方便, 写日志文件本身也会影响磁盘性能

MySQL 5.0中普通/慢速查询日志参数是个静态的参数,只能通过重启MySQL服务生效
MySQL 5.1版本后普通/慢速查询日志参数是动态的, 能够动态的启用或关闭. 可以平时关闭普通查询日志, 当需要时再打开

当日志文件增长过大时需要截断(truncate), 使用命令"> logfile"
此命令清空文件全部内容,而不删除文件
# ls -l install.log.bak
-rw-r--r-- 1 root root 17244 Jun  1 09:29 install.log.bak
# >install.log.bak
# ls -l install.log.bak
-rw-r--r-- 1 root root 0 Aug 11 06:45 install.log.bak
#

截断日志文件后以前的内容就没有了, 所以这并非是一个理想的方案, 需要的是对日志进行归档, 保留旧的日志, 产生新的日志文件
方法见MySQL参考手册:
shell> mv host_name.log host_name-old.log
shell> mysqladmin flush-logs
shell> cp host_name-old.log backup-directory
shell> rm host_name-old.log
  • 日志文件改名, 这不会使MySQL服务终止, 所以不影响在线业务
  • 运行flush-logs命令, 刷新日志文件(包括关闭/重新打开查询日志文件)
  • 备份旧的日志文件
  • 删除旧的日志文件

使用linux系统中logrotate自动工作, 配置文件如下:
cat >/etc/logrotate.d/mysql <<'EOF'
/mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log {
  daily
  create 0660 mysql mysql
  notifempty
  #size 100M
  missingok
  nocompress
  rotate 120
  sharedscripts
  postrotate
    if test -x /usr/bin/mysqladmin && \
       /usr/bin/mysqladmin ping &>/dev/null
    then
       /usr/bin/mysqladmin flush-logs
    fi
  endscript
}
EOF
daily: 每天归档一次
create 0660 mysql mysql: 归档后创建新文件
notifempty: 文件为空时不做处理
#size 100M: 文件大小超过100M也归档
missingok: 文件不存在时不报错
nocompress: 不压缩归档文件
rotate 120: 保留120个归档文件
sharedscripts: 共享的脚本,意味着对所有文件只运行一次
postrotate: 轮换后要运行的脚本

试运行一下
/usr/sbin/logrotate -vf /etc/logrotate.d/mysql
查看结果
[root@db01 /mysql/logs]# ll
total 1675432
-rw-rw---- 1 mysql mysql        472 Aug 11  2009 error.log
-rw-rw---- 1 mysql mysql        472 Aug 11 15:03 error.log.1
-rw-rw---- 1 mysql mysql        472 Aug 11 14:57 error.log.2
-rw-rw---- 1 mysql mysql          0 Aug 11 15:03 error.log-old
-rw-rw---- 1 mysql mysql        687 Aug 11  2009 general.log
-rw-rw---- 1 mysql mysql       1082 Aug 11 15:03 general.log.1
-rw-rw---- 1 mysql mysql      37115 Aug 11 15:01 general.log.2
-rw-rw---- 1 mysql mysql 1693930999 Aug 11 11:06 general.log.3
-rw-rw---- 1 mysql mysql        354 Aug 11  2009 slow-queries.log
-rw-rw---- 1 mysql mysql        354 Aug 11 15:03 slow-queries.log.1
-rw-rw---- 1 mysql mysql   18263218 Aug 11 14:57 slow-queries.log.2
[root@db01 /mysql/logs]# /usr/sbin/logrotate -v /etc/logrotate.d/mysql
reading config file /etc/logrotate.d/mysql
reading config info for /mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log

Handling 1 logs

rotating pattern: /mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log  after 1 days (120 rotations)
empty log files are not rotated, old logs are removed
considering log /mysql/logs/error.log
  log does not need rotating
considering log /mysql/logs/general.log
  log does not need rotating
considering log /mysql/logs/slow-queries.log
  log does not need rotating
not running postrotate script, since no logs were rotated
[root@db01.cloud2.bqa3.blurdev.com /mysql/logs]# /usr/sbin/logrotate -vf /etc/logrotate.d/mysql
reading config file /etc/logrotate.d/mysql
reading config info for /mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log

Handling 1 logs

rotating pattern: /mysql/logs/error.log /mysql/logs/general.log /mysql/logs/slow-queries.log  forced from command line (120 rotations)
empty log files are not rotated, old logs are removed
considering log /mysql/logs/error.log
  log needs rotating
considering log /mysql/logs/general.log
  log needs rotating
considering log /mysql/logs/slow-queries.log
  log needs rotating
rotating log /mysql/logs/error.log, log->rotateCount is 120
renaming /mysql/logs/error.log.120 to /mysql/logs/error.log.121 (rotatecount 120, logstart 1, i 120),
old log /mysql/logs/error.log.120 does not exist
renaming /mysql/logs/error.log.119 to /mysql/logs/error.log.120 (rotatecount 120, logstart 1, i 119),
old log /mysql/logs/error.log.119 does not exist
renaming /mysql/logs/error.log.118 to /mysql/logs/error.log.119 (rotatecount 120, logstart 1, i 118),
old log /mysql/logs/error.log.118 does not exist
renaming /mysql/logs/error.log.117 to /mysql/logs/error.log.118 (rotatecount 120, logstart 1, i 117),
old log /mysql/logs/error.log.117 does not exist
renaming /mysql/logs/error.log.116 to /mysql/logs/error.log.117 (rotatecount 120, logstart 1, i 116),
old log /mysql/logs/error.log.116 does not exist
renaming /mysql/logs/error.log.115 to /mysql/logs/error.log.116 (rotatecount 120, logstart 1, i 115),
old log /mysql/logs/error.log.115 does not exist
renaming /mysql/logs/error.log.114 to /mysql/logs/error.log.115 (rotatecount 120, logstart 1, i 114),
old log /mysql/logs/error.log.114 does not exist
renaming /mysql/logs/error.log.113 to /mysql/logs/error.log.114 (rotatecount 120, logstart 1, i 113),
old log /mysql/logs/error.log.113 does not exist
renaming /mysql/logs/error.log.112 to /mysql/logs/error.log.113 (rotatecount 120, logstart 1, i 112),
old log /mysql/logs/error.log.112 does not exist
renaming /mysql/logs/error.log.111 to /mysql/logs/error.log.112 (rotatecount 120, logstart 1, i 111),
old log /mysql/logs/error.log.111 does not exist
renaming /mysql/logs/error.log.110 to /mysql/logs/error.log.111 (rotatecount 120, logstart 1, i 110),
old log /mysql/logs/error.log.110 does not exist
renaming /mysql/logs/error.log.109 to /mysql/logs/error.log.110 (rotatecount 120, logstart 1, i 109),
old log /mysql/logs/error.log.109 does not exist
renaming /mysql/logs/error.log.108 to /mysql/logs/error.log.109 (rotatecount 120, logstart 1, i 108),
old log /mysql/logs/error.log.108 does not exist
renaming /mysql/logs/error.log.107 to /mysql/logs/error.log.108 (rotatecount 120, logstart 1, i 107),
old log /mysql/logs/error.log.107 does not exist
renaming /mysql/logs/error.log.106 to /mysql/logs/error.log.107 (rotatecount 120, logstart 1, i 106),
old log /mysql/logs/error.log.106 does not exist
renaming /mysql/logs/error.log.105 to /mysql/logs/error.log.106 (rotatecount 120, logstart 1, i 105),
old log /mysql/logs/error.log.105 does not exist
renaming /mysql/logs/error.log.104 to /mysql/logs/error.log.105 (rotatecount 120, logstart 1, i 104),
old log /mysql/logs/error.log.104 does not exist
renaming /mysql/logs/error.log.103 to /mysql/logs/error.log.104 (rotatecount 120, logstart 1, i 103),
old log /mysql/logs/error.log.103 does not exist
renaming /mysql/logs/error.log.102 to /mysql/logs/error.log.103 (rotatecount 120, logstart 1, i 102),
old log /mysql/logs/error.log.102 does not exist
renaming /mysql/logs/error.log.101 to /mysql/logs/error.log.102 (rotatecount 120, logstart 1, i 101),
old log /mysql/logs/error.log.101 does not exist
renaming /mysql/logs/error.log.100 to /mysql/logs/error.log.101 (rotatecount 120, logstart 1, i 100),
old log /mysql/logs/error.log.100 does not exist
renaming /mysql/logs/error.log.99 to /mysql/logs/error.log.100 (rotatecount 120, logstart 1, i 99),
old log /mysql/logs/error.log.99 does not exist
renaming /mysql/logs/error.log.98 to /mysql/logs/error.log.99 (rotatecount 120, logstart 1, i 98),
old log /mysql/logs/error.log.98 does not exist
renaming /mysql/logs/error.log.97 to /mysql/logs/error.log.98 (rotatecount 120, logstart 1, i 97),
old log /mysql/logs/error.log.97 does not exist
renaming /mysql/logs/error.log.96 to /mysql/logs/error.log.97 (rotatecount 120, logstart 1, i 96),
old log /mysql/logs/error.log.96 does not exist
renaming /mysql/logs/error.log.95 to /mysql/logs/error.log.96 (rotatecount 120, logstart 1, i 95),
old log /mysql/logs/error.log.95 does not exist
renaming /mysql/logs/error.log.94 to /mysql/logs/error.log.95 (rotatecount 120, logstart 1, i 94),
old log /mysql/logs/error.log.94 does not exist
renaming /mysql/logs/error.log.93 to /mysql/logs/error.log.94 (rotatecount 120, logstart 1, i 93),
old log /mysql/logs/error.log.93 does not exist
renaming /mysql/logs/error.log.92 to /mysql/logs/error.log.93 (rotatecount 120, logstart 1, i 92),
old log /mysql/logs/error.log.92 does not exist
renaming /mysql/logs/error.log.91 to /mysql/logs/error.log.92 (rotatecount 120, logstart 1, i 91),
old log /mysql/logs/error.log.91 does not exist
renaming /mysql/logs/error.log.90 to /mysql/logs/error.log.91 (rotatecount 120, logstart 1, i 90),
old log /mysql/logs/error.log.90 does not exist
renaming /mysql/logs/error.log.89 to /mysql/logs/error.log.90 (rotatecount 120, logstart 1, i 89),
old log /mysql/logs/error.log.89 does not exist
renaming /mysql/logs/error.log.88 to /mysql/logs/error.log.89 (rotatecount 120, logstart 1, i 88),
old log /mysql/logs/error.log.88 does not exist
renaming /mysql/logs/error.log.87 to /mysql/logs/error.log.88 (rotatecount 120, logstart 1, i 87),
old log /mysql/logs/error.log.87 does not exist
renaming /mysql/logs/error.log.86 to /mysql/logs/error.log.87 (rotatecount 120, logstart 1, i 86),
old log /mysql/logs/error.log.86 does not exist
renaming /mysql/logs/error.log.85 to /mysql/logs/error.log.86 (rotatecount 120, logstart 1, i 85),
old log /mysql/logs/error.log.85 does not exist
renaming /mysql/logs/error.log.84 to /mysql/logs/error.log.85 (rotatecount 120, logstart 1, i 84),
old log /mysql/logs/error.log.84 does not exist
renaming /mysql/logs/error.log.83 to /mysql/logs/error.log.84 (rotatecount 120, logstart 1, i 83),
old log /mysql/logs/error.log.83 does not exist
renaming /mysql/logs/error.log.82 to /mysql/logs/error.log.83 (rotatecount 120, logstart 1, i 82),
old log /mysql/logs/error.log.82 does not exist
renaming /mysql/logs/error.log.81 to /mysql/logs/error.log.82 (rotatecount 120, logstart 1, i 81),
old log /mysql/logs/error.log.81 does not exist
renaming /mysql/logs/error.log.80 to /mysql/logs/error.log.81 (rotatecount 120, logstart 1, i 80),
old log /mysql/logs/error.log.80 does not exist
renaming /mysql/logs/error.log.79 to /mysql/logs/error.log.80 (rotatecount 120, logstart 1, i 79),
old log /mysql/logs/error.log.79 does not exist
renaming /mysql/logs/error.log.78 to /mysql/logs/error.log.79 (rotatecount 120, logstart 1, i 78),
old log /mysql/logs/error.log.78 does not exist
renaming /mysql/logs/error.log.77 to /mysql/logs/error.log.78 (rotatecount 120, logstart 1, i 77),
old log /mysql/logs/error.log.77 does not exist
renaming /mysql/logs/error.log.76 to /mysql/logs/error.log.77 (rotatecount 120, logstart 1, i 76),
old log /mysql/logs/error.log.76 does not exist
renaming /mysql/logs/error.log.75 to /mysql/logs/error.log.76 (rotatecount 120, logstart 1, i 75),
old log /mysql/logs/error.log.75 does not exist
renaming /mysql/logs/error.log.74 to /mysql/logs/error.log.75 (rotatecount 120, logstart 1, i 74),
old log /mysql/logs/error.log.74 does not exist
renaming /mysql/logs/error.log.73 to /mysql/logs/error.log.74 (rotatecount 120, logstart 1, i 73),
old log /mysql/logs/error.log.73 does not exist
renaming /mysql/logs/error.log.72 to /mysql/logs/error.log.73 (rotatecount 120, logstart 1, i 72),
old log /mysql/logs/error.log.72 does not exist
renaming /mysql/logs/error.log.71 to /mysql/logs/error.log.72 (rotatecount 120, logstart 1, i 71),
old log /mysql/logs/error.log.71 does not exist
renaming /mysql/logs/error.log.70 to /mysql/logs/error.log.71 (rotatecount 120, logstart 1, i 70),
old log /mysql/logs/error.log.70 does not exist
renaming /mysql/logs/error.log.69 to /mysql/logs/error.log.70 (rotatecount 120, logstart 1, i 69),
old log /mysql/logs/error.log.69 does not exist
renaming /mysql/logs/error.log.68 to /mysql/logs/error.log.69 (rotatecount 120, logstart 1, i 68),
old log /mysql/logs/error.log.68 does not exist
renaming /mysql/logs/error.log.67 to /mysql/logs/error.log.68 (rotatecount 120, logstart 1, i 67),
old log /mysql/logs/error.log.67 does not exist
renaming /mysql/logs/error.log.66 to /mysql/logs/error.log.67 (rotatecount 120, logstart 1, i 66),
old log /mysql/logs/error.log.66 does not exist
renaming /mysql/logs/error.log.65 to /mysql/logs/error.log.66 (rotatecount 120, logstart 1, i 65),
old log /mysql/logs/error.log.65 does not exist
renaming /mysql/logs/error.log.64 to /mysql/logs/error.log.65 (rotatecount 120, logstart 1, i 64),
old log /mysql/logs/error.log.64 does not exist
renaming /mysql/logs/error.log.63 to /mysql/logs/error.log.64 (rotatecount 120, logstart 1, i 63),
old log /mysql/logs/error.log.63 does not exist
renaming /mysql/logs/error.log.62 to /mysql/logs/error.log.63 (rotatecount 120, logstart 1, i 62),
old log /mysql/logs/error.log.62 does not exist
renaming /mysql/logs/error.log.61 to /mysql/logs/error.log.62 (rotatecount 120, logstart 1, i 61),
old log /mysql/logs/error.log.61 does not exist
renaming /mysql/logs/error.log.60 to /mysql/logs/error.log.61 (rotatecount 120, logstart 1, i 60),
old log /mysql/logs/error.log.60 does not exist
renaming /mysql/logs/error.log.59 to /mysql/logs/error.log.60 (rotatecount 120, logstart 1, i 59),
old log /mysql/logs/error.log.59 does not exist
renaming /mysql/logs/error.log.58 to /mysql/logs/error.log.59 (rotatecount 120, logstart 1, i 58),
old log /mysql/logs/error.log.58 does not exist
renaming /mysql/logs/error.log.57 to /mysql/logs/error.log.58 (rotatecount 120, logstart 1, i 57),
old log /mysql/logs/error.log.57 does not exist
renaming /mysql/logs/error.log.56 to /mysql/logs/error.log.57 (rotatecount 120, logstart 1, i 56),
old log /mysql/logs/error.log.56 does not exist
renaming /mysql/logs/error.log.55 to /mysql/logs/error.log.56 (rotatecount 120, logstart 1, i 55),
old log /mysql/logs/error.log.55 does not exist
renaming /mysql/logs/error.log.54 to /mysql/logs/error.log.55 (rotatecount 120, logstart 1, i 54),
old log /mysql/logs/error.log.54 does not exist
renaming /mysql/logs/error.log.53 to /mysql/logs/error.log.54 (rotatecount 120, logstart 1, i 53),
old log /mysql/logs/error.log.53 does not exist
renaming /mysql/logs/error.log.52 to /mysql/logs/error.log.53 (rotatecount 120, logstart 1, i 52),
old log /mysql/logs/error.log.52 does not exist
renaming /mysql/logs/error.log.51 to /mysql/logs/error.log.52 (rotatecount 120, logstart 1, i 51),
old log /mysql/logs/error.log.51 does not exist
renaming /mysql/logs/error.log.50 to /mysql/logs/error.log.51 (rotatecount 120, logstart 1, i 50),
old log /mysql/logs/error.log.50 does not exist
renaming /mysql/logs/error.log.49 to /mysql/logs/error.log.50 (rotatecount 120, logstart 1, i 49),
old log /mysql/logs/error.log.49 does not exist
renaming /mysql/logs/error.log.48 to /mysql/logs/error.log.49 (rotatecount 120, logstart 1, i 48),
old log /mysql/logs/error.log.48 does not exist
renaming /mysql/logs/error.log.47 to /mysql/logs/error.log.48 (rotatecount 120, logstart 1, i 47),
old log /mysql/logs/error.log.47 does not exist
renaming /mysql/logs/error.log.46 to /mysql/logs/error.log.47 (rotatecount 120, logstart 1, i 46),
old log /mysql/logs/error.log.46 does not exist
renaming /mysql/logs/error.log.45 to /mysql/logs/error.log.46 (rotatecount 120, logstart 1, i 45),
old log /mysql/logs/error.log.45 does not exist
renaming /mysql/logs/error.log.44 to /mysql/logs/error.log.45 (rotatecount 120, logstart 1, i 44),
old log /mysql/logs/error.log.44 does not exist
renaming /mysql/logs/error.log.43 to /mysql/logs/error.log.44 (rotatecount 120, logstart 1, i 43),
old log /mysql/logs/error.log.43 does not exist
renaming /mysql/logs/error.log.42 to /mysql/logs/error.log.43 (rotatecount 120, logstart 1, i 42),
old log /mysql/logs/error.log.42 does not exist
renaming /mysql/logs/error.log.41 to /mysql/logs/error.log.42 (rotatecount 120, logstart 1, i 41),
old log /mysql/logs/error.log.41 does not exist
renaming /mysql/logs/error.log.40 to /mysql/logs/error.log.41 (rotatecount 120, logstart 1, i 40),
old log /mysql/logs/error.log.40 does not exist
renaming /mysql/logs/error.log.39 to /mysql/logs/error.log.40 (rotatecount 120, logstart 1, i 39),
old log /mysql/logs/error.log.39 does not exist
renaming /mysql/logs/error.log.38 to /mysql/logs/error.log.39 (rotatecount 120, logstart 1, i 38),
old log /mysql/logs/error.log.38 does not exist
renaming /mysql/logs/error.log.37 to /mysql/logs/error.log.38 (rotatecount 120, logstart 1, i 37),
old log /mysql/logs/error.log.37 does not exist
renaming /mysql/logs/error.log.36 to /mysql/logs/error.log.37 (rotatecount 120, logstart 1, i 36),
old log /mysql/logs/error.log.36 does not exist
renaming /mysql/logs/error.log.35 to /mysql/logs/error.log.36 (rotatecount 120, logstart 1, i 35),
old log /mysql/logs/error.log.35 does not exist
renaming /mysql/logs/error.log.34 to /mysql/logs/error.log.35 (rotatecount 120, logstart 1, i 34),
old log /mysql/logs/error.log.34 does not exist
renaming /mysql/logs/error.log.33 to /mysql/logs/error.log.34 (rotatecount 120, logstart 1, i 33),
old log /mysql/logs/error.log.33 does not exist
renaming /mysql/logs/error.log.32 to /mysql/logs/error.log.33 (rotatecount 120, logstart 1, i 32),
old log /mysql/logs/error.log.32 does not exist
renaming /mysql/logs/error.log.31 to /mysql/logs/error.log.32 (rotatecount 120, logstart 1, i 31),
old log /mysql/logs/error.log.31 does not exist
renaming /mysql/logs/error.log.30 to /mysql/logs/error.log.31 (rotatecount 120, logstart 1, i 30),
old log /mysql/logs/error.log.30 does not exist
renaming /mysql/logs/error.log.29 to /mysql/logs/error.log.30 (rotatecount 120, logstart 1, i 29),
old log /mysql/logs/error.log.29 does not exist
renaming /mysql/logs/error.log.28 to /mysql/logs/error.log.29 (rotatecount 120, logstart 1, i 28),
old log /mysql/logs/error.log.28 does not exist
renaming /mysql/logs/error.log.27 to /mysql/logs/error.log.28 (rotatecount 120, logstart 1, i 27),
old log /mysql/logs/error.log.27 does not exist
renaming /mysql/logs/error.log.26 to /mysql/logs/error.log.27 (rotatecount 120, logstart 1, i 26),
old log /mysql/logs/error.log.26 does not exist
renaming /mysql/logs/error.log.25 to /mysql/logs/error.log.26 (rotatecount 120, logstart 1, i 25),
old log /mysql/logs/error.log.25 does not exist
renaming /mysql/logs/error.log.24 to /mysql/logs/error.log.25 (rotatecount 120, logstart 1, i 24),
old log /mysql/logs/error.log.24 does not exist
renaming /mysql/logs/error.log.23 to /mysql/logs/error.log.24 (rotatecount 120, logstart 1, i 23),
old log /mysql/logs/error.log.23 does not exist
renaming /mysql/logs/error.log.22 to /mysql/logs/error.log.23 (rotatecount 120, logstart 1, i 22),
old log /mysql/logs/error.log.22 does not exist
renaming /mysql/logs/error.log.21 to /mysql/logs/error.log.22 (rotatecount 120, logstart 1, i 21),
old log /mysql/logs/error.log.21 does not exist
renaming /mysql/logs/error.log.20 to /mysql/logs/error.log.21 (rotatecount 120, logstart 1, i 20),
old log /mysql/logs/error.log.20 does not exist
renaming /mysql/logs/error.log.19 to /mysql/logs/error.log.20 (rotatecount 120, logstart 1, i 19),
old log /mysql/logs/error.log.19 does not exist
renaming /mysql/logs/error.log.18 to /mysql/logs/error.log.19 (rotatecount 120, logstart 1, i 18),
old log /mysql/logs/error.log.18 does not exist
renaming /mysql/logs/error.log.17 to /mysql/logs/error.log.18 (rotatecount 120, logstart 1, i 17),
old log /mysql/logs/error.log.17 does not exist
renaming /mysql/logs/error.log.16 to /mysql/logs/error.log.17 (rotatecount 120, logstart 1, i 16),
old log /mysql/logs/error.log.16 does not exist
renaming /mysql/logs/error.log.15 to /mysql/logs/error.log.16 (rotatecount 120, logstart 1, i 15),
old log /mysql/logs/error.log.15 does not exist
renaming /mysql/logs/error.log.14 to /mysql/logs/error.log.15 (rotatecount 120, logstart 1, i 14),
old log /mysql/logs/error.log.14 does not exist
renaming /mysql/logs/error.log.13 to /mysql/logs/error.log.14 (rotatecount 120, logstart 1, i 13),
old log /mysql/logs/error.log.13 does not exist
renaming /mysql/logs/error.log.12 to /mysql/logs/error.log.13 (rotatecount 120, logstart 1, i 12),
old log /mysql/logs/error.log.12 does not exist
renaming /mysql/logs/error.log.11 to /mysql/logs/error.log.12 (rotatecount 120, logstart 1, i 11),
old log /mysql/logs/error.log.11 does not exist
renaming /mysql/logs/error.log.10 to /mysql/logs/error.log.11 (rotatecount 120, logstart 1, i 10),
old log /mysql/logs/error.log.10 does not exist
renaming /mysql/logs/error.log.9 to /mysql/logs/error.log.10 (rotatecount 120, logstart 1, i 9),
old log /mysql/logs/error.log.9 does not exist
renaming /mysql/logs/error.log.8 to /mysql/logs/error.log.9 (rotatecount 120, logstart 1, i 8),
old log /mysql/logs/error.log.8 does not exist
renaming /mysql/logs/error.log.7 to /mysql/logs/error.log.8 (rotatecount 120, logstart 1, i 7),
old log /mysql/logs/error.log.7 does not exist
renaming /mysql/logs/error.log.6 to /mysql/logs/error.log.7 (rotatecount 120, logstart 1, i 6),
old log /mysql/logs/error.log.6 does not exist
renaming /mysql/logs/error.log.5 to /mysql/logs/error.log.6 (rotatecount 120, logstart 1, i 5),
old log /mysql/logs/error.log.5 does not exist
renaming /mysql/logs/error.log.4 to /mysql/logs/error.log.5 (rotatecount 120, logstart 1, i 4),
old log /mysql/logs/error.log.4 does not exist
renaming /mysql/logs/error.log.3 to /mysql/logs/error.log.4 (rotatecount 120, logstart 1, i 3),
old log /mysql/logs/error.log.3 does not exist
renaming /mysql/logs/error.log.2 to /mysql/logs/error.log.3 (rotatecount 120, logstart 1, i 2),
renaming /mysql/logs/error.log.1 to /mysql/logs/error.log.2 (rotatecount 120, logstart 1, i 1),
renaming /mysql/logs/error.log.0 to /mysql/logs/error.log.1 (rotatecount 120, logstart 1, i 0),
old log /mysql/logs/error.log.0 does not exist
log /mysql/logs/error.log.121 doesn't exist -- won't try to dispose of it
rotating log /mysql/logs/general.log, log->rotateCount is 120
renaming /mysql/logs/general.log.120 to /mysql/logs/general.log.121 (rotatecount 120, logstart 1, i 120),
old log /mysql/logs/general.log.120 does not exist
renaming /mysql/logs/general.log.119 to /mysql/logs/general.log.120 (rotatecount 120, logstart 1, i 119),
old log /mysql/logs/general.log.119 does not exist
renaming /mysql/logs/general.log.118 to /mysql/logs/general.log.119 (rotatecount 120, logstart 1, i 118),
old log /mysql/logs/general.log.118 does not exist
renaming /mysql/logs/general.log.117 to /mysql/logs/general.log.118 (rotatecount 120, logstart 1, i 117),
old log /mysql/logs/general.log.117 does not exist
renaming /mysql/logs/general.log.116 to /mysql/logs/general.log.117 (rotatecount 120, logstart 1, i 116),
old log /mysql/logs/general.log.116 does not exist
renaming /mysql/logs/general.log.115 to /mysql/logs/general.log.116 (rotatecount 120, logstart 1, i 115),
old log /mysql/logs/general.log.115 does not exist
renaming /mysql/logs/general.log.114 to /mysql/logs/general.log.115 (rotatecount 120, logstart 1, i 114),
old log /mysql/logs/general.log.114 does not exist
renaming /mysql/logs/general.log.113 to /mysql/logs/general.log.114 (rotatecount 120, logstart 1, i 113),
old log /mysql/logs/general.log.113 does not exist
renaming /mysql/logs/general.log.112 to /mysql/logs/general.log.113 (rotatecount 120, logstart 1, i 112),
old log /mysql/logs/general.log.112 does not exist
renaming /mysql/logs/general.log.111 to /mysql/logs/general.log.112 (rotatecount 120, logstart 1, i 111),
old log /mysql/logs/general.log.111 does not exist
renaming /mysql/logs/general.log.110 to /mysql/logs/general.log.111 (rotatecount 120, logstart 1, i 110),
old log /mysql/logs/general.log.110 does not exist
renaming /mysql/logs/general.log.109 to /mysql/logs/general.log.110 (rotatecount 120, logstart 1, i 109),
old log /mysql/logs/general.log.109 does not exist
renaming /mysql/logs/general.log.108 to /mysql/logs/general.log.109 (rotatecount 120, logstart 1, i 108),
old log /mysql/logs/general.log.108 does not exist
renaming /mysql/logs/general.log.107 to /mysql/logs/general.log.108 (rotatecount 120, logstart 1, i 107),
old log /mysql/logs/general.log.107 does not exist
renaming /mysql/logs/general.log.106 to /mysql/logs/general.log.107 (rotatecount 120, logstart 1, i 106),
old log /mysql/logs/general.log.106 does not exist
renaming /mysql/logs/general.log.105 to /mysql/logs/general.log.106 (rotatecount 120, logstart 1, i 105),
old log /mysql/logs/general.log.105 does not exist
renaming /mysql/logs/general.log.104 to /mysql/logs/general.log.105 (rotatecount 120, logstart 1, i 104),
old log /mysql/logs/general.log.104 does not exist
renaming /mysql/logs/general.log.103 to /mysql/logs/general.log.104 (rotatecount 120, logstart 1, i 103),
old log /mysql/logs/general.log.103 does not exist
renaming /mysql/logs/general.log.102 to /mysql/logs/general.log.103 (rotatecount 120, logstart 1, i 102),
old log /mysql/logs/general.log.102 does not exist
renaming /mysql/logs/general.log.101 to /mysql/logs/general.log.102 (rotatecount 120, logstart 1, i 101),
old log /mysql/logs/general.log.101 does not exist
renaming /mysql/logs/general.log.100 to /mysql/logs/general.log.101 (rotatecount 120, logstart 1, i 100),
old log /mysql/logs/general.log.100 does not exist
renaming /mysql/logs/general.log.99 to /mysql/logs/general.log.100 (rotatecount 120, logstart 1, i 99),
old log /mysql/logs/general.log.99 does not exist
renaming /mysql/logs/general.log.98 to /mysql/logs/general.log.99 (rotatecount 120, logstart 1, i 98),
old log /mysql/logs/general.log.98 does not exist
renaming /mysql/logs/general.log.97 to /mysql/logs/general.log.98 (rotatecount 120, logstart 1, i 97),
old log /mysql/logs/general.log.97 does not exist
renaming /mysql/logs/general.log.96 to /mysql/logs/general.log.97 (rotatecount 120, logstart 1, i 96),
old log /mysql/logs/general.log.96 does not exist
renaming /mysql/logs/general.log.95 to /mysql/logs/general.log.96 (rotatecount 120, logstart 1, i 95),
old log /mysql/logs/general.log.95 does not exist
renaming /mysql/logs/general.log.94 to /mysql/logs/general.log.95 (rotatecount 120, logstart 1, i 94),
old log /mysql/logs/general.log.94 does not exist
renaming /mysql/logs/general.log.93 to /mysql/logs/general.log.94 (rotatecount 120, logstart 1, i 93),
old log /mysql/logs/general.log.93 does not exist
renaming /mysql/logs/general.log.92 to /mysql/logs/general.log.93 (rotatecount 120, logstart 1, i 92),
old log /mysql/logs/general.log.92 does not exist
renaming /mysql/logs/general.log.91 to /mysql/logs/general.log.92 (rotatecount 120, logstart 1, i 91),
old log /mysql/logs/general.log.91 does not exist
renaming /mysql/logs/general.log.90 to /mysql/logs/general.log.91 (rotatecount 120, logstart 1, i 90),
old log /mysql/logs/general.log.90 does not exist
renaming /mysql/logs/general.log.89 to /mysql/logs/general.log.90 (rotatecount 120, logstart 1, i 89),
old log /mysql/logs/general.log.89 does not exist
renaming /mysql/logs/general.log.88 to /mysql/logs/general.log.89 (rotatecount 120, logstart 1, i 88),
old log /mysql/logs/general.log.88 does not exist
renaming /mysql/logs/general.log.87 to /mysql/logs/general.log.88 (rotatecount 120, logstart 1, i 87),
old log /mysql/logs/general.log.87 does not exist
renaming /mysql/logs/general.log.86 to /mysql/logs/general.log.87 (rotatecount 120, logstart 1, i 86),
old log /mysql/logs/general.log.86 does not exist
renaming /mysql/logs/general.log.85 to /mysql/logs/general.log.86 (rotatecount 120, logstart 1, i 85),
old log /mysql/logs/general.log.85 does not exist
renaming /mysql/logs/general.log.84 to /mysql/logs/general.log.85 (rotatecount 120, logstart 1, i 84),
old log /mysql/logs/general.log.84 does not exist
renaming /mysql/logs/general.log.83 to /mysql/logs/general.log.84 (rotatecount 120, logstart 1, i 83),
old log /mysql/logs/general.log.83 does not exist
renaming /mysql/logs/general.log.82 to /mysql/logs/general.log.83 (rotatecount 120, logstart 1, i 82),
old log /mysql/logs/general.log.82 does not exist
renaming /mysql/logs/general.log.81 to /mysql/logs/general.log.82 (rotatecount 120, logstart 1, i 81),
old log /mysql/logs/general.log.81 does not exist
renaming /mysql/logs/general.log.80 to /mysql/logs/general.log.81 (rotatecount 120, logstart 1, i 80),
old log /mysql/logs/general.log.80 does not exist
renaming /mysql/logs/general.log.79 to /mysql/logs/general.log.80 (rotatecount 120, logstart 1, i 79),
old log /mysql/logs/general.log.79 does not exist
renaming /mysql/logs/general.log.78 to /mysql/logs/general.log.79 (rotatecount 120, logstart 1, i 78),
old log /mysql/logs/general.log.78 does not exist
renaming /mysql/logs/general.log.77 to /mysql/logs/general.log.78 (rotatecount 120, logstart 1, i 77),
old log /mysql/logs/general.log.77 does not exist
renaming /mysql/logs/general.log.76 to /mysql/logs/general.log.77 (rotatecount 120, logstart 1, i 76),
old log /mysql/logs/general.log.76 does not exist
renaming /mysql/logs/general.log.75 to /mysql/logs/general.log.76 (rotatecount 120, logstart 1, i 75),
old log /mysql/logs/general.log.75 does not exist
renaming /mysql/logs/general.log.74 to /mysql/logs/general.log.75 (rotatecount 120, logstart 1, i 74),
old log /mysql/logs/general.log.74 does not exist
renaming /mysql/logs/general.log.73 to /mysql/logs/general.log.74 (rotatecount 120, logstart 1, i 73),
old log /mysql/logs/general.log.73 does not exist
renaming /mysql/logs/general.log.72 to /mysql/logs/general.log.73 (rotatecount 120, logstart 1, i 72),
old log /mysql/logs/general.log.72 does not exist
renaming /mysql/logs/general.log.71 to /mysql/logs/general.log.72 (rotatecount 120, logstart 1, i 71),
old log /mysql/logs/general.log.71 does not exist
renaming /mysql/logs/general.log.70 to /mysql/logs/general.log.71 (rotatecount 120, logstart 1, i 70),
old log /mysql/logs/general.log.70 does not exist
renaming /mysql/logs/general.log.69 to /mysql/logs/general.log.70 (rotatecount 120, logstart 1, i 69),
old log /mysql/logs/general.log.69 does not exist
renaming /mysql/logs/general.log.68 to /mysql/logs/general.log.69 (rotatecount 120, logstart 1, i 68),
old log /mysql/logs/general.log.68 does not exist
renaming /mysql/logs/general.log.67 to /mysql/logs/general.log.68 (rotatecount 120, logstart 1, i 67),
old log /mysql/logs/general.log.67 does not exist
renaming /mysql/logs/general.log.66 to /mysql/logs/general.log.67 (rotatecount 120, logstart 1, i 66),
old log /mysql/logs/general.log.66 does not exist
renaming /mysql/logs/general.log.65 to /mysql/logs/general.log.66 (rotatecount 120, logstart 1, i 65),
old log /mysql/logs/general.log.65 does not exist
renaming /mysql/logs/general.log.64 to /mysql/logs/general.log.65 (rotatecount 120, logstart 1, i 64),
old log /mysql/logs/general.log.64 does not exist
renaming /mysql/logs/general.log.63 to /mysql/logs/general.log.64 (rotatecount 120, logstart 1, i 63),
old log /mysql/logs/general.log.63 does not exist
renaming /mysql/logs/general.log.62 to /mysql/logs/general.log.63 (rotatecount 120, logstart 1, i 62),
old log /mysql/logs/general.log.62 does not exist
renaming /mysql/logs/general.log.61 to /mysql/logs/general.log.62 (rotatecount 120, logstart 1, i 61),
old log /mysql/logs/general.log.61 does not exist
renaming /mysql/logs/general.log.60 to /mysql/logs/general.log.61 (rotatecount 120, logstart 1, i 60),
old log /mysql/logs/general.log.60 does not exist
renaming /mysql/logs/general.log.59 to /mysql/logs/general.log.60 (rotatecount 120, logstart 1, i 59),
old log /mysql/logs/general.log.59 does not exist
renaming /mysql/logs/general.log.58 to /mysql/logs/general.log.59 (rotatecount 120, logstart 1, i 58),
old log /mysql/logs/general.log.58 does not exist
renaming /mysql/logs/general.log.57 to /mysql/logs/general.log.58 (rotatecount 120, logstart 1, i 57),
old log /mysql/logs/general.log.57 does not exist
renaming /mysql/logs/general.log.56 to /mysql/logs/general.log.57 (rotatecount 120, logstart 1, i 56),
old log /mysql/logs/general.log.56 does not exist
renaming /mysql/logs/general.log.55 to /mysql/logs/general.log.56 (rotatecount 120, logstart 1, i 55),
old log /mysql/logs/general.log.55 does not exist
renaming /mysql/logs/general.log.54 to /mysql/logs/general.log.55 (rotatecount 120, logstart 1, i 54),
old log /mysql/logs/general.log.54 does not exist
renaming /mysql/logs/general.log.53 to /mysql/logs/general.log.54 (rotatecount 120, logstart 1, i 53),
old log /mysql/logs/general.log.53 does not exist
renaming /mysql/logs/general.log.52 to /mysql/logs/general.log.53 (rotatecount 120, logstart 1, i 52),
old log /mysql/logs/general.log.52 does not exist
renaming /mysql/logs/general.log.51 to /mysql/logs/general.log.52 (rotatecount 120, logstart 1, i 51),
old log /mysql/logs/general.log.51 does not exist
renaming /mysql/logs/general.log.50 to /mysql/logs/general.log.51 (rotatecount 120, logstart 1, i 50),
old log /mysql/logs/general.log.50 does not exist
renaming /mysql/logs/general.log.49 to /mysql/logs/general.log.50 (rotatecount 120, logstart 1, i 49),
old log /mysql/logs/general.log.49 does not exist
renaming /mysql/logs/general.log.48 to /mysql/logs/general.log.49 (rotatecount 120, logstart 1, i 48),
old log /mysql/logs/general.log.48 does not exist
renaming /mysql/logs/general.log.47 to /mysql/logs/general.log.48 (rotatecount 120, logstart 1, i 47),
old log /mysql/logs/general.log.47 does not exist
renaming /mysql/logs/general.log.46 to /mysql/logs/general.log.47 (rotatecount 120, logstart 1, i 46),
old log /mysql/logs/general.log.46 does not exist
renaming /mysql/logs/general.log.45 to /mysql/logs/general.log.46 (rotatecount 120, logstart 1, i 45),
old log /mysql/logs/general.log.45 does not exist
renaming /mysql/logs/general.log.44 to /mysql/logs/general.log.45 (rotatecount 120, logstart 1, i 44),
old log /mysql/logs/general.log.44 does not exist
renaming /mysql/logs/general.log.43 to /mysql/logs/general.log.44 (rotatecount 120, logstart 1, i 43),
old log /mysql/logs/general.log.43 does not exist
renaming /mysql/logs/general.log.42 to /mysql/logs/general.log.43 (rotatecount 120, logstart 1, i 42),
old log /mysql/logs/general.log.42 does not exist
renaming /mysql/logs/general.log.41 to /mysql/logs/general.log.42 (rotatecount 120, logstart 1, i 41),
old log /mysql/logs/general.log.41 does not exist
renaming /mysql/logs/general.log.40 to /mysql/logs/general.log.41 (rotatecount 120, logstart 1, i 40),
old log /mysql/logs/general.log.40 does not exist
renaming /mysql/logs/general.log.39 to /mysql/logs/general.log.40 (rotatecount 120, logstart 1, i 39),
old log /mysql/logs/general.log.39 does not exist
renaming /mysql/logs/general.log.38 to /mysql/logs/general.log.39 (rotatecount 120, logstart 1, i 38),
old log /mysql/logs/general.log.38 does not exist
renaming /mysql/logs/general.log.37 to /mysql/logs/general.log.38 (rotatecount 120, logstart 1, i 37),
old log /mysql/logs/general.log.37 does not exist
renaming /mysql/logs/general.log.36 to /mysql/logs/general.log.37 (rotatecount 120, logstart 1, i 36),
old log /mysql/logs/general.log.36 does not exist
renaming /mysql/logs/general.log.35 to /mysql/logs/general.log.36 (rotatecount 120, logstart 1, i 35),
old log /mysql/logs/general.log.35 does not exist
renaming /mysql/logs/general.log.34 to /mysql/logs/general.log.35 (rotatecount 120, logstart 1, i 34),
old log /mysql/logs/general.log.34 does not exist
renaming /mysql/logs/general.log.33 to /mysql/logs/general.log.34 (rotatecount 120, logstart 1, i 33),
old log /mysql/logs/general.log.33 does not exist
renaming /mysql/logs/general.log.32 to /mysql/logs/general.log.33 (rotatecount 120, logstart 1, i 32),
old log /mysql/logs/general.log.32 does not exist
renaming /mysql/logs/general.log.31 to /mysql/logs/general.log.32 (rotatecount 120, logstart 1, i 31),
old log /mysql/logs/general.log.31 does not exist
renaming /mysql/logs/general.log.30 to /mysql/logs/general.log.31 (rotatecount 120, logstart 1, i 30),
old log /mysql/logs/general.log.30 does not exist
renaming /mysql/logs/general.log.29 to /mysql/logs/general.log.30 (rotatecount 120, logstart 1, i 29),
old log /mysql/logs/general.log.29 does not exist
renaming /mysql/logs/general.log.28 to /mysql/logs/general.log.29 (rotatecount 120, logstart 1, i 28),
old log /mysql/logs/general.log.28 does not exist
renaming /mysql/logs/general.log.27 to /mysql/logs/general.log.28 (rotatecount 120, logstart 1, i 27),
old log /mysql/logs/general.log.27 does not exist
renaming /mysql/logs/general.log.26 to /mysql/logs/general.log.27 (rotatecount 120, logstart 1, i 26),
old log /mysql/logs/general.log.26 does not exist
renaming /mysql/logs/general.log.25 to /mysql/logs/general.log.26 (rotatecount 120, logstart 1, i 25),
old log /mysql/logs/general.log.25 does not exist
renaming /mysql/logs/general.log.24 to /mysql/logs/general.log.25 (rotatecount 120, logstart 1, i 24),
old log /mysql/logs/general.log.24 does not exist
renaming /mysql/logs/general.log.23 to /mysql/logs/general.log.24 (rotatecount 120, logstart 1, i 23),
old log /mysql/logs/general.log.23 does not exist
renaming /mysql/logs/general.log.22 to /mysql/logs/general.log.23 (rotatecount 120, logstart 1, i 22),
old log /mysql/logs/general.log.22 does not exist
renaming /mysql/logs/general.log.21 to /mysql/logs/general.log.22 (rotatecount 120, logstart 1, i 21),
old log /mysql/logs/general.log.21 does not exist
renaming /mysql/logs/general.log.20 to /mysql/logs/general.log.21 (rotatecount 120, logstart 1, i 20),
old log /mysql/logs/general.log.20 does not exist
renaming /mysql/logs/general.log.19 to /mysql/logs/general.log.20 (rotatecount 120, logstart 1, i 19),
old log /mysql/logs/general.log.19 does not exist
renaming /mysql/logs/general.log.18 to /mysql/logs/general.log.19 (rotatecount 120, logstart 1, i 18),
old log /mysql/logs/general.log.18 does not exist
renaming /mysql/logs/general.log.17 to /mysql/logs/general.log.18 (rotatecount 120, logstart 1, i 17),
old log /mysql/logs/general.log.17 does not exist
renaming /mysql/logs/general.log.16 to /mysql/logs/general.log.17 (rotatecount 120, logstart 1, i 16),
old log /mysql/logs/general.log.16 does not exist
renaming /mysql/logs/general.log.15 to /mysql/logs/general.log.16 (rotatecount 120, logstart 1, i 15),
old log /mysql/logs/general.log.15 does not exist
renaming /mysql/logs/general.log.14 to /mysql/logs/general.log.15 (rotatecount 120, logstart 1, i 14),
old log /mysql/logs/general.log.14 does not exist
renaming /mysql/logs/general.log.13 to /mysql/logs/general.log.14 (rotatecount 120, logstart 1, i 13),
old log /mysql/logs/general.log.13 does not exist
renaming /mysql/logs/general.log.12 to /mysql/logs/general.log.13 (rotatecount 120, logstart 1, i 12),
old log /mysql/logs/general.log.12 does not exist
renaming /mysql/logs/general.log.11 to /mysql/logs/general.log.12 (rotatecount 120, logstart 1, i 11),
old log /mysql/logs/general.log.11 does not exist
renaming /mysql/logs/general.log.10 to /mysql/logs/general.log.11 (rotatecount 120, logstart 1, i 10),
old log /mysql/logs/general.log.10 does not exist
renaming /mysql/logs/general.log.9 to /mysql/logs/general.log.10 (rotatecount 120, logstart 1, i 9),
old log /mysql/logs/general.log.9 does not exist
renaming /mysql/logs/general.log.8 to /mysql/logs/general.log.9 (rotatecount 120, logstart 1, i 8),
old log /mysql/logs/general.log.8 does not exist
renaming /mysql/logs/general.log.7 to /mysql/logs/general.log.8 (rotatecount 120, logstart 1, i 7),
old log /mysql/logs/general.log.7 does not exist
renaming /mysql/logs/general.log.6 to /mysql/logs/general.log.7 (rotatecount 120, logstart 1, i 6),
old log /mysql/logs/general.log.6 does not exist
renaming /mysql/logs/general.log.5 to /mysql/logs/general.log.6 (rotatecount 120, logstart 1, i 5),
old log /mysql/logs/general.log.5 does not exist
renaming /mysql/logs/general.log.4 to /mysql/logs/general.log.5 (rotatecount 120, logstart 1, i 4),
old log /mysql/logs/general.log.4 does not exist
renaming /mysql/logs/general.log.3 to /mysql/logs/general.log.4 (rotatecount 120, logstart 1, i 3),
renaming /mysql/logs/general.log.2 to /mysql/logs/general.log.3 (rotatecount 120, logstart 1, i 2),
renaming /mysql/logs/general.log.1 to /mysql/logs/general.log.2 (rotatecount 120, logstart 1, i 1),
renaming /mysql/logs/general.log.0 to /mysql/logs/general.log.1 (rotatecount 120, logstart 1, i 0),
old log /mysql/logs/general.log.0 does not exist
log /mysql/logs/general.log.121 doesn't exist -- won't try to dispose of it
rotating log /mysql/logs/slow-queries.log, log->rotateCount is 120
renaming /mysql/logs/slow-queries.log.120 to /mysql/logs/slow-queries.log.121 (rotatecount 120, logstart 1, i 120),
old log /mysql/logs/slow-queries.log.120 does not exist
renaming /mysql/logs/slow-queries.log.119 to /mysql/logs/slow-queries.log.120 (rotatecount 120, logstart 1, i 119),
old log /mysql/logs/slow-queries.log.119 does not exist
renaming /mysql/logs/slow-queries.log.118 to /mysql/logs/slow-queries.log.119 (rotatecount 120, logstart 1, i 118),
old log /mysql/logs/slow-queries.log.118 does not exist
renaming /mysql/logs/slow-queries.log.117 to /mysql/logs/slow-queries.log.118 (rotatecount 120, logstart 1, i 117),
old log /mysql/logs/slow-queries.log.117 does not exist
renaming /mysql/logs/slow-queries.log.116 to /mysql/logs/slow-queries.log.117 (rotatecount 120, logstart 1, i 116),
old log /mysql/logs/slow-queries.log.116 does not exist
renaming /mysql/logs/slow-queries.log.115 to /mysql/logs/slow-queries.log.116 (rotatecount 120, logstart 1, i 115),
old log /mysql/logs/slow-queries.log.115 does not exist
renaming /mysql/logs/slow-queries.log.114 to /mysql/logs/slow-queries.log.115 (rotatecount 120, logstart 1, i 114),
old log /mysql/logs/slow-queries.log.114 does not exist
renaming /mysql/logs/slow-queries.log.113 to /mysql/logs/slow-queries.log.114 (rotatecount 120, logstart 1, i 113),
old log /mysql/logs/slow-queries.log.113 does not exist
renaming /mysql/logs/slow-queries.log.112 to /mysql/logs/slow-queries.log.113 (rotatecount 120, logstart 1, i 112),
old log /mysql/logs/slow-queries.log.112 does not exist
renaming /mysql/logs/slow-queries.log.111 to /mysql/logs/slow-queries.log.112 (rotatecount 120, logstart 1, i 111),
old log /mysql/logs/slow-queries.log.111 does not exist
renaming /mysql/logs/slow-queries.log.110 to /mysql/logs/slow-queries.log.111 (rotatecount 120, logstart 1, i 110),
old log /mysql/logs/slow-queries.log.110 does not exist
renaming /mysql/logs/slow-queries.log.109 to /mysql/logs/slow-queries.log.110 (rotatecount 120, logstart 1, i 109),
old log /mysql/logs/slow-queries.log.109 does not exist
renaming /mysql/logs/slow-queries.log.108 to /mysql/logs/slow-queries.log.109 (rotatecount 120, logstart 1, i 108),
old log /mysql/logs/slow-queries.log.108 does not exist
renaming /mysql/logs/slow-queries.log.107 to /mysql/logs/slow-queries.log.108 (rotatecount 120, logstart 1, i 107),
old log /mysql/logs/slow-queries.log.107 does not exist
renaming /mysql/logs/slow-queries.log.106 to /mysql/logs/slow-queries.log.107 (rotatecount 120, logstart 1, i 106),
old log /mysql/logs/slow-queries.log.106 does not exist
renaming /mysql/logs/slow-queries.log.105 to /mysql/logs/slow-queries.log.106 (rotatecount 120, logstart 1, i 105),
old log /mysql/logs/slow-queries.log.105 does not exist
renaming /mysql/logs/slow-queries.log.104 to /mysql/logs/slow-queries.log.105 (rotatecount 120, logstart 1, i 104),
old log /mysql/logs/slow-queries.log.104 does not exist
renaming /mysql/logs/slow-queries.log.103 to /mysql/logs/slow-queries.log.104 (rotatecount 120, logstart 1, i 103),
old log /mysql/logs/slow-queries.log.103 does not exist
renaming /mysql/logs/slow-queries.log.102 to /mysql/logs/slow-queries.log.103 (rotatecount 120, logstart 1, i 102),
old log /mysql/logs/slow-queries.log.102 does not exist
renaming /mysql/logs/slow-queries.log.101 to /mysql/logs/slow-queries.log.102 (rotatecount 120, logstart 1, i 101),
old log /mysql/logs/slow-queries.log.101 does not exist
renaming /mysql/logs/slow-queries.log.100 to /mysql/logs/slow-queries.log.101 (rotatecount 120, logstart 1, i 100),
old log /mysql/logs/slow-queries.log.100 does not exist
renaming /mysql/logs/slow-queries.log.99 to /mysql/logs/slow-queries.log.100 (rotatecount 120, logstart 1, i 99),
old log /mysql/logs/slow-queries.log.99 does not exist
renaming /mysql/logs/slow-queries.log.98 to /mysql/logs/slow-queries.log.99 (rotatecount 120, logstart 1, i 98),
old log /mysql/logs/slow-queries.log.98 does not exist
renaming /mysql/logs/slow-queries.log.97 to /mysql/logs/slow-queries.log.98 (rotatecount 120, logstart 1, i 97),
old log /mysql/logs/slow-queries.log.97 does not exist
renaming /mysql/logs/slow-queries.log.96 to /mysql/logs/slow-queries.log.97 (rotatecount 120, logstart 1, i 96),
old log /mysql/logs/slow-queries.log.96 does not exist
renaming /mysql/logs/slow-queries.log.95 to /mysql/logs/slow-queries.log.96 (rotatecount 120, logstart 1, i 95),
old log /mysql/logs/slow-queries.log.95 does not exist
renaming /mysql/logs/slow-queries.log.94 to /mysql/logs/slow-queries.log.95 (rotatecount 120, logstart 1, i 94),
old log /mysql/logs/slow-queries.log.94 does not exist
renaming /mysql/logs/slow-queries.log.93 to /mysql/logs/slow-queries.log.94 (rotatecount 120, logstart 1, i 93),
old log /mysql/logs/slow-queries.log.93 does not exist
renaming /mysql/logs/slow-queries.log.92 to /mysql/logs/slow-queries.log.93 (rotatecount 120, logstart 1, i 92),
old log /mysql/logs/slow-queries.log.92 does not exist
renaming /mysql/logs/slow-queries.log.91 to /mysql/logs/slow-queries.log.92 (rotatecount 120, logstart 1, i 91),
old log /mysql/logs/slow-queries.log.91 does not exist
renaming /mysql/logs/slow-queries.log.90 to /mysql/logs/slow-queries.log.91 (rotatecount 120, logstart 1, i 90),
old log /mysql/logs/slow-queries.log.90 does not exist
renaming /mysql/logs/slow-queries.log.89 to /mysql/logs/slow-queries.log.90 (rotatecount 120, logstart 1, i 89),
old log /mysql/logs/slow-queries.log.89 does not exist
renaming /mysql/logs/slow-queries.log.88 to /mysql/logs/slow-queries.log.89 (rotatecount 120, logstart 1, i 88),
old log /mysql/logs/slow-queries.log.88 does not exist
renaming /mysql/logs/slow-queries.log.87 to /mysql/logs/slow-queries.log.88 (rotatecount 120, logstart 1, i 87),
old log /mysql/logs/slow-queries.log.87 does not exist
renaming /mysql/logs/slow-queries.log.86 to /mysql/logs/slow-queries.log.87 (rotatecount 120, logstart 1, i 86),
old log /mysql/logs/slow-queries.log.86 does not exist
renaming /mysql/logs/slow-queries.log.85 to /mysql/logs/slow-queries.log.86 (rotatecount 120, logstart 1, i 85),
old log /mysql/logs/slow-queries.log.85 does not exist
renaming /mysql/logs/slow-queries.log.84 to /mysql/logs/slow-queries.log.85 (rotatecount 120, logstart 1, i 84),
old log /mysql/logs/slow-queries.log.84 does not exist
renaming /mysql/logs/slow-queries.log.83 to /mysql/logs/slow-queries.log.84 (rotatecount 120, logstart 1, i 83),
old log /mysql/logs/slow-queries.log.83 does not exist
renaming /mysql/logs/slow-queries.log.82 to /mysql/logs/slow-queries.log.83 (rotatecount 120, logstart 1, i 82),
old log /mysql/logs/slow-queries.log.82 does not exist
renaming /mysql/logs/slow-queries.log.81 to /mysql/logs/slow-queries.log.82 (rotatecount 120, logstart 1, i 81),
old log /mysql/logs/slow-queries.log.81 does not exist
renaming /mysql/logs/slow-queries.log.80 to /mysql/logs/slow-queries.log.81 (rotatecount 120, logstart 1, i 80),
old log /mysql/logs/slow-queries.log.80 does not exist
renaming /mysql/logs/slow-queries.log.79 to /mysql/logs/slow-queries.log.80 (rotatecount 120, logstart 1, i 79),
old log /mysql/logs/slow-queries.log.79 does not exist
renaming /mysql/logs/slow-queries.log.78 to /mysql/logs/slow-queries.log.79 (rotatecount 120, logstart 1, i 78),
old log /mysql/logs/slow-queries.log.78 does not exist
renaming /mysql/logs/slow-queries.log.77 to /mysql/logs/slow-queries.log.78 (rotatecount 120, logstart 1, i 77),
old log /mysql/logs/slow-queries.log.77 does not exist
renaming /mysql/logs/slow-queries.log.76 to /mysql/logs/slow-queries.log.77 (rotatecount 120, logstart 1, i 76),
old log /mysql/logs/slow-queries.log.76 does not exist
renaming /mysql/logs/slow-queries.log.75 to /mysql/logs/slow-queries.log.76 (rotatecount 120, logstart 1, i 75),
old log /mysql/logs/slow-queries.log.75 does not exist
renaming /mysql/logs/slow-queries.log.74 to /mysql/logs/slow-queries.log.75 (rotatecount 120, logstart 1, i 74),
old log /mysql/logs/slow-queries.log.74 does not exist
renaming /mysql/logs/slow-queries.log.73 to /mysql/logs/slow-queries.log.74 (rotatecount 120, logstart 1, i 73),
old log /mysql/logs/slow-queries.log.73 does not exist
renaming /mysql/logs/slow-queries.log.72 to /mysql/logs/slow-queries.log.73 (rotatecount 120, logstart 1, i 72),
old log /mysql/logs/slow-queries.log.72 does not exist
renaming /mysql/logs/slow-queries.log.71 to /mysql/logs/slow-queries.log.72 (rotatecount 120, logstart 1, i 71),
old log /mysql/logs/slow-queries.log.71 does not exist
renaming /mysql/logs/slow-queries.log.70 to /mysql/logs/slow-queries.log.71 (rotatecount 120, logstart 1, i 70),
old log /mysql/logs/slow-queries.log.70 does not exist
renaming /mysql/logs/slow-queries.log.69 to /mysql/logs/slow-queries.log.70 (rotatecount 120, logstart 1, i 69),
old log /mysql/logs/slow-queries.log.69 does not exist
renaming /mysql/logs/slow-queries.log.68 to /mysql/logs/slow-queries.log.69 (rotatecount 120, logstart 1, i 68),
old log /mysql/logs/slow-queries.log.68 does not exist
renaming /mysql/logs/slow-queries.log.67 to /mysql/logs/slow-queries.log.68 (rotatecount 120, logstart 1, i 67),
old log /mysql/logs/slow-queries.log.67 does not exist
renaming /mysql/logs/slow-queries.log.66 to /mysql/logs/slow-queries.log.67 (rotatecount 120, logstart 1, i 66),
old log /mysql/logs/slow-queries.log.66 does not exist
renaming /mysql/logs/slow-queries.log.65 to /mysql/logs/slow-queries.log.66 (rotatecount 120, logstart 1, i 65),
old log /mysql/logs/slow-queries.log.65 does not exist
renaming /mysql/logs/slow-queries.log.64 to /mysql/logs/slow-queries.log.65 (rotatecount 120, logstart 1, i 64),
old log /mysql/logs/slow-queries.log.64 does not exist
renaming /mysql/logs/slow-queries.log.63 to /mysql/logs/slow-queries.log.64 (rotatecount 120, logstart 1, i 63),
old log /mysql/logs/slow-queries.log.63 does not exist
renaming /mysql/logs/slow-queries.log.62 to /mysql/logs/slow-queries.log.63 (rotatecount 120, logstart 1, i 62),
old log /mysql/logs/slow-queries.log.62 does not exist
renaming /mysql/logs/slow-queries.log.61 to /mysql/logs/slow-queries.log.62 (rotatecount 120, logstart 1, i 61),
old log /mysql/logs/slow-queries.log.61 does not exist
renaming /mysql/logs/slow-queries.log.60 to /mysql/logs/slow-queries.log.61 (rotatecount 120, logstart 1, i 60),
old log /mysql/logs/slow-queries.log.60 does not exist
renaming /mysql/logs/slow-queries.log.59 to /mysql/logs/slow-queries.log.60 (rotatecount 120, logstart 1, i 59),
old log /mysql/logs/slow-queries.log.59 does not exist
renaming /mysql/logs/slow-queries.log.58 to /mysql/logs/slow-queries.log.59 (rotatecount 120, logstart 1, i 58),
old log /mysql/logs/slow-queries.log.58 does not exist
renaming /mysql/logs/slow-queries.log.57 to /mysql/logs/slow-queries.log.58 (rotatecount 120, logstart 1, i 57),
old log /mysql/logs/slow-queries.log.57 does not exist
renaming /mysql/logs/slow-queries.log.56 to /mysql/logs/slow-queries.log.57 (rotatecount 120, logstart 1, i 56),
old log /mysql/logs/slow-queries.log.56 does not exist
renaming /mysql/logs/slow-queries.log.55 to /mysql/logs/slow-queries.log.56 (rotatecount 120, logstart 1, i 55),
old log /mysql/logs/slow-queries.log.55 does not exist
renaming /mysql/logs/slow-queries.log.54 to /mysql/logs/slow-queries.log.55 (rotatecount 120, logstart 1, i 54),
old log /mysql/logs/slow-queries.log.54 does not exist
renaming /mysql/logs/slow-queries.log.53 to /mysql/logs/slow-queries.log.54 (rotatecount 120, logstart 1, i 53),
old log /mysql/logs/slow-queries.log.53 does not exist
renaming /mysql/logs/slow-queries.log.52 to /mysql/logs/slow-queries.log.53 (rotatecount 120, logstart 1, i 52),
old log /mysql/logs/slow-queries.log.52 does not exist
renaming /mysql/logs/slow-queries.log.51 to /mysql/logs/slow-queries.log.52 (rotatecount 120, logstart 1, i 51),
old log /mysql/logs/slow-queries.log.51 does not exist
renaming /mysql/logs/slow-queries.log.50 to /mysql/logs/slow-queries.log.51 (rotatecount 120, logstart 1, i 50),
old log /mysql/logs/slow-queries.log.50 does not exist
renaming /mysql/logs/slow-queries.log.49 to /mysql/logs/slow-queries.log.50 (rotatecount 120, logstart 1, i 49),
old log /mysql/logs/slow-queries.log.49 does not exist
renaming /mysql/logs/slow-queries.log.48 to /mysql/logs/slow-queries.log.49 (rotatecount 120, logstart 1, i 48),
old log /mysql/logs/slow-queries.log.48 does not exist
renaming /mysql/logs/slow-queries.log.47 to /mysql/logs/slow-queries.log.48 (rotatecount 120, logstart 1, i 47),
old log /mysql/logs/slow-queries.log.47 does not exist
renaming /mysql/logs/slow-queries.log.46 to /mysql/logs/slow-queries.log.47 (rotatecount 120, logstart 1, i 46),
old log /mysql/logs/slow-queries.log.46 does not exist
renaming /mysql/logs/slow-queries.log.45 to /mysql/logs/slow-queries.log.46 (rotatecount 120, logstart 1, i 45),
old log /mysql/logs/slow-queries.log.45 does not exist
renaming /mysql/logs/slow-queries.log.44 to /mysql/logs/slow-queries.log.45 (rotatecount 120, logstart 1, i 44),
old log /mysql/logs/slow-queries.log.44 does not exist
renaming /mysql/logs/slow-queries.log.43 to /mysql/logs/slow-queries.log.44 (rotatecount 120, logstart 1, i 43),
old log /mysql/logs/slow-queries.log.43 does not exist
renaming /mysql/logs/slow-queries.log.42 to /mysql/logs/slow-queries.log.43 (rotatecount 120, logstart 1, i 42),
old log /mysql/logs/slow-queries.log.42 does not exist
renaming /mysql/logs/slow-queries.log.41 to /mysql/logs/slow-queries.log.42 (rotatecount 120, logstart 1, i 41),
old log /mysql/logs/slow-queries.log.41 does not exist
renaming /mysql/logs/slow-queries.log.40 to /mysql/logs/slow-queries.log.41 (rotatecount 120, logstart 1, i 40),
old log /mysql/logs/slow-queries.log.40 does not exist
renaming /mysql/logs/slow-queries.log.39 to /mysql/logs/slow-queries.log.40 (rotatecount 120, logstart 1, i 39),
old log /mysql/logs/slow-queries.log.39 does not exist
renaming /mysql/logs/slow-queries.log.38 to /mysql/logs/slow-queries.log.39 (rotatecount 120, logstart 1, i 38),
old log /mysql/logs/slow-queries.log.38 does not exist
renaming /mysql/logs/slow-queries.log.37 to /mysql/logs/slow-queries.log.38 (rotatecount 120, logstart 1, i 37),
old log /mysql/logs/slow-queries.log.37 does not exist
renaming /mysql/logs/slow-queries.log.36 to /mysql/logs/slow-queries.log.37 (rotatecount 120, logstart 1, i 36),
old log /mysql/logs/slow-queries.log.36 does not exist
renaming /mysql/logs/slow-queries.log.35 to /mysql/logs/slow-queries.log.36 (rotatecount 120, logstart 1, i 35),
old log /mysql/logs/slow-queries.log.35 does not exist
renaming /mysql/logs/slow-queries.log.34 to /mysql/logs/slow-queries.log.35 (rotatecount 120, logstart 1, i 34),
old log /mysql/logs/slow-queries.log.34 does not exist
renaming /mysql/logs/slow-queries.log.33 to /mysql/logs/slow-queries.log.34 (rotatecount 120, logstart 1, i 33),
old log /mysql/logs/slow-queries.log.33 does not exist
renaming /mysql/logs/slow-queries.log.32 to /mysql/logs/slow-queries.log.33 (rotatecount 120, logstart 1, i 32),
old log /mysql/logs/slow-queries.log.32 does not exist
renaming /mysql/logs/slow-queries.log.31 to /mysql/logs/slow-queries.log.32 (rotatecount 120, logstart 1, i 31),
old log /mysql/logs/slow-queries.log.31 does not exist
renaming /mysql/logs/slow-queries.log.30 to /mysql/logs/slow-queries.log.31 (rotatecount 120, logstart 1, i 30),
old log /mysql/logs/slow-queries.log.30 does not exist
renaming /mysql/logs/slow-queries.log.29 to /mysql/logs/slow-queries.log.30 (rotatecount 120, logstart 1, i 29),
old log /mysql/logs/slow-queries.log.29 does not exist
renaming /mysql/logs/slow-queries.log.28 to /mysql/logs/slow-queries.log.29 (rotatecount 120, logstart 1, i 28),
old log /mysql/logs/slow-queries.log.28 does not exist
renaming /mysql/logs/slow-queries.log.27 to /mysql/logs/slow-queries.log.28 (rotatecount 120, logstart 1, i 27),
old log /mysql/logs/slow-queries.log.27 does not exist
renaming /mysql/logs/slow-queries.log.26 to /mysql/logs/slow-queries.log.27 (rotatecount 120, logstart 1, i 26),
old log /mysql/logs/slow-queries.log.26 does not exist
renaming /mysql/logs/slow-queries.log.25 to /mysql/logs/slow-queries.log.26 (rotatecount 120, logstart 1, i 25),
old log /mysql/logs/slow-queries.log.25 does not exist
renaming /mysql/logs/slow-queries.log.24 to /mysql/logs/slow-queries.log.25 (rotatecount 120, logstart 1, i 24),
old log /mysql/logs/slow-queries.log.24 does not exist
renaming /mysql/logs/slow-queries.log.23 to /mysql/logs/slow-queries.log.24 (rotatecount 120, logstart 1, i 23),
old log /mysql/logs/slow-queries.log.23 does not exist
renaming /mysql/logs/slow-queries.log.22 to /mysql/logs/slow-queries.log.23 (rotatecount 120, logstart 1, i 22),
old log /mysql/logs/slow-queries.log.22 does not exist
renaming /mysql/logs/slow-queries.log.21 to /mysql/logs/slow-queries.log.22 (rotatecount 120, logstart 1, i 21),
old log /mysql/logs/slow-queries.log.21 does not exist
renaming /mysql/logs/slow-queries.log.20 to /mysql/logs/slow-queries.log.21 (rotatecount 120, logstart 1, i 20),
old log /mysql/logs/slow-queries.log.20 does not exist
renaming /mysql/logs/slow-queries.log.19 to /mysql/logs/slow-queries.log.20 (rotatecount 120, logstart 1, i 19),
old log /mysql/logs/slow-queries.log.19 does not exist
renaming /mysql/logs/slow-queries.log.18 to /mysql/logs/slow-queries.log.19 (rotatecount 120, logstart 1, i 18),
old log /mysql/logs/slow-queries.log.18 does not exist
renaming /mysql/logs/slow-queries.log.17 to /mysql/logs/slow-queries.log.18 (rotatecount 120, logstart 1, i 17),
old log /mysql/logs/slow-queries.log.17 does not exist
renaming /mysql/logs/slow-queries.log.16 to /mysql/logs/slow-queries.log.17 (rotatecount 120, logstart 1, i 16),
old log /mysql/logs/slow-queries.log.16 does not exist
renaming /mysql/logs/slow-queries.log.15 to /mysql/logs/slow-queries.log.16 (rotatecount 120, logstart 1, i 15),
old log /mysql/logs/slow-queries.log.15 does not exist
renaming /mysql/logs/slow-queries.log.14 to /mysql/logs/slow-queries.log.15 (rotatecount 120, logstart 1, i 14),
old log /mysql/logs/slow-queries.log.14 does not exist
renaming /mysql/logs/slow-queries.log.13 to /mysql/logs/slow-queries.log.14 (rotatecount 120, logstart 1, i 13),
old log /mysql/logs/slow-queries.log.13 does not exist
renaming /mysql/logs/slow-queries.log.12 to /mysql/logs/slow-queries.log.13 (rotatecount 120, logstart 1, i 12),
old log /mysql/logs/slow-queries.log.12 does not exist
renaming /mysql/logs/slow-queries.log.11 to /mysql/logs/slow-queries.log.12 (rotatecount 120, logstart 1, i 11),
old log /mysql/logs/slow-queries.log.11 does not exist
renaming /mysql/logs/slow-queries.log.10 to /mysql/logs/slow-queries.log.11 (rotatecount 120, logstart 1, i 10),
old log /mysql/logs/slow-queries.log.10 does not exist
renaming /mysql/logs/slow-queries.log.9 to /mysql/logs/slow-queries.log.10 (rotatecount 120, logstart 1, i 9),
old log /mysql/logs/slow-queries.log.9 does not exist
renaming /mysql/logs/slow-queries.log.8 to /mysql/logs/slow-queries.log.9 (rotatecount 120, logstart 1, i 8),
old log /mysql/logs/slow-queries.log.8 does not exist
renaming /mysql/logs/slow-queries.log.7 to /mysql/logs/slow-queries.log.8 (rotatecount 120, logstart 1, i 7),
old log /mysql/logs/slow-queries.log.7 does not exist
renaming /mysql/logs/slow-queries.log.6 to /mysql/logs/slow-queries.log.7 (rotatecount 120, logstart 1, i 6),
old log /mysql/logs/slow-queries.log.6 does not exist
renaming /mysql/logs/slow-queries.log.5 to /mysql/logs/slow-queries.log.6 (rotatecount 120, logstart 1, i 5),
old log /mysql/logs/slow-queries.log.5 does not exist
renaming /mysql/logs/slow-queries.log.4 to /mysql/logs/slow-queries.log.5 (rotatecount 120, logstart 1, i 4),
old log /mysql/logs/slow-queries.log.4 does not exist
renaming /mysql/logs/slow-queries.log.3 to /mysql/logs/slow-queries.log.4 (rotatecount 120, logstart 1, i 3),
old log /mysql/logs/slow-queries.log.3 does not exist
renaming /mysql/logs/slow-queries.log.2 to /mysql/logs/slow-queries.log.3 (rotatecount 120, logstart 1, i 2),
renaming /mysql/logs/slow-queries.log.1 to /mysql/logs/slow-queries.log.2 (rotatecount 120, logstart 1, i 1),
renaming /mysql/logs/slow-queries.log.0 to /mysql/logs/slow-queries.log.1 (rotatecount 120, logstart 1, i 0),
old log /mysql/logs/slow-queries.log.0 does not exist
log /mysql/logs/slow-queries.log.121 doesn't exist -- won't try to dispose of it
renaming /mysql/logs/error.log to /mysql/logs/error.log.1
creating new log mode = 0660 uid = 27 gid = 27
renaming /mysql/logs/general.log to /mysql/logs/general.log.1
creating new log mode = 0660 uid = 27 gid = 27
renaming /mysql/logs/slow-queries.log to /mysql/logs/slow-queries.log.1
creating new log mode = 0660 uid = 27 gid = 27
running postrotate script
[root@db01 /mysql/logs]# ll
total 1675440
-rw-rw---- 1 mysql mysql          0 Aug 11  2009 error.log
-rw-rw---- 1 mysql mysql        472 Aug 11  2009 error.log.1
-rw-rw---- 1 mysql mysql        472 Aug 11 15:03 error.log.2
-rw-rw---- 1 mysql mysql        472 Aug 11 14:57 error.log.3
-rw-rw---- 1 mysql mysql          0 Aug 11  2009 error.log-old
-rw-rw---- 1 mysql mysql        213 Aug 11  2009 general.log
-rw-rw---- 1 mysql mysql        827 Aug 11  2009 general.log.1
-rw-rw---- 1 mysql mysql       1082 Aug 11 15:03 general.log.2
-rw-rw---- 1 mysql mysql      37115 Aug 11 15:01 general.log.3
-rw-rw---- 1 mysql mysql 1693930999 Aug 11 11:06 general.log.4
-rw-rw---- 1 mysql mysql        177 Aug 11  2009 slow-queries.log
-rw-rw---- 1 mysql mysql        354 Aug 11  2009 slow-queries.log.1
-rw-rw---- 1 mysql mysql        354 Aug 11 15:03 slow-queries.log.2
-rw-rw---- 1 mysql mysql   18263218 Aug 11 14:57 slow-queries.log.3
[root@db01 /mysql/logs]#

外部链接:
Rotating General Query & Slow Logs
Be careful rotating MySQL logs
Rotating logs - MySQL Administrator's Bible By Sheeri K. Cabral, Keith Murphy

5.2.6. Server Log Maintenance
5.2.3. The General Query Log

Truncating MySQL Log Files
How to logrotate mysq slow log files?
[rhelv5-list] where is mysql-log-rotate in RH EL 4/5 ?

参考MySQL某发行版本的配置文件
# This logname can be set in /etc/my.cnf
# by setting the variable "err-log"
# in the [safe_mysqld] section as follows:
#
# [safe_mysqld]
# err-log=/var/lib/mysql/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
# content:
#
# [mysqladmin]
# password = <secret>
# user= root
#
# where "<secret>" is the password.
#
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !

/var/lib/mysql/mysqld.log {
        # create 600 mysql mysql
        notifempty
        daily
        rotate 3
        missingok
        compress
    postrotate
        # just if mysqld is really running
        if test -x /usr/bin/mysqladmin && \
           /usr/bin/mysqladmin ping &>/dev/null
        then
           /usr/bin/mysqladmin flush-logs
        fi
    endscript
}


-fin-

Website Analytics

Followers