mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-24 02:01:42 +08:00
Make parse_options work with everything: cmd line, config files, values with spaces, op val, op=val, etc.
This commit is contained in:
@@ -182,8 +182,8 @@ The syntax of the configuration files is as follows:
|
||||
|
||||
=item *
|
||||
|
||||
Whitespace followed by a hash (#) sign signifies that the rest of the line is a
|
||||
comment. This is deleted.
|
||||
Whitespace followed by a hash sign (#) signifies that the rest of the line is a
|
||||
comment. This is deleted. For example:
|
||||
|
||||
=item *
|
||||
|
||||
@@ -200,7 +200,9 @@ Each line is permitted to be in either of the following formats:
|
||||
option
|
||||
option=value
|
||||
|
||||
Whitespace around the equals sign is deleted during processing.
|
||||
Do not prefix the option with C<-->. Do not quote the values, even if
|
||||
it has spaces; value are literal. Whitespace around the equals sign is
|
||||
deleted during processing.
|
||||
|
||||
=item *
|
||||
|
||||
@@ -214,6 +216,22 @@ program.
|
||||
|
||||
=back
|
||||
|
||||
=head2 EXAMPLE
|
||||
|
||||
This config file for pt-stalk,
|
||||
|
||||
# Config for pt-stalk
|
||||
variable=Threads_connected
|
||||
cycles=2 # trigger if problem seen twice in a row
|
||||
--
|
||||
--user daniel
|
||||
|
||||
is equivalent to this command line:
|
||||
|
||||
pt-stalk --variable Threads_connected --cycles 2 -- --user daniel
|
||||
|
||||
Options after C<--> are passed literally to mysql and mysqladmin.
|
||||
|
||||
=head2 READ ORDER
|
||||
|
||||
The tools read several configuration files in order:
|
||||
|
||||
Reference in New Issue
Block a user