~percona-toolkit-dev/percona-toolkit/fix-pt-osc-drop-bug-1188002

« back to all changes in this revision

Viewing changes to docs/user/pt-variable-advisor.rst

  • Committer: Daniel Nichter
  • Date: 2011-07-14 19:08:47 UTC
  • Revision ID: daniel@percona.com-20110714190847-lggalkuvdrh7c4jp
Add standard pkg files (COPYING, README, etc.), percona-toolkit.pod, and user docs.  Remove dev/docs/html.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
###################
 
3
pt-variable-advisor
 
4
###################
 
5
 
 
6
.. highlight:: perl
 
7
 
 
8
 
 
9
****
 
10
NAME
 
11
****
 
12
 
 
13
 
 
14
pt-variable-advisor - Analyze MySQL variables and advise on possible problems.
 
15
 
 
16
 
 
17
********
 
18
SYNOPSIS
 
19
********
 
20
 
 
21
 
 
22
Usage: pt-variable-advisor [OPTION...] [DSN]
 
23
 
 
24
pt-variable-advisor analyzes variables and advises on possible problems.
 
25
 
 
26
Get SHOW VARIABLES from localhost:
 
27
 
 
28
 
 
29
.. code-block:: perl
 
30
 
 
31
   pt-variable-advisor localhost
 
32
 
 
33
 
 
34
Get SHOW VARIABLES output saved in vars.txt:
 
35
 
 
36
 
 
37
.. code-block:: perl
 
38
 
 
39
   pt-variable-advisor --source-of-variables vars.txt
 
40
 
 
41
 
 
42
 
 
43
*****
 
44
RISKS
 
45
*****
 
46
 
 
47
 
 
48
The following section is included to inform users about the potential risks,
 
49
whether known or unknown, of using this tool.  The two main categories of risks
 
50
are those created by the nature of the tool (e.g. read-only tools vs. read-write
 
51
tools) and those created by bugs.
 
52
 
 
53
pt-variable-advisor reads MySQL's configuration and examines it and is thus
 
54
very low risk.
 
55
 
 
56
At the time of this release, we know of no bugs that could cause serious harm to
 
57
users.
 
58
 
 
59
The authoritative source for updated information is always the online issue
 
60
tracking system.  Issues that affect this tool will be marked as such.  You can
 
61
see a list of such issues at the following URL:
 
62
`http://www.percona.com/bugs/pt-variable-advisor <http://www.percona.com/bugs/pt-variable-advisor>`_.
 
63
 
 
64
See also "BUGS" for more information on filing bugs and getting help.
 
65
 
 
66
 
 
67
***********
 
68
DESCRIPTION
 
69
***********
 
70
 
 
71
 
 
72
pt-variable-advisor examines \ ``SHOW VARIABLES``\  for bad values and settings
 
73
according to the "RULES" described below.  It reports on variables that
 
74
match the rules, so you can find bad settings in your MySQL server.
 
75
 
 
76
At the time of this release, pt-variable-advisor only examples
 
77
\ ``SHOW VARIABLES``\ , but other input sources are planned like \ ``SHOW STATUS``\ 
 
78
and \ ``SHOW SLAVE STATUS``\ .
 
79
 
 
80
 
 
81
*****
 
82
RULES
 
83
*****
 
84
 
 
85
 
 
86
These are the rules that pt-variable-advisor will apply to SHOW VARIABLES.
 
87
Each rule has three parts: an ID, a severity, and a description.
 
88
 
 
89
The rule's ID is a short, unique name for the rule.  It usually relates
 
90
to the variable that the rule examines.  If a variable is examined by
 
91
several rules, then the rules' IDs are numbered like "-1", "-2", "-N".
 
92
 
 
93
The rule's severity is an indication of how important it is that this
 
94
rule matched a query.  We use NOTE, WARN, and CRIT to denote these
 
95
levels.
 
96
 
 
97
The rule's description is a textual, human-readable explanation of
 
98
what it means when a variable matches this rule.  Depending on the
 
99
verbosity of the report you generate, you will see more of the text in
 
100
the description.  By default, you'll see only the first sentence,
 
101
which is sort of a terse synopsis of the rule's meaning.  At a higher
 
102
verbosity, you'll see subsequent sentences.
 
103
 
 
104
 
 
105
auto_increment
 
106
 
 
107
 severity: note
 
108
 
 
109
 Are you trying to write to more than one server in a dual-master or
 
110
 ring replication configuration?  This is potentially very dangerous and in
 
111
 most cases is a serious mistake.  Most people's reasons for doing this are
 
112
 actually not valid at all.
 
113
 
 
114
 
 
115
 
 
116
concurrent_insert
 
117
 
 
118
 severity: note
 
119
 
 
120
 Holes (spaces left by deletes) in MyISAM tables might never be
 
121
 reused.
 
122
 
 
123
 
 
124
 
 
125
connect_timeout
 
126
 
 
127
 severity: note
 
128
 
 
129
 A large value of this setting can create a denial of service
 
130
 vulnerability.
 
131
 
 
132
 
 
133
 
 
134
debug
 
135
 
 
136
 severity: crit
 
137
 
 
138
 Servers built with debugging capability should not be used in
 
139
 production because of the large performance impact.
 
140
 
 
141
 
 
142
 
 
143
delay_key_write
 
144
 
 
145
 severity: warn
 
146
 
 
147
 MyISAM index blocks are never flushed until necessary.  If there is
 
148
 a server crash, data corruption on MyISAM tables can be much worse than
 
149
 usual.
 
150
 
 
151
 
 
152
 
 
153
flush
 
154
 
 
155
 severity: warn
 
156
 
 
157
 This option might decrease performance greatly.
 
158
 
 
159
 
 
160
 
 
161
flush_time
 
162
 
 
163
 severity: warn
 
164
 
 
165
 This option might decrease performance greatly.
 
166
 
 
167
 
 
168
 
 
169
have_bdb
 
170
 
 
171
 severity: note
 
172
 
 
173
 The BDB engine is deprecated.  If you aren't using it, you should
 
174
 disable it with the skip_bdb option.
 
175
 
 
176
 
 
177
 
 
178
init_connect
 
179
 
 
180
 severity: note
 
181
 
 
182
 The init_connect option is enabled on this server.
 
183
 
 
184
 
 
185
 
 
186
init_file
 
187
 
 
188
 severity: note
 
189
 
 
190
 The init_file option is enabled on this server.
 
191
 
 
192
 
 
193
 
 
194
init_slave
 
195
 
 
196
 severity: note
 
197
 
 
198
 The init_slave option is enabled on this server.
 
199
 
 
200
 
 
201
 
 
202
innodb_additional_mem_pool_size
 
203
 
 
204
 severity: warn
 
205
 
 
206
 This variable generally doesn't need to be larger than 20MB.
 
207
 
 
208
 
 
209
 
 
210
innodb_buffer_pool_size
 
211
 
 
212
 severity: warn
 
213
 
 
214
 The InnoDB buffer pool size is unconfigured.  In a production
 
215
 environment it should always be configured explicitly, and the default
 
216
 10MB size is not good.
 
217
 
 
218
 
 
219
 
 
220
innodb_checksums
 
221
 
 
222
 severity: warn
 
223
 
 
224
 InnoDB checksums are disabled.  Your data is not protected from
 
225
 hardware corruption or other errors!
 
226
 
 
227
 
 
228
 
 
229
innodb_doublewrite
 
230
 
 
231
 severity: warn
 
232
 
 
233
 InnoDB doublewrite is disabled.  Unless you use a filesystem that
 
234
 protects against partial page writes, your data is not safe!
 
235
 
 
236
 
 
237
 
 
238
innodb_fast_shutdown
 
239
 
 
240
 severity: warn
 
241
 
 
242
 InnoDB's shutdown behavior is not the default.  This can lead to
 
243
 poor performance, or the need to perform crash recovery upon startup.
 
244
 
 
245
 
 
246
 
 
247
innodb_flush_log_at_trx_commit-1
 
248
 
 
249
 severity: warn
 
250
 
 
251
 InnoDB is not configured in strictly ACID mode.  If there
 
252
 is a crash, some transactions can be lost.
 
253
 
 
254
 
 
255
 
 
256
innodb_flush_log_at_trx_commit-2
 
257
 
 
258
 severity: warn
 
259
 
 
260
 Setting innodb_flush_log_at_trx_commit to 0 has no performance
 
261
 benefits over setting it to 2, and more types of data loss are possible.
 
262
 If you are trying to change it from 1 for performance reasons, you should
 
263
 set it to 2 instead of 0.
 
264
 
 
265
 
 
266
 
 
267
innodb_force_recovery
 
268
 
 
269
 severity: warn
 
270
 
 
271
 InnoDB is in forced recovery mode!  This should be used only
 
272
 temporarily when recovering from data corruption or other bugs, not for
 
273
 normal usage.
 
274
 
 
275
 
 
276
 
 
277
innodb_lock_wait_timeout
 
278
 
 
279
 severity: warn
 
280
 
 
281
 This option has an unusually long value, which can cause
 
282
 system overload if locks are not being released.
 
283
 
 
284
 
 
285
 
 
286
innodb_log_buffer_size
 
287
 
 
288
 severity: warn
 
289
 
 
290
 The InnoDB log buffer size generally should not be set larger than
 
291
 16MB.  If you are doing large BLOB operations, InnoDB is not really a good
 
292
 choice of engines anyway.
 
293
 
 
294
 
 
295
 
 
296
innodb_log_file_size
 
297
 
 
298
 severity: warn
 
299
 
 
300
 The InnoDB log file size is set to its default value, which is not
 
301
 usable on production systems.
 
302
 
 
303
 
 
304
 
 
305
innodb_max_dirty_pages_pct
 
306
 
 
307
 severity: note
 
308
 
 
309
 The innodb_max_dirty_pages_pct is lower than the default.  This can
 
310
 cause overly aggressive flushing and add load to the I/O system.
 
311
 
 
312
 
 
313
 
 
314
flush_time
 
315
 
 
316
 severity: warn
 
317
 
 
318
 This setting is likely to cause very bad performance every
 
319
 flush_time seconds.
 
320
 
 
321
 
 
322
 
 
323
key_buffer_size
 
324
 
 
325
 severity: warn
 
326
 
 
327
 The key buffer size is unconfigured.  In a production
 
328
 environment it should always be configured explicitly, and the default
 
329
 8MB size is not good.
 
330
 
 
331
 
 
332
 
 
333
large_pages
 
334
 
 
335
 severity: note
 
336
 
 
337
 Large pages are enabled.
 
338
 
 
339
 
 
340
 
 
341
locked_in_memory
 
342
 
 
343
 severity: note
 
344
 
 
345
 The server is locked in memory with --memlock.
 
346
 
 
347
 
 
348
 
 
349
log_warnings-1
 
350
 
 
351
 severity: note
 
352
 
 
353
 Log_warnings is disabled, so unusual events such as statements
 
354
 unsafe for replication and aborted connections will not be logged to the
 
355
 error log.
 
356
 
 
357
 
 
358
 
 
359
log_warnings-2
 
360
 
 
361
 severity: note
 
362
 
 
363
 Log_warnings must be set greater than 1 to log unusual events such
 
364
 as aborted connections.
 
365
 
 
366
 
 
367
 
 
368
low_priority_updates
 
369
 
 
370
 severity: note
 
371
 
 
372
 The server is running with non-default lock priority for updates.
 
373
 This could cause update queries to wait unexpectedly for read queries.
 
374
 
 
375
 
 
376
 
 
377
max_binlog_size
 
378
 
 
379
 severity: note
 
380
 
 
381
 The max_binlog_size is smaller than the default of 1GB.
 
382
 
 
383
 
 
384
 
 
385
max_connect_errors
 
386
 
 
387
 severity: note
 
388
 
 
389
 max_connect_errors should probably be set as large as your platform
 
390
 allows.
 
391
 
 
392
 
 
393
 
 
394
max_connections
 
395
 
 
396
 severity: warn
 
397
 
 
398
 If the server ever really has more than a thousand threads running,
 
399
 then the system is likely to spend more time scheduling threads than
 
400
 really doing useful work.  This variable's value should be considered in
 
401
 light of your workload.
 
402
 
 
403
 
 
404
 
 
405
myisam_repair_threads
 
406
 
 
407
 severity: note
 
408
 
 
409
 myisam_repair_threads > 1 enables multi-threaded repair, which is
 
410
 relatively untested and is still listed as beta-quality code in the
 
411
 official documentation.
 
412
 
 
413
 
 
414
 
 
415
old_passwords
 
416
 
 
417
 severity: warn
 
418
 
 
419
 Old-style passwords are insecure.  They are sent in plain text
 
420
 across the wire.
 
421
 
 
422
 
 
423
 
 
424
optimizer_prune_level
 
425
 
 
426
 severity: warn
 
427
 
 
428
 The optimizer will use an exhaustive search when planning complex
 
429
 queries, which can cause the planning process to take a long time.
 
430
 
 
431
 
 
432
 
 
433
port
 
434
 
 
435
 severity: note
 
436
 
 
437
 The server is listening on a non-default port.
 
438
 
 
439
 
 
440
 
 
441
query_cache_size-1
 
442
 
 
443
 severity: note
 
444
 
 
445
 The query cache does not scale to large sizes and can cause unstable
 
446
 performance when larger than 128MB, especially on multi-core machines.
 
447
 
 
448
 
 
449
 
 
450
query_cache_size-2
 
451
 
 
452
 severity: warn
 
453
 
 
454
 The query cache can cause severe performance problems when it is
 
455
 larger than 256MB, especially on multi-core machines.
 
456
 
 
457
 
 
458
 
 
459
read_buffer_size-1
 
460
 
 
461
 severity: note
 
462
 
 
463
 The read_buffer_size variable should generally be left at its
 
464
 default unless an expert determines it is necessary to change it.
 
465
 
 
466
 
 
467
 
 
468
read_buffer_size-2
 
469
 
 
470
 severity: warn
 
471
 
 
472
 The read_buffer_size variable should not be larger than 8MB.  It
 
473
 should generally be left at its default unless an expert determines it is
 
474
 necessary to change it.  Making it larger than 2MB can hurt performance
 
475
 significantly, and can make the server crash, swap to death, or just
 
476
 become extremely unstable.
 
477
 
 
478
 
 
479
 
 
480
read_rnd_buffer_size-1
 
481
 
 
482
 severity: note
 
483
 
 
484
 The read_rnd_buffer_size variable should generally be left at its
 
485
 default unless an expert determines it is necessary to change it.
 
486
 
 
487
 
 
488
 
 
489
read_rnd_buffer_size-2
 
490
 
 
491
 severity: warn
 
492
 
 
493
 The read_rnd_buffer_size variable should not be larger than 4M.  It
 
494
 should generally be left at its default unless an expert determines it is
 
495
 necessary to change it.
 
496
 
 
497
 
 
498
 
 
499
relay_log_space_limit
 
500
 
 
501
 severity: warn
 
502
 
 
503
 Setting relay_log_space_limit is relatively rare, and could cause
 
504
 an increased risk of previously unknown bugs in replication.
 
505
 
 
506
 
 
507
 
 
508
slave_net_timeout
 
509
 
 
510
 severity: warn
 
511
 
 
512
 This variable is set too high.  This is too long to wait before
 
513
 noticing that the connection to the master has failed and retrying.  This
 
514
 should probably be set to 60 seconds or less.  It is also a good idea to
 
515
 use pt-heartbeat to ensure that the connection does not appear to time out
 
516
 when the master is simply idle.
 
517
 
 
518
 
 
519
 
 
520
slave_skip_errors
 
521
 
 
522
 severity: crit
 
523
 
 
524
 You should not set this option.  If replication is having errors,
 
525
 you need to find and resolve the cause of that; it is likely that your
 
526
 slave's data is different from the master.  You can find out with
 
527
 pt-table-checksum.
 
528
 
 
529
 
 
530
 
 
531
sort_buffer_size-1
 
532
 
 
533
 severity: note
 
534
 
 
535
 The sort_buffer_size variable should generally be left at its
 
536
 default unless an expert determines it is necessary to change it.
 
537
 
 
538
 
 
539
 
 
540
sort_buffer_size-2
 
541
 
 
542
 severity: note
 
543
 
 
544
 The sort_buffer_size variable should generally be left at its
 
545
 default unless an expert determines it is necessary to change it.  Making
 
546
 it larger than a few MB can hurt performance significantly, and can make
 
547
 the server crash, swap to death, or just become extremely unstable.
 
548
 
 
549
 
 
550
 
 
551
sql_notes
 
552
 
 
553
 severity: note
 
554
 
 
555
 This server is configured not to log Note level warnings to the
 
556
 error log.
 
557
 
 
558
 
 
559
 
 
560
sync_frm
 
561
 
 
562
 severity: warn
 
563
 
 
564
 It is best to set sync_frm so that .frm files are flushed safely to
 
565
 disk in case of a server crash.
 
566
 
 
567
 
 
568
 
 
569
tx_isolation-1
 
570
 
 
571
 severity: note
 
572
 
 
573
 This server's transaction isolation level is non-default.
 
574
 
 
575
 
 
576
 
 
577
tx_isolation-2
 
578
 
 
579
 severity: warn
 
580
 
 
581
 Most applications should use the default REPEATABLE-READ transaction
 
582
 isolation level, or in a few cases READ-COMMITTED.
 
583
 
 
584
 
 
585
 
 
586
expire_log_days
 
587
 
 
588
 severity: warn
 
589
 
 
590
 Binary logs are enabled, but automatic purging is not enabled.  If
 
591
 you do not purge binary logs, your disk will fill up.  If you delete
 
592
 binary logs externally to MySQL, you will cause unwanted behaviors.
 
593
 Always ask MySQL to purge obsolete logs, never delete them externally.
 
594
 
 
595
 
 
596
 
 
597
innodb_file_io_threads
 
598
 
 
599
 severity: note
 
600
 
 
601
 This option is useless except on Windows.
 
602
 
 
603
 
 
604
 
 
605
innodb_data_file_path
 
606
 
 
607
 severity: note
 
608
 
 
609
 Auto-extending InnoDB files can consume a lot of disk space that is
 
610
 very difficult to reclaim later.  Some people prefer to set
 
611
 innodb_file_per_table and allocate a fixed-size file for ibdata1.
 
612
 
 
613
 
 
614
 
 
615
innodb_flush_method
 
616
 
 
617
 severity: note
 
618
 
 
619
 Most production database servers that use InnoDB should set
 
620
 innodb_flush_method to O_DIRECT to avoid double-buffering, unless the I/O
 
621
 system is very low performance.
 
622
 
 
623
 
 
624
 
 
625
innodb_locks_unsafe_for_binlog
 
626
 
 
627
 severity: warn
 
628
 
 
629
 This option makes point-in-time recovery from binary logs, and
 
630
 replication, untrustworthy if statement-based logging is used.
 
631
 
 
632
 
 
633
 
 
634
innodb_support_xa
 
635
 
 
636
 severity: warn
 
637
 
 
638
 MySQL's internal XA transaction support between InnoDB and the
 
639
 binary log is disabled.  The binary log might not match InnoDB's state
 
640
 after crash recovery, and replication might drift out of sync due to
 
641
 out-of-order statements in the binary log.
 
642
 
 
643
 
 
644
 
 
645
log_bin
 
646
 
 
647
 severity: warn
 
648
 
 
649
 Binary logging is disabled, so point-in-time recovery and
 
650
 replication are not possible.
 
651
 
 
652
 
 
653
 
 
654
log_output
 
655
 
 
656
 severity: warn
 
657
 
 
658
 Directing log output to tables has a high performance impact.
 
659
 
 
660
 
 
661
 
 
662
max_relay_log_size
 
663
 
 
664
 severity: note
 
665
 
 
666
 A custom max_relay_log_size is defined.
 
667
 
 
668
 
 
669
 
 
670
myisam_recover_options
 
671
 
 
672
 severity: warn
 
673
 
 
674
 myisam_recover_options should be set to some value such as
 
675
 BACKUP,FORCE to ensure that table corruption is noticed.
 
676
 
 
677
 
 
678
 
 
679
storage_engine
 
680
 
 
681
 severity: note
 
682
 
 
683
 The server is using a non-standard storage engine as default.
 
684
 
 
685
 
 
686
 
 
687
sync_binlog
 
688
 
 
689
 severity: warn
 
690
 
 
691
 Binary logging is enabled, but sync_binlog isn't configured so that
 
692
 every transaction is flushed to the binary log for durability.
 
693
 
 
694
 
 
695
 
 
696
tmp_table_size
 
697
 
 
698
 severity: note
 
699
 
 
700
 The effective minimum size of in-memory implicit temporary tables
 
701
 used internally during query execution is min(tmp_table_size,
 
702
 max_heap_table_size), so max_heap_table_size should be at least as large
 
703
 as tmp_table_size.
 
704
 
 
705
 
 
706
 
 
707
old mysql version
 
708
 
 
709
 severity: warn
 
710
 
 
711
 These are the recommended minimum version for each major release: 3.23, 4.1.20, 5.0.37, 5.1.30.
 
712
 
 
713
 
 
714
 
 
715
end-of-life mysql version
 
716
 
 
717
 severity: note
 
718
 
 
719
 Every release older than 5.1 is now officially end-of-life.
 
720
 
 
721
 
 
722
 
 
723
 
 
724
*******
 
725
OPTIONS
 
726
*******
 
727
 
 
728
 
 
729
This tool accepts additional command-line arguments.  Refer to the
 
730
"SYNOPSIS" and usage information for details.
 
731
 
 
732
 
 
733
--ask-pass
 
734
 
 
735
 Prompt for a password when connecting to MySQL.
 
736
 
 
737
 
 
738
 
 
739
--charset
 
740
 
 
741
 short form: -A; type: string
 
742
 
 
743
 Default character set.  If the value is utf8, sets Perl's binmode on
 
744
 STDOUT to utf8, passes the mysql_enable_utf8 option to DBD::mysql, and
 
745
 runs SET NAMES UTF8 after connecting to MySQL.  Any other value sets
 
746
 binmode on STDOUT without the utf8 layer, and runs SET NAMES after
 
747
 connecting to MySQL.
 
748
 
 
749
 
 
750
 
 
751
--config
 
752
 
 
753
 type: Array
 
754
 
 
755
 Read this comma-separated list of config files; if specified, this must be the
 
756
 first option on the command line.
 
757
 
 
758
 
 
759
 
 
760
--[no]continue-on-error
 
761
 
 
762
 default: yes
 
763
 
 
764
 Continue working even if there is an error.
 
765
 
 
766
 
 
767
 
 
768
--daemonize
 
769
 
 
770
 Fork to the background and detach from the shell.  POSIX
 
771
 operating systems only.
 
772
 
 
773
 
 
774
 
 
775
--defaults-file
 
776
 
 
777
 short form: -F; type: string
 
778
 
 
779
 Only read mysql options from the given file.  You must give an absolute
 
780
 pathname.
 
781
 
 
782
 
 
783
 
 
784
--help
 
785
 
 
786
 Show help and exit.
 
787
 
 
788
 
 
789
 
 
790
--host
 
791
 
 
792
 short form: -h; type: string
 
793
 
 
794
 Connect to host.
 
795
 
 
796
 
 
797
 
 
798
--ignore-rules
 
799
 
 
800
 type: hash
 
801
 
 
802
 Ignore these rule IDs.
 
803
 
 
804
 Specify a comma-separated list of rule IDs (e.g. LIT.001,RES.002,etc.)
 
805
 to ignore.
 
806
 
 
807
 
 
808
 
 
809
--password
 
810
 
 
811
 short form: -p; type: string
 
812
 
 
813
 Password to use when connecting.
 
814
 
 
815
 
 
816
 
 
817
--pid
 
818
 
 
819
 type: string
 
820
 
 
821
 Create the given PID file when daemonized.  The file contains the process
 
822
 ID of the daemonized instance.  The PID file is removed when the
 
823
 daemonized instance exits.  The program checks for the existence of the
 
824
 PID file when starting; if it exists and the process with the matching PID
 
825
 exists, the program exits.
 
826
 
 
827
 
 
828
 
 
829
--port
 
830
 
 
831
 short form: -P; type: int
 
832
 
 
833
 Port number to use for connection.
 
834
 
 
835
 
 
836
 
 
837
--set-vars
 
838
 
 
839
 type: string; default: wait_timeout=10000
 
840
 
 
841
 Set these MySQL variables.  Immediately after connecting to MySQL, this string
 
842
 will be appended to SET and executed.
 
843
 
 
844
 
 
845
 
 
846
--socket
 
847
 
 
848
 short form: -S; type: string
 
849
 
 
850
 Socket file to use for connection.
 
851
 
 
852
 
 
853
 
 
854
--source-of-variables
 
855
 
 
856
 type: string; default: mysql
 
857
 
 
858
 Read \ ``SHOW VARIABLES``\  from this source.  Possible values are "mysql", "none"
 
859
 or a file name.  If "mysql" is specified then you must also specify a DSN
 
860
 on the command line.
 
861
 
 
862
 
 
863
 
 
864
--user
 
865
 
 
866
 short form: -u; type: string
 
867
 
 
868
 User for login if not current user.
 
869
 
 
870
 
 
871
 
 
872
--verbose
 
873
 
 
874
 short form: -v; cumulative: yes; default: 1
 
875
 
 
876
 Increase verbosity of output.  At the default level of verbosity, the
 
877
 program prints only the first sentence of each rule's description.  At
 
878
 higher levels, the program prints more of the description.
 
879
 
 
880
 
 
881
 
 
882
--version
 
883
 
 
884
 Show version and exit.
 
885
 
 
886
 
 
887
 
 
888
 
 
889
***********
 
890
DSN OPTIONS
 
891
***********
 
892
 
 
893
 
 
894
These DSN options are used to create a DSN.  Each option is given like
 
895
\ ``option=value``\ .  The options are case-sensitive, so P and p are not the
 
896
same option.  There cannot be whitespace before or after the \ ``=``\  and
 
897
if the value contains whitespace it must be quoted.  DSN options are
 
898
comma-separated.  See the percona-toolkit manpage for full details.
 
899
 
 
900
 
 
901
\* A
 
902
 
 
903
 dsn: charset; copy: yes
 
904
 
 
905
 Default character set.
 
906
 
 
907
 
 
908
 
 
909
\* D
 
910
 
 
911
 dsn: database; copy: yes
 
912
 
 
913
 Default database.
 
914
 
 
915
 
 
916
 
 
917
\* F
 
918
 
 
919
 dsn: mysql_read_default_file; copy: yes
 
920
 
 
921
 Only read default options from the given file
 
922
 
 
923
 
 
924
 
 
925
\* h
 
926
 
 
927
 dsn: host; copy: yes
 
928
 
 
929
 Connect to host.
 
930
 
 
931
 
 
932
 
 
933
\* p
 
934
 
 
935
 dsn: password; copy: yes
 
936
 
 
937
 Password to use when connecting.
 
938
 
 
939
 
 
940
 
 
941
\* P
 
942
 
 
943
 dsn: port; copy: yes
 
944
 
 
945
 Port number to use for connection.
 
946
 
 
947
 
 
948
 
 
949
\* S
 
950
 
 
951
 dsn: mysql_socket; copy: yes
 
952
 
 
953
 Socket file to use for connection.
 
954
 
 
955
 
 
956
 
 
957
\* u
 
958
 
 
959
 dsn: user; copy: yes
 
960
 
 
961
 User for login if not current user.
 
962
 
 
963
 
 
964
 
 
965
 
 
966
***********
 
967
DOWNLOADING
 
968
***********
 
969
 
 
970
 
 
971
Visit `http://www.percona.com/software/ <http://www.percona.com/software/>`_ to download the latest release of
 
972
Percona Toolkit.  Or, to get the latest release from the command line:
 
973
 
 
974
 
 
975
.. code-block:: perl
 
976
 
 
977
    wget percona.com/latest/percona-toolkit/PKG
 
978
 
 
979
 
 
980
Replace \ ``PKG``\  with \ ``tar``\ , \ ``rpm``\ , or \ ``deb``\  to download the package in that
 
981
format.  You can also get individual tools from the latest release:
 
982
 
 
983
 
 
984
.. code-block:: perl
 
985
 
 
986
    wget percona.com/latest/percona-toolkit/TOOL
 
987
 
 
988
 
 
989
Replace \ ``TOOL``\  with the name of any tool.
 
990
 
 
991
 
 
992
***********
 
993
ENVIRONMENT
 
994
***********
 
995
 
 
996
 
 
997
The environment variable \ ``PTDEBUG``\  enables verbose debugging output to STDERR.
 
998
To enable debugging and capture all output to a file, run the tool like:
 
999
 
 
1000
 
 
1001
.. code-block:: perl
 
1002
 
 
1003
    PTDEBUG=1 pt-variable-advisor ... > FILE 2>&1
 
1004
 
 
1005
 
 
1006
Be careful: debugging output is voluminous and can generate several megabytes
 
1007
of output.
 
1008
 
 
1009
 
 
1010
*******************
 
1011
SYSTEM REQUIREMENTS
 
1012
*******************
 
1013
 
 
1014
 
 
1015
You need Perl, DBI, DBD::mysql, and some core packages that ought to be
 
1016
installed in any reasonably new version of Perl.
 
1017
 
 
1018
 
 
1019
****
 
1020
BUGS
 
1021
****
 
1022
 
 
1023
 
 
1024
For a list of known bugs, see `http://www.percona.com/bugs/pt-variable-advisor <http://www.percona.com/bugs/pt-variable-advisor>`_.
 
1025
 
 
1026
Please report bugs at `https://bugs.launchpad.net/percona-toolkit <https://bugs.launchpad.net/percona-toolkit>`_.
 
1027
Include the following information in your bug report:
 
1028
 
 
1029
 
 
1030
\* Complete command-line used to run the tool
 
1031
 
 
1032
 
 
1033
 
 
1034
\* Tool "--version"
 
1035
 
 
1036
 
 
1037
 
 
1038
\* MySQL version of all servers involved
 
1039
 
 
1040
 
 
1041
 
 
1042
\* Output from the tool including STDERR
 
1043
 
 
1044
 
 
1045
 
 
1046
\* Input files (log/dump/config files, etc.)
 
1047
 
 
1048
 
 
1049
 
 
1050
If possible, include debugging output by running the tool with \ ``PTDEBUG``\ ;
 
1051
see "ENVIRONMENT".
 
1052
 
 
1053
 
 
1054
*******
 
1055
AUTHORS
 
1056
*******
 
1057
 
 
1058
 
 
1059
Baron Schwartz and Daniel Nichter
 
1060
 
 
1061
 
 
1062
*********************
 
1063
ABOUT PERCONA TOOLKIT
 
1064
*********************
 
1065
 
 
1066
 
 
1067
This tool is part of Percona Toolkit, a collection of advanced command-line
 
1068
tools developed by Percona for MySQL support and consulting.  Percona Toolkit
 
1069
was forked from two projects in June, 2011: Maatkit and Aspersa.  Those
 
1070
projects were created by Baron Schwartz and developed primarily by him and
 
1071
Daniel Nichter, both of whom are employed by Percona.  Visit
 
1072
`http://www.percona.com/software/ <http://www.percona.com/software/>`_ for more software developed by Percona.
 
1073
 
 
1074
 
 
1075
********************************
 
1076
COPYRIGHT, LICENSE, AND WARRANTY
 
1077
********************************
 
1078
 
 
1079
 
 
1080
This program is copyright 2010-2011 Percona Inc.
 
1081
Feedback and improvements are welcome.
 
1082
 
 
1083
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 
1084
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 
1085
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
1086
 
 
1087
This program is free software; you can redistribute it and/or modify it under
 
1088
the terms of the GNU General Public License as published by the Free Software
 
1089
Foundation, version 2; OR the Perl Artistic License.  On UNIX and similar
 
1090
systems, you can issue \`man perlgpl' or \`man perlartistic' to read these
 
1091
licenses.
 
1092
 
 
1093
You should have received a copy of the GNU General Public License along with
 
1094
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
1095
Place, Suite 330, Boston, MA  02111-1307  USA.
 
1096
 
 
1097
 
 
1098
*******
 
1099
VERSION
 
1100
*******
 
1101
 
 
1102
 
 
1103
Percona Toolkit v1.0.0 released 2011-08-01
 
1104