Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Str Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore BoolOpAnd NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore NameLoad Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad With Call NameLoad NameLoad NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareLt Call NameLoad NameLoad Num body Continue Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num If BoolOpOr UnaryOpNot NameLoad CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq NameLoad Str body Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Continue Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue If BoolOpAnd CompareGt Call NameLoad NameLoad Num SubscriptLoad NameLoad Index Num body Assign NameStore SubscriptLoad NameLoad Index Num orelse Assign NameStore Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr BinOpAdd BinOpAdd NameLoad Str SubscriptLoad NameLoad Index Num For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
Copyright 2013 LinkedIn Corp. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 collections defaultdict N/A datetime N/A gc N/A logging N/A os N/A re N/A numpy naarad.metrics.metric Metric N/A naarad.utils N/A logger N/A N/A logging getLogger naarad.metrics.ProcMeminfoMetric ProcMeminfoMetric N/A Metric N/A N/A 
  logs of /proc/vmstat
  The raw log file is assumed to have a timestamp prefix of all lines. E.g. in the format of "2013-01-02 03:55:22.13456 compact_fail 36"
  The log lines can be generated by   'cat /proc/vmstat | sed "s/^/$(date +%Y-%m-%d\ %H:%M:%S.%05N)	/" '
   N/A sub_metrics None __init__ N/A N/A self metric_type infile_list hostname aggr_metrics output_directory resource_path label ts_start ts_end rule_strings important_sub_metrics anomaly_detection_metrics N/A other_options N/A N/A N/A N/A Metric __init__ self metric_type infile_list hostname aggr_metrics output_directory resource_path label ts_start ts_end rule_strings important_sub_metrics anomaly_detection_metrics N/A N/A key val N/A N/A other_options iteritems N/A N/A N/A setattr self key N/A N/A val split N/A N/A self sub_metric_description N/A MemTotal MemFree Buffers Cached Total memory in KB Total free memory in KB Size of buffers in KB Size of page cache in KB N/A parse N/A N/A self N/A N/A N/A 
    Parse the vmstat file
    :return: status of the metric parse
     N/A file_status True N/A input_file N/A self infile_list N/A N/A file_status N/A file_status N/A N/A N/A naarad utils is_valid_file input_file N/A N/A file_status N/A N/A False N/A status True N/A data N/A N/A input_file N/A self infile_list N/A N/A N/A N/A logger info Processing : %s input_file N/A timestamp_format None N/A N/A open input_file fh N/A N/A line fh N/A N/A words N/A N/A line split N/A N/A N/A len words 3 N/A N/A N/A ts N/A N/A N/A words N/A 0 N/A words N/A 1 N/A N/A N/A timestamp_format N/A timestamp_format unknown N/A N/A timestamp_format N/A N/A N/A naarad utils detect_timestamp_format ts N/A N/A timestamp_format unknown N/A N/A N/A ts N/A N/A N/A naarad utils get_standardized_timestamp ts timestamp_format N/A N/A N/A self ts_out_of_range ts N/A N/A N/A col N/A N/A N/A words N/A 2 strip : N/A N/A N/A self sub_metrics N/A col N/A self sub_metrics N/A N/A N/A N/A N/A N/A len words 4 N/A words N/A 4 N/A N/A unit N/A words N/A 4 N/A N/A unit pages N/A N/A N/A self sub_metric_unit N/A col unit N/A N/A col N/A self column_csv_map N/A N/A out_csv N/A N/A self column_csv_map N/A col N/A N/A out_csv N/A N/A self get_csv col N/A N/A data N/A out_csv N/A N/A N/A N/A N/A data N/A out_csv append N/A N/A ts , N/A words N/A 3 N/A csv N/A N/A data keys N/A N/A N/A N/A N/A self csv_files append csv N/A N/A open csv w fh N/A N/A N/A N/A fh write N/A N/A join N/A sorted N/A data N/A csv N/A status N/A N/A