~percona-toolkit-dev/percona-toolkit/0.9

« back to all changes in this revision

Viewing changes to docs/user/pt-rel.rst

  • Committer: Daniel Nichter
  • Date: 2011-07-22 22:23:45 UTC
  • Revision ID: daniel@percona.com-20110722222345-2k78msfub0z44x9k
Update user docs for forked Aspersa tools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
****
12
12
 
13
13
 
14
 
rel - Make each number in a line of text relative to the previous matching line.
 
14
pt-rel - Relativize values to previous matching lines.
15
15
 
16
16
 
17
17
********
19
19
********
20
20
 
21
21
 
22
 
Given a file with some lines of text that follow a repeated pattern, including
23
 
numbers,
24
 
 
25
 
 
26
 
.. code-block:: perl
27
 
 
28
 
   rel /path/to/file.txt
 
22
Usage: pt-rel [FILES]
 
23
 
 
24
pt-rel matches lines and subtracts the value of the previous line's values
 
25
from the current line's values.  The lines must be text with numeric values
 
26
that repeat, varying only the values.
 
27
 
 
28
 
 
29
***********
 
30
DESCRIPTION
 
31
***********
29
32
 
30
33
 
31
34
For example, if the text is this:
39
42
   RW-shared spins 834352175, OS waits 20259032; RW-excl spins 1769762980
40
43
 
41
44
 
42
 
The output will be
 
45
Then the output will be:
43
46
 
44
47
 
45
48
.. code-block:: perl
50
53
   RW-shared spins 14648, OS waits 882; RW-excl spins 13146
51
54
 
52
55
 
53
 
 
54
 
***********
55
 
DOWNLOADING
56
 
***********
57
 
 
58
 
 
59
 
Visit `http://www.percona.com/software/ <http://www.percona.com/software/>`_ to download the latest release of
60
 
Percona Toolkit.  Or, to get the latest release from the command line:
61
 
 
62
 
 
63
 
.. code-block:: perl
64
 
 
65
 
    wget percona.com/latest/percona-toolkit/PKG
66
 
 
67
 
 
68
 
Replace \ ``PKG``\  with \ ``tar``\ , \ ``rpm``\ , or \ ``deb``\  to download the package in that
69
 
format.  You can also get individual tools from the latest release:
70
 
 
71
 
 
72
 
.. code-block:: perl
73
 
 
74
 
    wget percona.com/latest/percona-toolkit/TOOL
75
 
 
76
 
 
77
 
Replace \ ``TOOL``\  with the name of any tool.
 
56
The first values (line 1) for "Mutex spin waits", "rounds", and "OS waits"
 
57
were subtracted from the second values (line 3); the same happened for values
 
58
from lines 2 and 4.
 
59
 
 
60
 
 
61
*******
 
62
OPTIONS
 
63
*******
 
64
 
 
65
 
 
66
This tool does not have any command-line options.
78
67
 
79
68
 
80
69
***********
100
89
*******************
101
90
 
102
91
 
103
 
You need Bash.
 
92
This tool requires Perl v5.8 or newer.
104
93
 
105
94
 
106
95
****
138
127
see "ENVIRONMENT".
139
128
 
140
129
 
 
130
***********
 
131
DOWNLOADING
 
132
***********
 
133
 
 
134
 
 
135
Visit `http://www.percona.com/software/percona-toolkit/ <http://www.percona.com/software/percona-toolkit/>`_ to download the
 
136
latest release of Percona Toolkit.  Or, get the latest release from the
 
137
command line:
 
138
 
 
139
 
 
140
.. code-block:: perl
 
141
 
 
142
    wget percona.com/get/percona-toolkit.tar.gz
 
143
 
 
144
    wget percona.com/get/percona-toolkit.rpm
 
145
 
 
146
    wget percona.com/get/percona-toolkit.deb
 
147
 
 
148
 
 
149
You can also get individual tools from the latest release:
 
150
 
 
151
 
 
152
.. code-block:: perl
 
153
 
 
154
    wget percona.com/get/TOOL
 
155
 
 
156
 
 
157
Replace \ ``TOOL``\  with the name of any tool.
 
158
 
 
159
 
141
160
*******
142
161
AUTHORS
143
162
*******