table of contents
TIREX-TILEDIR-CHECK(1) | User Contributed Perl Documentation | TIREX-TILEDIR-CHECK(1) |
NAME¶
tirex-tiledir-check - check tile dir
SYNOPSIS¶
tirex-tiledir-check [OPTIONS] MAP
OPTIONS¶
- -h, --help
- Display help message.
- -c, --config=DIR
- Use the config directory DIR instead of /etc/tirex.
- -l, --list=FILE
- Write list of tiles to FILE. See below for format.
- -s, --stats=FILE
- Write stats about tiles to FILE. See below for format.
- -z, --minz=i
- Start processing at min. zoom level i (default=0)
- -Z, --maxz=i
- Stop processing at max. zoom level i (default=19)
DESCRIPTION¶
Walks recursively through the tiles directory for the given MAP and checks for wrong directory or file names or files that can't be accessed. If problems are found, messages are written to STDERR.
When the --list and/or --stats options are given, it outputs information about each tile and/or generates statistics, respectively. The list and stats are written to the filenames given, if you give '-' as the filename STDOUT is used. You can only use STDOUT for either the list file or the stats file.
Caution: This command will go through all metatiles on your disk and stat each file. On a lightly loaded machine with lots of RAM this can go pretty quick, but under high IO loads it might take a long time. Take this into account if you want to run it regularly from cron or similar.
LIST FILE FORMAT¶
The list file is in CSV format with one line per metatile. The fields are:
- age
- Age of metatile in seconds.
- size
- Size in bytes of the metatile.
- blocks
- Number of blocks used for this metatile.
- metatile
- Description of metatile. Format: map=foo x=8 y=0 z=10
This data can be read with other programs to create statistics etc.
STATS FILE FORMAT¶
The stats file is in JSON format. It contains a hash with the names of all maps as keys and a list of zoom levels as their values. For each zoom level there is a nested hash containing the statistics:
- count - Number of tiles
- maxage - Maximum age in seconds
- maxblocks - Maximum number of blocks
- maxsize - Maximum file size in bytes
- minage - Minimum age in seconds
- minblocks - Minimum number of blocks
- minsize - Minimum file size in bytes
- sumage - Sum of ages in seconds
- sumblocks - Sum of number of blocks
- sumsize - Sum of file size in bytes
The sumage, sumblocks, and sumsize values can be divided by count to get the average.
This file can be displayed on a human readable format with the Program tirex-tiledir-stat. It is also read by several Munin plugins.
FILES¶
- /etc/tirex/tirex.conf
- The configuration file.
DIAGNOSTICS¶
Returns 0 if no errors were found or 1 if there were errors. If there were errors parsing the command line 2 is returned.
SEE ALSO¶
AUTHORS¶
Frederik Ramm <frederik.ramm@geofabrik.de>, Jochen Topf <jochen.topf@geofabrik.de> and possibly others.
2023-04-11 | perl v5.36.0 |