Skip to content

Instantly share code, notes, and snippets.

@oldpatricka
Created July 24, 2012 20:04
Show Gist options
  • Save oldpatricka/3172280 to your computer and use it in GitHub Desktop.
Save oldpatricka/3172280 to your computer and use it in GitHub Desktop.
--- a/pyon/util/sflow.py
+++ b/pyon/util/sflow.py
@@ -90,7 +90,7 @@ class SFlowManager(object):
res = resource.getrusage(resource.RUSAGE_SELF)
# build and send counter structure
- csample = { 'counters_sample': {
+ csample = { 'counter_sample': {
'app_name': str(self._container.id),
'app_resources': {
'user_time': int(res.ru_utime * 1000),
@@ -101,14 +101,14 @@ class SFlowManager(object):
'fd_max': 0, # @TODO ""
'conn_open': 0, # @TODO couch/rabbit connection summary somehow
'conn_max': 0
+ },
+ 'app_workers':{
+ 'workers_active': len(self._container.proc_manager.proc_sup.children),
+ 'workers_idle': 0,
+ 'workers_max': 1024,
+ 'req_delayed': 0,
+ 'req_dropped': 0
}
- },
- 'app_workers':{
- 'workers_active': len(self._container.proc_manager.proc_sup.children),
- 'workers_idle': 0,
- 'workers_max': 1024,
- 'req_delayed': 0,
- 'req_dropped': 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment