Hello,
So far, I'm having issues with CPUCollector.
Here is my setup:
OS: Ubuntu 14.10
Python Version: 2.7.8
Installed packages:
argparse==1.2.1
configobj==5.0.6
diamond==4.0.41
psutil==2.2.1
python-statsd==1.7.2
six==1.9.0
wsgiref==0.1.2
CPUCollector config:
(armory)~/D/A/diamond ❯❯❯ diamond-setup -c diamond.conf --print -C CPUCollector
CPUCollector {'path_suffix': '', 'ttl_multiplier': 2, 'measure_collector_time': False, 'percore': 'False', 'byte_unit': ['byte'], 'instance_prefix': 'instances', 'simple': 'True', 'interval': '60', 'enabled': True, 'xenfix': None, 'metrics_whitelist': None, 'normalize': 'False', 'metrics_blacklist': None, 'path_prefix': 'servers', 'path': 'cpu'}
Log with the issue:
[2015-04-18 20:26:41,088] [MainThread] servers.mars.cpu2.total.idle: 369.2
[2015-04-18 20:27:41,136] [MainThread] Sending idle 92.95|g
[2015-04-18 20:27:41,136] [MainThread] servers.mars.cpu2.cpu1.idle: 92.95
[2015-04-18 20:27:41,139] [MainThread] Sending idle 92.2833333333|g
[2015-04-18 20:27:41,139] [MainThread] servers.mars.cpu2.cpu0.idle: 92.2833333333
[2015-04-18 20:27:41,142] [MainThread] Sending idle 93.15|g
[2015-04-18 20:27:41,142] [MainThread] servers.mars.cpu2.cpu2.idle: 93.15
[2015-04-18 20:27:41,144] [MainThread] Sending idle 91.5666666667|g
[2015-04-18 20:27:41,144] [MainThread] servers.mars.cpu2.cpu3.idle: 91.5666666667
[2015-04-18 20:27:41,148] [MainThread] Sending idle 369.95|g
[2015-04-18 20:27:41,148] [MainThread] servers.mars.cpu2.total.idle: 369.95
diamond.conf
[[CPUCollector]]
enabled = True
percore = False
simple = True
(I tried configure CPUCollector.conf)
My /proc/stat file:
keys = ...
(armory)~/D/A/diamond ❯❯❯ cat /proc/stat
cpu 490759 1159 134813 11108860 125171 11 2189 0 0 0
cpu0 125085 166 38294 2767799 28333 9 914 0 0 0
cpu1 118958 204 29800 2777483 36090 1 981 0 0 0
cpu2 122389 358 34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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 149248245
btime 1429370024
processes 27783
procs_running 1
procs_blocked 0
softirq 11021933 1274264 2395017 5 566309 307362 0 3675328 1823649 11967 968032
I tried disable percore, use simple, tried normalize also but always getting the same value.
Any idea how I can fix this?
The ideal should return only %, example below with psutil:
In [2]: psutil.cpu_times_percent()
Out[2]: scputimes(user=4.5, nice=0.0, system=0.6, idle=90.6, iowait=4.2, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
Best Regards,