~ttx/swift/release-1.4.2

« back to all changes in this revision

Viewing changes to bin/swift-container-stats-logger

  • Committer: Tarmac
  • Author(s): gholt, FUJITA Tomonori, John Dickinson, David Goetz, John Dickinson, Joe Arnold, Scott Simpson, joe at cloudscaling, Thierry Carrez
  • Date: 2011-07-26 09:08:37 UTC
  • mfrom: (305.1.1 milestone-proposed)
  • Revision ID: tarmac-20110726090837-fwlvja8dnk7nkppw
Merge 1.4.2 development from trunk (rev331)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# Copyright (c) 2010-2011 OpenStack, LLC.
3
 
#
4
 
# Licensed under the Apache License, Version 2.0 (the "License");
5
 
# you may not use this file except in compliance with the License.
6
 
# You may obtain a copy of the License at
7
 
#
8
 
#    http://www.apache.org/licenses/LICENSE-2.0
9
 
#
10
 
# Unless required by applicable law or agreed to in writing, software
11
 
# distributed under the License is distributed on an "AS IS" BASIS,
12
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
 
# implied.
14
 
# See the License for the specific language governing permissions and
15
 
# limitations under the License.
16
 
 
17
 
from swift.stats.db_stats_collector import ContainerStatsCollector
18
 
from swift.common.utils import parse_options
19
 
from swift.common.daemon import run_daemon
20
 
 
21
 
if __name__ == '__main__':
22
 
    conf_file, options = parse_options()
23
 
    # currently ContainerStatsCollector only supports run_once
24
 
    options['once'] = True
25
 
    run_daemon(ContainerStatsCollector, conf_file,
26
 
               section_name='log-processor-container-stats',
27
 
               log_name="container-stats", **options)