TRAFFIC_CACHE_TOOL(1)
๐ TRAFFIC_CACHE_TOOL(1) ๐
Apache Traffic Server ยท the cache management tool, bestie edition ๐
โจ NAME โจ
traffic_cache_tool โ the Traffic Server cache management tool ๐ซถ
๐ธ SYNOPSIS ๐ธ
traffic_cache_tool [OPTIONS] COMMAND [SUBCOMMAND ...] [OPTIONS]
๐ฆ DESCRIPTION ๐ฆ
okay so. traffic_cache_tool is literally designed to interact with the Traffic Server cache โ both for inspection and for modification, no cap. It uses a nested command keyword style for specifying operations, which is giving very much "choose your own adventure" but for disk spans.
There are some global options that apply to all commands. These should be specified before any command. And the way that they can be abbreviated to any unique initial substring? iconic. (e.g. "--sp" for "--span") ๐
--helpโ Prints a brief usage message along with the current command hierarchy. ur little map ๐บ๏ธ--spansโ Specify the span (storage) configuration. This can be a device, a cache directory, or a configuration file in the form ofstorage.config. In the latter case all devices listed in the configuration file become active. โจ--volumesโ Specify the volume configuration file in the format ofvolume.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. ๐ง--writeโ Enable writing to storage devices. If this flag is not present then all storage will be opened read only and no operation will write to any storage device. This makes "dry run" the default and actual changes require specifying this flag. ๐จ so real changes are opt-in, bestie, respect the safety rail.--aosโ Specific the average object size in bytes. This is used in various computations. It is identical toproxy.config.cache.min_average_object_size. ๐ข--inputโ Specify the input file or disk. ๐ฅ
๐ COMMANDS ๐
listโ 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. ๐ patience is a virtue fr frstripesโ Print internal stripe metadata.
clearโ Clear all the spans by writing updated span headers.spanโ Clears an specific span and it's stripes. The span to be cleared is specified via--device
dir_checkโ Perform diagnostics on the stripe directories. ๐ฉบfullโ Full check of the directories.freelistโ Validate the directory free lists.bucket_chainโ Validate the bucket chains in the directories.
volumesโ Compute storage allocation to stripes based on the volume configuration and print it. ๐งฎallocโ Allocate storage to stripes, updating the span and stripe headers.freeโ Allocate only free (unused) storage to volumes, updating span and stripe headers as needed.
initโ Initializes an uninitialized span and creates stripes on that span according to the volume and storage configuration The span to be initialized can be passed via--input๐ฑfindโ Determines the stripe in disk cache where the content corresponding to the provided URL may be cached. This command takes an input file which lists all the urls for which the stripe assignment needs to be determined. ๐
๐ EXAMPLES ๐
List the basic span data.:
traffic_cache_tool --spans=/usr/local/etc/trafficserver/storage.config list
Allocate unused storage space.:
traffic_cache_tool \
--spans=/usr/local/etc/trafficserver/storage.config \
--volumes=/usr/local/etc/trafficserver/volume.config \
alloc free
Clear all spans.:
traffic_cache_tool \
--spans=/usr/local/etc/trafficserver/storage.config \
--volumes=/usr/local/etc/trafficserver/volume.config \
clear
Clear a single span.:
traffic_cache_tool \
--span /opt/etc/trafficserver/storage.config \
--volume /opt/etc/trafficserver/volume.config \
clear span --device "/dev/sdb3" --write
Initialize a new span.:
traffic_cache_tool \
--span /opt/etc/trafficserver/storage.config \
--volume /opt/etc/trafficserver/volume.config \
init --input "/dev/sdb3" --write
Find Stripe Assignment.:
traffic_cache_tool \
--span /opt/etc/trafficserver/storage.config \
--volume /opt/etc/trafficserver/volume.config \
init --input "/home/user/urls.txt"
๐ SEE ALSO ๐
storage.config(5) volume.config(5),
๐ COPYRIGHT ๐
2026, dev@trafficserver.apache.org
and that's the whole page, bestie ๐ version 9.2, dated Feb 12, 2026 โ go read ur cache like the main character u are ๐โจ
๐ฆ where this page comes from
- ubuntu noble: trafficserver 9.2.3+ds-1+deb12u1ubuntu0.1 ยท Apache-2.0
- ubuntu questing: trafficserver 9.2.5+ds-1ubuntu2.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms