source: subversion/applications/utils/tirex/munin/tirex-tiledir-tilecount-absolute @ 28904

Last change on this file since 28904 was 23394, checked in by jochen, 9 years ago

(modified) patch from Peter Körner:

  • munin scripts read config file name from TIREX_CONFIGFILE environment variable if available
  • requestsrendered and rendertime munin scripts aggregate data from all maps by default instead of using just the map named 'default'
  • Property svn:executable set to *
File size: 1.0 KB
RevLine 
[20274]1#!/usr/bin/perl
2#-----------------------------------------------------------------------------
3#
4#  Tirex Tile Rendering System
5#
[21462]6#  munin/tirex-tiledir-tilecount-absolute
[20274]7#
8#-----------------------------------------------------------------------------
9
10use strict;
11use warnings;
12
13use Tirex::Munin::Tiledir::Tilecount;
14
15#-----------------------------------------------------------------------------
16
[23394]17my $config_file = exists($ENV{'TIREX_CONFIGFILE'}) ? $ENV{'TIREX_CONFIGFILE'} : $Tirex::TIREX_CONFIGFILE;
[20274]18Tirex::Config::init($config_file);
19
20#-----------------------------------------------------------------------------
21
[21462]22(my $execname = $0) =~ s{^.*/}{};
23
[20492]24my $map = 'default';
[21462]25if ($execname =~ /^tirex-tiledir-tilecount-absolute-(.*)$/)
26{
27    $map = $1;
28}
29
[20434]30my @z   = ('0-9', 10 .. 17);
[20274]31
[21462]32my $statsfile = Tirex::Config::get('stats_dir', $Tirex::STATS_DIR) . "/tiles-$map.stats";
[20274]33
[21462]34Tirex::Munin::Tiledir::Tilecount->new( map => $map, z => \@z, relative => 0 )->do( statsfile => $statsfile );
[20274]35
[21462]36
[20274]37#-- THE END ------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.