~vlad-lesin/percona-playback/bug1111215

« back to all changes in this revision

Viewing changes to percona_playback/tcpdump/docs/index.rst

  • Committer: jenkins at percona
  • Date: 2012-12-10 05:56:09 UTC
  • mfrom: (169.1.2 rn-0.5-t2)
  • Revision ID: jenkins@jenkins.percona.com-20121210055609-4glogwn6s5ckunwx
MergeĀ lp:~hrvojem/percona-playback/rn-0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
.. note::
12
12
 The |tcpdump| plugin can parse packets only on raw format. The "-w" option must be used for |tcpdump| during capturing to get input files for the tool. 
13
13
 
14
 
The example of usage:
15
 
Playback percona_playback/test/tcpdump_accuracy.dump on MySQL server in *accurate* mode and queries queue limit of 10 000 elements: :: 
16
 
 
17
 
  $ bin/percona-playback --input-plugin=tcpdump --tcpdump-file=percona-playback/test/tcpdump_accuracy.dump \
18
 
   --tcpdump-mode=accurate --db-plugin=libmysqlclient --mysql-host=some_host --mysql-port=3307 \
19
 
   --mysql-username=test_user --mysql-password=passW0rd --mysql-schema=test1 --queue-depth 10000
 
14
Example
 
15
=======
 
16
 
 
17
1) Queries will be captured with :program:`tcpdump` to the :file:`example.dump`: 
 
18
 
 
19
.. code-block:: bash
 
20
 
 
21
  $ tcpdump -i any port 3306 -w example.dump
 
22
 
 
23
2) |Percona Playback| is started with tcpdump plugin reading the example.dump file, connecting to remote |MySQL| server in *accurate* mode: 
 
24
 
 
25
.. code-block:: bash
 
26
 
 
27
  $ percona-playback --input-plugin=tcpdump --tcpdump-file=example.dump --tcpdump-mode=accurate \
 
28
  --db-plugin=libmysqlclient --mysql-host=10.8.2.10 --mysql-username=root \
 
29
  --mysql-password=passW0rd --mysql-schema=imdb
 
30
 
 
31
3) After the |Percona Playback| is done, report is generated that looks like this:  
 
32
 
 
33
.. code-block:: bash
 
34
 
 
35
  Report
 
36
  ------
 
37
  Executed 22 queries
 
38
  Spent 00:00:32.844442 executing queries versus an expected 00:00:00.503753 time.
 
39
  1 queries were quicker than expected, 21 were slower
 
40
  A total of 0 queries had errors.
 
41
  Expected 30298 rows, got 30298 (a difference of 0)
 
42
  Number of queries where number of rows differed: 0.
 
43
 
 
44
  Average of 22.00 queries per connection (1 connections).
20
45