Commit 915dd774 authored by Jonas Genannt's avatar Jonas Genannt

Imported Upstream version 0.9.15

parent 8a3b5268
Metadata-Version: 1.0
Name: carbon
Version: 0.9.14
Version: 0.9.15
Summary: Backend data caching and persistence daemon for Graphite
Home-page: http://graphite-project.github.com
Author: Chris Davis
......
......@@ -412,6 +412,9 @@ def get_default_parser(usage="%prog [options] <start|stop|status>"):
parser.add_option(
"--debug", action="store_true",
help="Run in the foreground, log to stdout")
parser.add_option(
"--syslog", action="store_true",
help="Write logs to syslog")
parser.add_option(
"--nodaemon", action="store_true",
help="Run in the foreground")
......
......@@ -38,4 +38,4 @@ resumeReceivingMetrics.addHandler(lambda: setattr(state, 'metricReceiversPaused'
# Avoid import circularities
from carbon import log
from carbon import log, state
......@@ -115,10 +115,11 @@ def recordMetrics():
# aggregator metrics
elif settings.program == 'carbon-aggregator':
from carbon.aggregator.buffers import BufferManager
record = aggregator_record
record('allocatedBuffers', len(carbon.aggregator.buffers.BufferManager))
record('allocatedBuffers', len(BufferManager))
record('bufferedDatapoints',
sum([b.size for b in carbon.aggregator.buffers.BufferManager.buffers.values()]))
sum([b.size for b in BufferManager.buffers.values()]))
record('aggregateDatapointsSent', myStats.get('aggregateDatapointsSent', 0))
# relay metrics
......
......@@ -2,6 +2,7 @@ import copy
import os
import pwd
import sys
import __builtin__
from os.path import abspath, basename, dirname
try:
......@@ -48,8 +49,8 @@ def run_twistd_plugin(filename):
return
# This isn't as evil as you might think
__builtins__["instance"] = options.instance
__builtins__["program"] = program
__builtin__.instance = options.instance
__builtin__.program = program
# Then forward applicable options to either twistd or to the plugin itself.
twistd_options = ["--no_save"]
......@@ -72,6 +73,8 @@ def run_twistd_plugin(filename):
twistd_options.extend(["--pidfile", options.pidfile])
if options.umask:
twistd_options.extend(["--umask", options.umask])
if options.syslog:
twistd_options.append("--syslog")
# Now for the plugin-specific options.
twistd_options.append(program)
......@@ -81,7 +84,7 @@ def run_twistd_plugin(filename):
for option_name, option_value in vars(options).items():
if (option_value is not None and
option_name not in ("debug", "profile", "profiler", "pidfile", "umask", "nodaemon")):
option_name not in ("debug", "profile", "profiler", "pidfile", "umask", "nodaemon", "syslog")):
twistd_options.extend(["--%s" % option_name.replace("_", "-"),
option_value])
......
......@@ -29,7 +29,7 @@ install_files += init_scripts
setup(
name='carbon',
version='0.9.14',
version='0.9.15',
url='http://graphite-project.github.com',
author='Chris Davis',
author_email='chrismd@gmail.com',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment