.\" Title: \fBmysql\-stress\-test.pl\fR
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1
.\" Date: 04/19/2007
.\" Manual: MySQL Database System
.\" Source: MySQL
.\"
.TH "\fBMYSQL\-STRESS\-TEST" "1" "04/19/2007" "MySQL" "MySQL Database System"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
mysql\-stress\-test.pl \- server stress test program
.SH "SYNOPSIS"
.HP 31
\fBmysql\-stress\-test.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
The
\fBmysql\-stress\-test.pl\fR
Perl script performs stress\-testing of the MySQL server. (MySQL 5.0 and up only)
.PP
\fBmysql\-stress\-test.pl\fR
requires a version of Perl that has been built with threads support.
.PP
Invoke
\fBmysql\-stress\-test.pl\fR
like this:
.sp
.RS 3n
.nf
shell> \fBmysql\-stress\-test.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
.fi
.RE
.PP
\fBmysql\-stress\-test.pl\fR
supports the following options:
.TP 3n
\(bu
\fB\-\-help\fR
.sp
Display a help message and exit.
.TP 3n
\(bu
\fB\-\-abort\-on\-error\fR
.sp
Unknown.
.TP 3n
\(bu
\fB\-\-check\-tests\-file\fR
.sp
Periodically check the file that lists the tests to be run. If it has been modified, reread the file. This can be useful if you update the list of tests to be run during a stress test.
.TP 3n
\(bu
\fB\-\-cleanup\fR
.sp
Force cleanup of the working directory.
.TP 3n
\(bu
\fB\-\-log\-error\-details\fR
.sp
Log error details in the global error log file.
.TP 3n
\(bu
\fB\-\-loop\-count=\fR\fB\fIN\fR\fR
.sp
In sequential test mode, the number of loops to execute before exiting.
.TP 3n
\(bu
\fB\-\-mysqltest=\fR\fB\fIpath\fR\fR
.sp
The pathname to the
\fBmysqltest\fR
program.
.TP 3n
\(bu
\fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR
.sp
The database to use for the tests.
.TP 3n
\(bu
\fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR
.sp
The hostname of the local host to use for making a TCP/IP connection to the local server. By default, the connection is made to
localhost
using a Unix socket file.
.TP 3n
\(bu
\fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR
.sp
This option is required.
\fIpath\fR
is the directory where all client session logs will be stored. Usually this is the shared directory that is associated with the server used for testing.
.TP 3n
\(bu
\fB\-\-server\-password=\fR\fB\fIpassword\fR\fR
.sp
The password to use when connecting to the server.
.TP 3n
\(bu
\fB\-\-server\-port=\fR\fB\fIport_num\fR\fR
.sp
The TCP/IP port number to use for connecting to the server. The default is 3306.
.TP 3n
\(bu
\fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR
.sp
For connections to
localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use. The default if
\fI/tmp/mysql.sock\fR.
.TP 3n
\(bu
\fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR
.sp
The MySQL username to use when connecting to the server. The default is
root.
.TP 3n
\(bu
\fB\-\-sleep\-time=\fR\fB\fIN\fR\fR
.sp
The delay in seconds between test executions.
.TP 3n
\(bu
\fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR
.sp
This option is required.
\fIpath\fR
is the working directory for the test run. It is used as the temporary location for result tracking during testing.
.TP 3n
\(bu
\fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR
.sp
The directory of data files to be used during testing. The default location is the
\fIdata\fR
directory under the location given by the
\fB\-\-stress\-suite\-basedir\fR
option.
.TP 3n
\(bu
\fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR
.sp
\fIfile_name\fR
is the location of the file that contains the list of tests. If missing, the default file is
\fIstress_init.txt\fR
in the test suite directory.
.TP 3n
\(bu
\fB\-\-stress\-mode=\fR\fB\fImode\fR\fR
.sp
This option indicates the test order in stress\-test mode. The
\fImode\fR
value is either
random
to select tests in random order or
seq
to run tests in each thread in the order specified in the test list file. The default mode is
random.
.TP 3n
\(bu
\fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR
.sp
This option is required.
\fIpath\fR
is the directory that has the
\fIt\fR
and
\fIr\fR
subdirectories containing the test case and result files. This directory is also the default location of the
\fIstress\-test.txt\fR
file that contains the list of tests. (A different location can be specified with the
\fB\-\-stress\-tests\-file\fR
option.)
.TP 3n
\(bu
\fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
Use this option to run the stress tests.
\fIfile_name\fR
is the location of the file that contains the list of tests. If
\fIfile_name\fR
is omitted, the default file is
\fIstress\-test.txt\fR
in the stress suite directory. (See
\fB\-\-stress\-suite\-basedir\fR.)
.TP 3n
\(bu
\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR
.sp
Run the named test suite. The default name is
main
(the regular test suite located in the
\fImysql\-test\fR
directory).
.TP 3n
\(bu
\fB\-\-test\-count=\fR\fB\fIN\fR\fR
.sp
The number of tests to execute before exiting.
.TP 3n
\(bu
\fB\-\-test\-duration=\fR\fB\fIN\fR\fR
.sp
The duration of stress testing in seconds.
.TP 3n
\(bu
\fB\-\-test\-suffix=\fR\fB\fIstr\fR\fR
.sp
Unknown.
.TP 3n
\(bu
\fB\-\-threads=\fR\fB\fIN\fR\fR
.sp
The number of threads. The default is 1.
.TP 3n
\(bu
\fB\-\-verbose\fR
.sp
Verbose mode. Print more information about what the program does.
.SH "COPYRIGHT"
.PP
Copyright 2006\-2007 MySQL AB
.PP
This documentation is NOT distributed under a GPL license. Use of this documentation is subject to the following terms: You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as the actual content is not altered or edited in any way. You shall not publish or distribute this documentation in any form or on any media, except if you distribute the documentation in a manner similar to how MySQL disseminates it (that is, electronically for download on a Web site with the software) or on a CD\-ROM or similar medium, provided however that the documentation is disseminated together with the software on the same medium. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of MySQL AB. MySQL AB reserves any and all rights to this documentation not expressly granted above.
.PP
Please email
for more information or if you are interested in doing a translation.
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
MySQL AB (http://www.mysql.com/).
This software comes with no warranty.