Skip to content

Commit 02f4edc

Browse files
CacheTool: Doc update.
1 parent e7adbf0 commit 02f4edc

File tree

1 file changed

+67
-27
lines changed

1 file changed

+67
-27
lines changed

doc/appendices/command-line/traffic_cache_tool.en.rst

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,64 +22,104 @@
2222
traffic_cache_tool
2323
******************
2424

25+
========
2526
Synopsis
2627
========
2728

28-
:program:`traffic_cache_tool` [OPTIONS] SUBCOMMAND [OPTIONS]
29+
:program:`traffic_cache_tool` [OPTIONS] COMMAND [SUBCOMMAND ...] [OPTIONS]
2930

3031
.. _traffic-cache-tool-commands:
3132

33+
===========
3234
Description
3335
===========
3436

35-
:program:`traffic_cache_tool` is designed to interact with the |TS| cache both for inspection and modification.
37+
:program:`traffic_cache_tool` is designed to interact with the |TS| cache both for inspection and
38+
modification. It uses a nested command keyword style for specifying operations. There are some
39+
global options that apply to all commands. These should be specified before any command. These can
40+
be abbreviated to any unique initial substring (e.g. "--sp" for "--span").
3641

37-
:program:`traffic_cache_tool alloc`
38-
Perform cache storage allocation operations.
39-
:program:`traffic_cache_tool list`
40-
Display information about the cache.
42+
.. program:: traffic_cache_tool
4143

42-
Options
43-
=======
44+
.. option:: --help
4445

45-
.. program:: traffic_cache_tool
46+
Prints a brief usage message along with the current command hierarchy.
4647

47-
.. option:: --span
48+
.. option:: --spans
4849

49-
Specify the span (storage) to operate one. This can be a device, a cache directory, or a configuration file in the format of :file:`storage.config`. In the latter case all devices listed in the configuration file become active.
50+
Specify the span (storage) configuration. This can be a device, a cache directory, or a
51+
configuration file in the formof :file:`storage.config`. In the latter case all devices listed
52+
in the configuration file become active.
5053

51-
.. option:: --volume
54+
.. option:: --volumes
5255

53-
Specify the volume configuration file in the format of :file:`volume.config`. This is important primarily for allocation operations where having the volume configuration is needed in order to properly allocate storage in spans to specific volumes.
56+
Specify the volume configuration file in the format of :file:`volume.config`. This is important
57+
primarily for allocation operations where having the volume configuration is needed in order to
58+
properly allocate storage in spans to specific volumes.
5459

5560
.. option:: --write
5661

57-
Enable writing to storage devices. If this flag is not present then no operation will write to any storage device. This makes "dry run" the default and actual changes require specifying this flag.
62+
Enable writing to storage devices. If this flag is not present then all storage will be opened
63+
read only and no operation will write to any storage device. This makes "dry run" the default and
64+
actual changes require specifying this flag.
65+
66+
.. option:: --aos
5867

59-
Subcommands
68+
Specific the average object size in bytes. This is used in various computations. It is identical
69+
to :ts:cv:`proxy.config.cache.min_average_object_size`.
70+
71+
===========
72+
Commands
6073
===========
6174

62-
traffic_cache_tool alloc
63-
------------------------
64-
.. program:: traffic_cache_tool alloc
65-
.. option:: free
75+
``list``
76+
Search the spans for stripe data and display it. This is potentially slow as large sections of
77+
the disk may need to be read to find the stripe headers.
78+
79+
``stripes``
80+
Print internal stripe metadata.
81+
82+
``clear``
83+
Clear spans by writing updated span headers.
6684

67-
Allocate space on all spans that are empty. Requires a volume confiuration file to be specified.
85+
``dir_check``
86+
Perform diagnostics on the stripe directories.
6887

69-
traffic_cache_tool list
70-
-----------------------
71-
.. program:: traffic_cache_tool list
72-
.. option:: stripes
88+
``full``
89+
Full check of the directories.
7390

74-
Search the spans for stripe data and display it. This is potentially slow as large sections of the disk may need to be read to find the stripe headers.
91+
``freelist``
92+
Validate the directory free lists.
7593

94+
``bucket_chain``
95+
Validate the bucket chains in the directories.
96+
97+
``volumes``
98+
Compute storage allocation to stripes based on the volume configuration and print it.
99+
100+
``alloc``
101+
Allocate storage to stripes, updating the span and stripe headers.
102+
103+
``free``
104+
Allocate only free (unused) storage to volumes, updating span and stripe headers as needed.
105+
106+
107+
========
76108
Examples
77109
========
78110

79-
List the basic span data.
111+
List the basic span data.::
112+
113+
traffic_cache_tool --spans=/usr/local/etc/trafficserver/storage.config list
80114

81-
$ traffic_cache_tool list
115+
Allocate unused storage space.::
82116

117+
traffic_cache_tool \
118+
--spans=/usr/local/etc/trafficserver/storage.config \
119+
--volumes=/usr/local/etc/trafficserver/volume.config \
120+
alloc free
121+
122+
========
83123
See also
84124
========
85125

0 commit comments

Comments
 (0)