Module Import alias Import alias Import alias ImportFrom alias Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore Call AttributeLoad NameLoad attr Str body If Call AttributeLoad NameLoad attr NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad For NameStore SubscriptLoad NameLoad Slice body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body If BoolOpOr CompareNotEq NameLoad Num UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad body Assign NameStore ListLoad Str Str Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad Str attr GeneratorExp NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad CompareNotIn NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr Str body If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot CompareGt Call NameLoad NameLoad Num body Print Str Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call NameLoad Str body Print BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str If CompareIn SubscriptLoad NameLoad Index Num NameLoad body If CompareEq SubscriptLoad NameLoad Index Num Str body If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Print Str Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num orelse Print Str Expr Call AttributeLoad NameLoad attr NameLoad Print Str Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr
N/A N/A os N/A sys N/A re subprocess * N/A N/A N/A os environ N/A PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin N/A ERR_OK 0 N/A ERR_WARN 1 N/A ERR_CRIT 2 N/A ERR_UNKN 3 SarNRPE N/A N/A N/A Call sar and parse statistics returning in NRPE format __init__ N/A N/A self command device N/A None N/A N/A sar N/A Popen command shell True stdout PIPE stderr PIPE N/A N/A sout serr N/A N/A sar communicate N/A N/A device None N/A N/A N/A columns data N/A N/A self SortOutput sout N/A N/A N/A columns data N/A N/A self SortCombinedOutput sout device N/A N/A N/A self Formatter columns data N/A SortOutput N/A N/A self sarout N/A N/A N/A Sort output of sar command, return column and data tuple N/A data N/A N/A N/A N/A N/A sarout split N/A -2 split N/A N/A N/A data pop 0 N/A columns N/A N/A N/A N/A N/A sarout split N/A -4 split N/A N/A N/A columns pop 0 N/A N/A N/A columns pop 0 N/A N/A columns data N/A SortCombinedOutput N/A N/A self sarout device N/A N/A N/A Sorts column and data output from combined report and displays
        only relevant information returns column and data tuple N/A find_columns True N/A mycolumns N/A N/A mydata N/A N/A search N/A N/A re compile ^Average: N/A line N/A N/A sarout split N/A N/A N/A N/A search match line N/A N/A find_columns N/A N/A N/A N/A mycolumns append line N/A find_columns False N/A N/A N/A N/A mydata append line N/A search N/A N/A re compile N/A ^Average:\s.*%s\s.* device N/A line N/A mydata N/A N/A N/A N/A N/A N/A search match line N/A N/A N/A N/A mydata remove line N/A mycolumns N/A N/A N/A mycolumns N/A 0 split N/A mydata N/A N/A N/A mydata N/A 0 split N/A N/A N/A mycolumns pop 0 N/A N/A N/A mydata pop 0 N/A N/A mycolumns mydata N/A Formatter N/A N/A self columns data N/A N/A N/A Construct nrpe format performance data N/A search N/A N/A re compile ^[a-zA-Z]+$ N/A N/A self stats N/A N/A i N/A range N/A len columns N/A N/A N/A N/A i 0 N/A N/A N/A search match N/A data N/A i N/A N/A badchars N/A % / N/A N/A columns N/A i N/A N/A join N/A j N/A j N/A columns N/A i N/A j badchars N/A string N/A %s=%s N/A N/A N/A N/A columns N/A i strip %/ N/A N/A N/A N/A N/A data N/A i strip replace , . N/A string N/A N/A string replace =: =0.0 N/A string N/A N/A string replace  nice=all N/A string N/A N/A string replace N/A N/A N/A N/A self stats append string N/A N/A CheckBin N/A N/A program N/A N/A N/A Ensure the program exists in the PATH N/A path N/A N/A N/A N/A N/A os environ get PATH split : N/A N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join path program N/A N/A N/A N/A os path isdir N/A N/A N/A os path join path program N/A N/A N/A N/A N/A os path join path program N/A False N/A Main N/A N/A args N/A N/A N/A N/A N/A N/A len args 1 N/A N/A ERROR: no profile selected N/A N/A N/A sys exit ERR_UNKN N/A N/A N/A CheckBin sar N/A N/A N/A ERROR: sar not found on PATH (%s), install sysstat N/A N/A os environ N/A PATH N/A N/A N/A sys exit ERR_CRIT N/A myOpts N/A N/A N/A myOpts N/A pagestat sar -B 1 1 N/A N/A myOpts N/A cpu sar 1 1 N/A N/A myOpts N/A memory_util sar -r 1 1 N/A N/A myOpts N/A memory_stat sar -R 1 1 N/A N/A myOpts N/A io_transfer sar -b 1 1 N/A N/A myOpts N/A queueln_load sar -q 1 1 N/A N/A myOpts N/A swap_util sar -S 1 1 N/A N/A myOpts N/A swap_stat sar -W 1 1 N/A N/A myOpts N/A task sar -w 1 1 N/A N/A myOpts N/A kernel sar -v 1 1 N/A N/A myOpts N/A disk sar -d -p 1 1 N/A N/A N/A args N/A 1 myOpts N/A N/A N/A N/A args N/A 1 disk N/A N/A N/A N/A len args 2 N/A N/A sar N/A SarNRPE N/A myOpts N/A N/A args N/A 1 N/A args N/A 2 N/A N/A ERROR: no device specified N/A N/A N/A sys exit ERR_UNKN N/A N/A sar N/A SarNRPE N/A myOpts N/A N/A args N/A 1 N/A N/A ERROR: option not defined N/A N/A N/A sys exit ERR_UNKN N/A sar OK| N/A N/A join N/A sar stats N/A N/A N/A __name__ __main__ N/A N/A N/A Main N/A sys argv