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
Line 
1#!/usr/bin/perl
2#-----------------------------------------------------------------------------
3#
4#  Tirex Tile Rendering System
5#
6#  munin/tirex-tiledir-tilecount-absolute
7#
8#-----------------------------------------------------------------------------
9
10use strict;
11use warnings;
12
13use Tirex::Munin::Tiledir::Tilecount;
14
15#-----------------------------------------------------------------------------
16
17my $config_file = exists($ENV{'TIREX_CONFIGFILE'}) ? $ENV{'TIREX_CONFIGFILE'} : $Tirex::TIREX_CONFIGFILE;
18Tirex::Config::init($config_file);
19
20#-----------------------------------------------------------------------------
21
22(my $execname = $0) =~ s{^.*/}{};
23
24my $map = 'default';
25if ($execname =~ /^tirex-tiledir-tilecount-absolute-(.*)$/)
26{
27    $map = $1;
28}
29
30my @z   = ('0-9', 10 .. 17);
31
32my $statsfile = Tirex::Config::get('stats_dir', $Tirex::STATS_DIR) . "/tiles-$map.stats";
33
34Tirex::Munin::Tiledir::Tilecount->new( map => $map, z => \@z, relative => 0 )->do( statsfile => $statsfile );
35
36
37#-- THE END ------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.