Module Expr Str Import alias Import alias Import alias ImportFrom alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str Assign NameStore Num Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str NameLoad Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Slice Num Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body AugAssignSub SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list If Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub Num BinOpDiv BinOpMult SubscriptLoad NameLoad Index BinOpSub Call NameLoad NameLoad Num Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Call NameLoad BinOpMod Str NameLoad Return NameLoad Assign NameStore Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Num For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Continue AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq NameLoad Str body Assign NameStore Str orelse If UnaryOpNot Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str body Continue Assign SubscriptStore NameLoad Index NameLoad Dict If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr ListLoad NameLoad NameLoad If BoolOpAnd Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str CompareEq NameLoad Str CompareGt NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad BinOpDiv Call AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If BoolOpOr CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr body If CompareIn Str NameLoad body AugAssignAdd NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad If CompareGt NameLoad Num body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpDiv Call NameLoad SubscriptLoad NameLoad Index NameLoad Num orelse If CompareGt NameLoad Num body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad orelse If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad Num Call NameLoad NameLoad body Assign NameStore BinOpAdd Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str If Call NameLoad SubscriptLoad NameLoad Index NameLoad Str body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpDiv Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpDiv Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpDiv Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpDiv Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
The CPUCollector collects CPU utilization metric using /proc/stat.

#### Dependencies

 * /proc/stat

 N/A diamond.collector N/A os N/A time diamond.collector str_to_bool N/A N/A N/A psutil N/A N/A N/A ImportError N/A N/A psutil None CPUCollector N/A N/A N/A diamond collector Collector N/A N/A PROC /proc/stat N/A INTERVAL 1 N/A MAX_VALUES N/A user nice system idle iowait irq softirq steal guest guest_nice N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER N/A N/A diamond collector MAX_COUNTER get_default_config_help N/A N/A self N/A N/A N/A config_help N/A N/A N/A super CPUCollector self get_default_config_help N/A N/A N/A config_help update N/A percore simple normalize Collect metrics per cpu core or just total only return aggregate CPU% metric for cpu totals, divide by the number of CPUs N/A config_help N/A get_default_config N/A N/A self N/A N/A N/A 
        Returns the default collector settings
         N/A config N/A N/A N/A super CPUCollector self get_default_config N/A N/A N/A config update N/A path percore xenfix simple normalize cpu True None False False N/A config N/A collect N/A N/A self N/A N/A N/A 
        Collector cpu stats
         cpu_time_list N/A N/A N/A N/A N/A 
            get cpu time list
             N/A statFile N/A open N/A self PROC r N/A timeList N/A N/A N/A N/A N/A statFile readline split N/A 2 6 N/A i N/A range N/A len timeList N/A N/A N/A timeList N/A i N/A int N/A timeList N/A i N/A N/A N/A statFile close N/A timeList N/A cpu_delta_time N/A N/A interval N/A N/A N/A 
            Get before and after cpu times for usage calc
             N/A pre_check N/A cpu_time_list N/A N/A N/A time sleep interval N/A post_check N/A cpu_time_list N/A i N/A range N/A len pre_check N/A N/A N/A post_check N/A i N/A pre_check N/A i N/A post_check N/A N/A N/A N/A os access N/A self PROC N/A os R_OK N/A N/A N/A str_to_bool N/A N/A self config N/A simple N/A N/A dt N/A cpu_delta_time N/A self INTERVAL N/A cpuPct N/A 100 N/A N/A N/A dt N/A N/A N/A len dt 1 100.0 N/A sum dt N/A N/A N/A self publish percent N/A str N/A %.4f cpuPct N/A True N/A results N/A N/A file N/A open N/A self PROC N/A ncpus -1 N/A line file N/A N/A N/A N/A N/A line startswith cpu N/A N/A N/A ncpus 1 N/A elements N/A N/A line split N/A cpu N/A elements N/A 0 N/A N/A cpu cpu N/A N/A cpu total N/A N/A N/A N/A str_to_bool N/A N/A self config N/A percore N/A N/A N/A N/A results N/A cpu N/A N/A N/A N/A len elements 2 N/A N/A N/A N/A results N/A cpu N/A user N/A elements N/A 1 N/A N/A N/A len elements 3 N/A N/A N/A N/A results N/A cpu N/A nice N/A elements N/A 2 N/A N/A N/A len elements 4 N/A N/A N/A N/A results N/A cpu N/A system N/A elements N/A 3 N/A N/A N/A len elements 5 N/A N/A N/A N/A results N/A cpu N/A idle N/A elements N/A 4 N/A N/A N/A len elements 6 N/A N/A N/A N/A results N/A cpu N/A iowait N/A elements N/A 5 N/A N/A N/A len elements 7 N/A N/A N/A N/A results N/A cpu N/A irq N/A elements N/A 6 N/A N/A N/A len elements 8 N/A N/A N/A N/A results N/A cpu N/A softirq N/A elements N/A 7 N/A N/A N/A len elements 9 N/A N/A N/A N/A results N/A cpu N/A steal N/A elements N/A 8 N/A N/A N/A len elements 10 N/A N/A N/A N/A results N/A cpu N/A guest N/A elements N/A 9 N/A N/A N/A len elements 11 N/A N/A N/A N/A results N/A cpu N/A guest_nice N/A elements N/A 10 N/A N/A N/A file close N/A metrics N/A N/A cpu N/A N/A results keys N/A N/A stats N/A results N/A cpu N/A s N/A N/A stats keys N/A N/A metric_name N/A N/A . join N/A cpu s N/A N/A N/A str_to_bool N/A N/A self config N/A normalize N/A cpu total N/A ncpus 0 N/A N/A N/A metrics N/A metric_name N/A N/A N/A self derivative metric_name N/A long N/A stats N/A s N/A N/A self MAX_VALUES N/A s ncpus N/A N/A N/A metrics N/A metric_name N/A N/A self derivative metric_name N/A long N/A stats N/A s N/A N/A self MAX_VALUES N/A s N/A N/A N/A N/A N/A self config N/A xenfix None N/A N/A N/A self config N/A xenfix True N/A N/A N/A N/A N/A os path isdir /proc/xen N/A N/A total 0 N/A metric_name N/A N/A metrics keys N/A N/A N/A cpu0. metric_name N/A N/A total N/A int N/A metrics N/A metric_name N/A N/A total 110 N/A N/A N/A N/A self config N/A xenfix True N/A mname N/A N/A metrics keys N/A N/A N/A .idle mname N/A N/A N/A metrics N/A mname N/A N/A float N/A metrics N/A mname 2 N/A N/A N/A total 0 N/A N/A N/A N/A self config N/A xenfix False N/A N/A N/A N/A self config N/A xenfix False N/A metric_name N/A N/A metrics keys N/A N/A N/A N/A self publish metric_name N/A metrics N/A metric_name N/A True N/A N/A N/A psutil N/A N/A N/A N/A N/A self log error Unable to import psutil N/A N/A N/A N/A self log error No cpu metrics retrieved N/A None N/A cpu_time N/A N/A psutil cpu_times True N/A cpu_count N/A len cpu_time N/A total_time N/A N/A psutil cpu_times N/A i N/A range 0 N/A len cpu_time N/A N/A metric_name N/A cpu N/A str i N/A N/A N/A self publish N/A metric_name .user N/A N/A self derivative N/A metric_name .user N/A N/A cpu_time N/A i user N/A N/A self MAX_VALUES N/A user N/A N/A hasattr N/A cpu_time N/A i nice N/A N/A N/A N/A self publish N/A metric_name .nice N/A N/A self derivative N/A metric_name .nice N/A N/A cpu_time N/A i nice N/A N/A self MAX_VALUES N/A nice N/A N/A N/A self publish N/A metric_name .system N/A N/A self derivative N/A metric_name .system N/A N/A cpu_time N/A i system N/A N/A self MAX_VALUES N/A system N/A N/A N/A self publish N/A metric_name .idle N/A N/A self derivative N/A metric_name .idle N/A N/A cpu_time N/A i idle N/A N/A self MAX_VALUES N/A idle N/A metric_name total N/A N/A N/A self publish N/A metric_name .user N/A N/A N/A self derivative N/A metric_name .user N/A total_time user N/A N/A self MAX_VALUES N/A user cpu_count N/A N/A hasattr total_time nice N/A N/A N/A N/A self publish N/A metric_name .nice N/A N/A N/A self derivative N/A metric_name .nice N/A total_time nice N/A N/A self MAX_VALUES N/A nice cpu_count N/A N/A N/A self publish N/A metric_name .system N/A N/A N/A self derivative N/A metric_name .system N/A total_time system N/A N/A self MAX_VALUES N/A system cpu_count N/A N/A N/A self publish N/A metric_name .idle N/A N/A N/A self derivative N/A metric_name .idle N/A total_time idle N/A N/A self MAX_VALUES N/A idle cpu_count N/A True N/A None N/A N/A