TIREX-T...IR-CHECK(1)

🌸 tirex-tiledir-check(1) β€” bestie edition πŸ’–

okay so picture this: a Perl-contributed user manual, the User Contributed Perl Documentation shelf, and it's all about tirex-tiledir-check. she's a little utility that walks your tile dir and tells you if anything's sus. let's get into it 🫢


✨ NAME ✨

tirex-tiledir-check β€” check tile dir, literally that's the whole job πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

tirex-tiledir-check [OPTIONS] MAP

one command, one MAP, a whole lot of options. let's go.


⭐ OPTIONS ⭐

  • -h, --help β€” pops up the help message, no thoughts head empty, just usage ✨
  • -c, --config=DIR β€” use the config directory DIR instead of /etc/tirex. she can live anywhere you want her to 🏠
  • -l, --list=FILE β€” write a list of tiles to FILE. format deets below, keep scrolling bestie πŸ’–
  • -s, --stats=FILE β€” write stats about the tiles to FILE. format deets below too 😌
  • -z, --minz=i β€” start processing at min zoom level i (default=0) πŸ¦‹
  • -Z, --maxz=i β€” stop processing at max zoom level i (default=19). note the capital Z, she's a different girlie than -z πŸ‘‘
  • -c, --config=DIR β€” wait no, already said that one. moving on, we stay accurate here 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? she walks recursively through the tiles directory for the MAP you gave her and checks for:

  • wrong directory names
  • wrong file names
  • files that just can't be accessed 😭

if she finds problems, the messages go to STDERR. dramatic but useful.

when you hand her the --list and/or --stats options, she outputs info about each tile and/or generates statistics, respectively. the list and the stats get written to the filenames you gave β€” and if you pass - as the filename, STDOUT is used instead ✨

🚨 important: you can only use STDOUT for either the list file or the stats file. not both. pick a lane bestie.
⚠️ caution, and she means it: 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. don't be the girlie who fills the crontab and then wonders why everything is slow πŸ’€

🌈 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. go off, data queen πŸ“Š


πŸ¦‹ 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's 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. math girlie math πŸ“βœ¨

this file can be displayed in a human readable format with the program tirex-tiledir-stat. it's also read by several Munin plugins πŸ‘€


πŸ“ FILES πŸ“

  • /etc/tirex/tirex.conf β€” the configuration file. that's her home base 🏑

πŸ’€ DIAGNOSTICS πŸ’€

  • returns 0 if no errors were found βœ…
  • returns 1 if there were errors 😭
  • if there were errors parsing the command line, 2 is returned 🚩

exit codes are exit codes, we respect them in this house.


πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

Frederik Ramm <frederik.ramm@geofabrik.de>, Jochen Topf <jochen.topf@geofabrik.de> and possibly others. icons, all of them πŸ’…


and that's the whole page bestie, no cap. this was perl v5.40.1, dated 2026-08-09 β€” mwah, periodt πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from