Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias FunctionDef arguments args defaults body Expr Str Assign NameStore Str TryExcept body Assign NameStore Call NameLoad Str NameLoad If UnaryOpNot CompareEq NameLoad Str body Print Str handlers ExceptHandler type NameLoad name NameStore body Raise NameLoad If CompareNotEq Call AttributeLoad NameLoad attr Num body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad Str NameLoad If UnaryOpNot NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num orelse If CompareLt NameLoad Num body Print Str Expr Call AttributeLoad NameLoad attr Num orelse If CompareLt NameLoad Str body Return Str orelse Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Return Call NameLoad BinOpDiv Call NameLoad NameLoad Num orelse If CompareNotEq NameLoad Str body Return Num orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareGt NameLoad Num body Return Call AttributeLoad Str attr ListLoad Call NameLoad Call NameLoad NameLoad Num Str orelse Assign NameStore BinOpMult NameLoad Num Return Call AttributeLoad Str attr ListLoad Call NameLoad Call NameLoad NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad Assign NameStore SubscriptLoad Call NameLoad BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr keyword Str keyword Str Index Num Assign NameStore Call AttributeLoad Str attr ListLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str For NameStore NameLoad body TryFinally body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Raise NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore TupleLoad ListLoad ListLoad ListLoad ListLoad TryExcept body With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str NameStore body With Call NameLoad NameLoad Str NameStore body For NameStore TupleLoad NameLoad NameLoad body For NameStore NameLoad body If CompareGt SubscriptLoad NameLoad Slice Num NameLoad body If CompareLt SubscriptLoad NameLoad Slice Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Print BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore NameLoad For NameStore NameLoad body If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Assign NameStore ListLoad Str Str Str Str If NameLoad body For NameStore NameLoad body If CompareGt SubscriptLoad NameLoad Slice Num NameLoad body If CompareEq NameLoad Str body If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body If Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body If Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad For NameStore NameLoad body If CompareGt SubscriptLoad NameLoad Slice Num NameLoad body If CompareEq NameLoad Str body If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body If Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body If Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore NameStore TupleLoad Num Num Num For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Num Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num AugAssignAdd NameStore NameLoad orelse If CompareNotEq SubscriptLoad NameLoad Index Num Str body If CompareNotEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Num Num orelse If CompareNotEq SubscriptLoad NameLoad Index Num Str body If CompareNotEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Num Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Call NameLoad SubscriptLoad NameLoad Index Num If CompareEq NameLoad Num body Assign NameStore Str orelse Assign NameStore BinOpMod Str Call NameLoad NameLoad orelse Assign TupleStore NameStore NameStore NameStore TupleLoad ListLoad ListLoad ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad If UnaryOpNot CompareEq SubscriptLoad NameLoad Index Num Str body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Str If CompareGt Call NameLoad NameLoad Num body If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpMod Str Call NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore TupleLoad ListLoad ListLoad ListLoad ListLoad ListLoad ListLoad ListLoad For NameStore NameLoad body If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Slice Num If BoolOpOr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body If CompareEq SubscriptLoad NameLoad Index Num Str body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse Assign NameStore Dict Str Str Str Str Str Str Str Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Return BinOpMod Str TupleLoad NameLoad NameLoad NameLoad orelse Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareGt NameLoad Num body If CompareLt NameLoad Num body Return Num orelse If CompareLt NameLoad Num body Return Num orelse If CompareLt NameLoad Num body Return Num orelse If CompareGtE NameLoad Num body Return Num orelse Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword SubscriptLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Slice Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call NameLoad Assign NameStore Call NameLoad orelse Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Print BinOpMult Str Num Str BinOpMult Str Num Str SubscriptLoad AttributeLoad NameLoad attr Slice Num Print Str NameLoad Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListLoad Str Call NameLoad NameLoad Str BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Str Call NameLoad BinOpSub NameLoad NameLoad Str Str If NameLoad body Assign NameStore ListLoad Str Str NameLoad Str AugAssignAdd NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Str Call NameLoad NameLoad Str If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str AugAssignAdd NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str AugAssignAdd NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str AugAssignAdd NameStore NameLoad Assign NameStore ListLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str AugAssignAdd NameStore NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Print Call AttributeLoad Str attr NameLoad Assign NameStore ListLoad Str AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Slice Num Str BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Slice Num Str Str BinOpAdd BinOpAdd Str Call AttributeLoad Str attr NameLoad Str Str Assign NameStore Call AttributeLoad Str attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A Parses Server.app's Caching Servers Debug Log, Sends Reports
   See README and LICENSE for more information. Originally created
   by Erik Gomez, pythonified by Allister Banks, 2015 N/A bz2 N/A collections N/A datetime N/A glob N/A optparse N/A os N/A re N/A subprocess N/A sys N/A tempfile CoreFoundation CFPreferencesCopyAppValue sanities N/A N/A N/A N/A N/A preflight checks to ensure compat., skipped if run in dev mode N/A pref_path /Library/Server/Caching/Config/Config.plist N/A N/A N/A logidentitypref N/A CFPreferencesCopyAppValue LogClientIdentity pref_path N/A N/A N/A logidentitypref true N/A N/A This will be a very spare/boring report if you don't run this command:
                  sudo serveradmin settings caching:LogClientIdentity = 1 N/A N/A N/A Exception N/A e N/A N/A e N/A N/A N/A N/A os geteuid 0 N/A N/A N/A exit For the final message send(only), this(currently) needs to be run with 'sudo'. N/A server_appvers N/A N/A N/A N/A N/A Checks for/gets server.app version, since we're forking between 4 and 5 N/A plist_path /Applications/Server.app/Contents/Info.plist N/A server_app_version N/A CFPreferencesCopyAppValue CFBundleShortVersionString plist_path N/A N/A server_app_version N/A N/A Can't find Server.app, are you running this on your Mac server instance? N/A N/A N/A sys exit 2 N/A N/A N/A server_app_version 4.1 N/A N/A Not Version 4.1(+) of Server.app N/A N/A N/A sys exit 3 N/A N/A N/A server_app_version 5.0 N/A N/A Four N/A N/A Five N/A normalize_gbs N/A N/A mb_or_gb val_to_operate_on N/A N/A N/A Used when calculating bandwidth. Takes an index to check, and if MB,
       returns the applicable index divided by 1024 to normalize on GBs N/A N/A mb_or_gb MB N/A N/A N/A float N/A N/A float val_to_operate_on 1024.0 N/A N/A N/A mb_or_gb GB N/A N/A 0.0 N/A N/A N/A float val_to_operate_on N/A alice N/A N/A list_to_get_extremes N/A N/A N/A One pill makes you taller... calculates bandwidth used delta N/A N/A N/A max list_to_get_extremes N/A min list_to_get_extremes N/A gen_mb_or_gb N/A N/A floaty N/A N/A N/A Shows bandwidth in MBs if less than 1GB. Returns string N/A N/A floaty 1.0 N/A N/A N/A N/A join N/A N/A str N/A round floaty 2 GBs N/A N/A megabyted_float N/A floaty 1024 N/A N/A N/A join N/A N/A str N/A round megabyted_float 2 MBs N/A get_start N/A N/A from_datetime N/A N/A N/A Calc start of reporting period datetime, returns as string N/A delta_object N/A N/A datetime timedelta days N/A int from_datetime N/A start_datetime N/A N/A str N/A N/A N/A N/A datetime datetime today delta_object N/A -3 N/A start_datetime N/A join_bzipped_logs N/A N/A dir_of_logs N/A N/A N/A Creates tempfile, wildcard searches for all archive logs, then uses bz2 module
       to unpack and append them all to the tempfile. Returns file(list of strings) once populated N/A unbzipped_logs N/A N/A N/A tempfile mkstemp suffix .log prefix sashayTemp- N/A 1 N/A das_bzips N/A N/A join N/A dir_of_logs /Debug-* N/A bunch_of_bzips N/A N/A glob glob das_bzips N/A opened_masterlog N/A open unbzipped_logs w N/A archived_log bunch_of_bzips N/A N/A N/A N/A N/A N/A process_bz N/A N/A bz2 BZ2File archived_log N/A N/A N/A opened_masterlog write N/A N/A process_bz read N/A N/A N/A Exception N/A e N/A N/A e N/A N/A N/A N/A process_bz close N/A N/A N/A opened_masterlog close N/A unbzipped_logs N/A separate_range_build_list N/A N/A dir_of_logs unbzipped_logs start_datetime to_datetime server_vers N/A N/A N/A Opens current debug.log and un-bz'd logs and builds new list of loglines
       that fall within our reporting period. Returns two lists of strings: one for bandwidth,
       other for eventual parsing of filetypes served, device os/model, and ips devices accessed from. N/A N/A our_range_logline_str_list bandwidth_lines_list filetype_lines_list service_restart_timestamps N/A N/A N/A N/A N/A N/A N/A N/A N/A open N/A N/A N/A os path join dir_of_logs Debug.log rU current N/A N/A N/A open unbzipped_logs rU unzipped N/A N/A f N/A current unzipped N/A N/A line f N/A N/A N/A N/A line N/A 23 start_datetime N/A N/A N/A N/A line N/A 23 to_datetime N/A N/A N/A N/A our_range_logline_str_list append line N/A N/A N/A IOError N/A e N/A N/A N/A Operation failed: %s N/A e strerror N/A N/A N/A sys exit 4 N/A more_recent_svc_hup False N/A logline_str our_range_logline_str_list N/A N/A N/A Registration succeeded.  Resuming server. logline_str N/A N/A N/A N/A service_restart_timestamps append N/A logline_str N/A 23 N/A more_recent_svc_hup True N/A new_start_datetime N/A max service_restart_timestamps N/A excludes N/A egist public peers Opened EC Bad N/A filetypes N/A ipa epub pkg zip N/A more_recent_svc_hup N/A N/A logline_str our_range_logline_str_list N/A N/A N/A N/A logline_str N/A 23 new_start_datetime N/A N/A N/A server_vers Five N/A N/A N/A Served all logline_str N/A N/A N/A N/A bandwidth_lines_list append N/A N/A logline_str split N/A N/A N/A N/A any N/A N/A x logline_str N/A x excludes N/A N/A N/A any N/A N/A x logline_str N/A x filetypes N/A N/A N/A N/A filetype_lines_list append N/A N/A logline_str split N/A N/A N/A start: logline_str N/A N/A N/A N/A bandwidth_lines_list append N/A N/A logline_str split N/A N/A N/A N/A any N/A N/A x logline_str N/A x excludes N/A N/A N/A any N/A N/A x logline_str N/A x filetypes N/A N/A N/A N/A filetype_lines_list append N/A N/A logline_str split N/A N/A new_start_datetime start_datetime N/A logline_str our_range_logline_str_list N/A N/A N/A N/A logline_str N/A 23 start_datetime N/A N/A N/A server_vers Five N/A N/A N/A Served all logline_str N/A N/A N/A N/A bandwidth_lines_list append N/A N/A logline_str split N/A N/A N/A N/A any N/A N/A x logline_str N/A x excludes N/A N/A N/A any N/A N/A x logline_str N/A x filetypes N/A N/A N/A N/A filetype_lines_list append N/A N/A logline_str split N/A N/A N/A start: logline_str N/A N/A N/A N/A bandwidth_lines_list append N/A N/A logline_str split N/A N/A N/A N/A any N/A N/A x logline_str N/A x excludes N/A N/A N/A any N/A N/A x logline_str N/A x filetypes N/A N/A N/A N/A filetype_lines_list append N/A N/A logline_str split N/A N/A bandwidth_lines_list filetype_lines_list more_recent_svc_hup new_start_datetime N/A parse_bandwidth N/A N/A bandwidth_lines_list server_vers N/A N/A N/A On Server4, uses indexed fields in log lines to build list of bandwidth
       transferred, normalizes in GBs, then parses deltas for data served from
       cache or streamed from apple/peers. On 5, builds up totals. Returns strings N/A N/A server_vers Five N/A N/A N/A daily_total_from_cache daily_total_from_apple peer_amount N/A 0.0 0.0 0.0 N/A each bandwidth_lines_list N/A N/A N/A N/A each N/A 14 0 N/A N/A N/A N/A each N/A 15 GB N/A N/A this_loops_fromapple N/A N/A float N/A each N/A 14 1024 N/A N/A N/A N/A each N/A 15 GB N/A N/A this_loops_fromapple N/A float N/A each N/A 14 N/A daily_total_from_apple this_loops_fromapple N/A N/A N/A N/A each N/A 19 0 N/A N/A N/A N/A each N/A 20 GB N/A N/A peer_amount N/A N/A float N/A each N/A 19 1024 N/A N/A N/A N/A each N/A 10 0 N/A N/A N/A N/A each N/A 11 GB N/A N/A daily_total_from_cache N/A N/A float N/A each N/A 10 1024 N/A N/A N/A N/A each N/A 11 GB N/A N/A daily_total_from_cache N/A float N/A each N/A 10 N/A N/A peer_amount 0.0 N/A N/A peer_amount no peer servers detected N/A N/A peer_amount N/A along with %s from peers N/A gen_mb_or_gb peer_amount N/A N/A N/A logged_bytes_from_cache logged_bytes_from_apple logged_bytes_from_peers N/A N/A N/A N/A N/A each bandwidth_lines_list N/A N/A strip_parens N/A N/A each N/A 15 N/A 1 N/A N/A N/A logged_bytes_from_cache append N/A normalize_gbs N/A each N/A 6 N/A each N/A 5 N/A N/A N/A logged_bytes_from_apple append N/A normalize_gbs N/A each N/A 16 strip_parens N/A N/A N/A N/A each N/A 19 0 N/A N/A N/A N/A logged_bytes_from_peers append N/A normalize_gbs N/A each N/A 20 N/A each N/A 19 N/A daily_total_from_cache N/A alice logged_bytes_from_cache N/A daily_total_from_apple N/A alice logged_bytes_from_apple N/A peer_amount no peer servers detected N/A N/A N/A len logged_bytes_from_peers 1 N/A N/A N/A N/A max logged_bytes_from_peers 0.1 N/A N/A daily_total_from_peers N/A alice logged_bytes_from_peers N/A daily_total_from_apple N/A daily_total_from_apple daily_total_from_peers N/A peer_amount N/A along with %s from peers N/A gen_mb_or_gb daily_total_from_peers N/A N/A daily_total_from_cache daily_total_from_apple peer_amount N/A get_device_stats N/A N/A filetype_lines_list server_vers N/A N/A N/A Parses out device stats, returns list motherlode N/A N/A iplog oslog modellog ipas epubs pkgs zips N/A N/A N/A N/A N/A N/A N/A N/A N/A filelog filetype_lines_list N/A N/A N/A server_vers Five N/A N/A filelog N/A filelog N/A 2 N/A N/A N/A N/A N/A filelog N/A 5 startswith 172 N/A N/A N/A filelog N/A 5 startswith 192 N/A N/A N/A filelog N/A 5 startswith 10. N/A N/A strip_port N/A N/A filelog N/A 5 N/A -6 N/A N/A N/A iplog append strip_port N/A N/A N/A N/A N/A filelog N/A 10 startswith Darwin N/A N/A N/A N/A filelog N/A 7 (unknown N/A N/A N/A N/A modellog append Unknown Mac N/A N/A N/A N/A oslog append N/A filelog N/A 7 N/A N/A osver_dict N/A 12 13 14 15 Mac OS 10.8.x Mac OS 10.9.x Mac OS 10.10.x Mac OS 10.11.x N/A os_ver N/A N/A filelog N/A 10 N/A 7 9 N/A N/A N/A oslog append N/A N/A osver_dict get os_ver N/A N/A N/A len filelog 15 N/A N/A N/A N/A N/A filelog N/A 12 startswith dt: N/A N/A N/A N/A modellog append N/A N/A filelog N/A 8 N/A 6 N/A N/A N/A N/A modellog append N/A filelog N/A 12 N/A N/A N/A N/A modellog append N/A N/A filelog N/A 8 N/A 6 N/A N/A N/A N/A filelog N/A -1 endswith ipa N/A N/A N/A N/A ipas append N/A filelog N/A -1 N/A N/A N/A N/A N/A filelog N/A -1 endswith epub N/A N/A N/A N/A epubs append N/A filelog N/A -1 N/A N/A N/A N/A N/A filelog N/A -1 endswith pkg N/A N/A N/A N/A pkgs append N/A filelog N/A -1 N/A N/A N/A N/A N/A filelog N/A -1 endswith zip N/A N/A N/A N/A zips append N/A filelog N/A -1 N/A N/A iplog oslog modellog ipas epubs pkgs zips N/A parse_prods N/A N/A prodlist name N/A N/A N/A Returns a string with prod reporting format, or empty string if no products found N/A N/A N/A len prodlist 0 N/A N/A sum_of_prods N/A len prodlist N/A individ_prods N/A len N/A set prodlist N/A N/A %d different %s were requested %d times, 
 N/A individ_prods name sum_of_prods N/A N/A N/A report_rounder N/A N/A key_total N/A N/A N/A takes the total number of 'keyed' items and returns an int to round displayed results to N/A N/A key_total 10 N/A N/A N/A key_total 15 N/A N/A 10 N/A N/A N/A key_total 20 N/A N/A 15 N/A N/A N/A key_total 25 N/A N/A 20 N/A N/A N/A key_total 25 N/A N/A 25 N/A N/A key_total N/A main N/A N/A N/A N/A N/A p N/A N/A optparse OptionParser N/A N/A N/A p set_usage Usage: %prog [options] N/A N/A N/A p add_option --from -f dest from_datetime default 1 help (Integer) Number of days in the past to include in report.
                         Default is 24hrs from current timestamp N/A N/A N/A p add_option --through -t dest to_datetime default N/A N/A str N/A N/A N/A datetime datetime today N/A -3 help End of date range to report, in format '2015-06-30 12:00:00.000' N/A N/A N/A p add_option --net -n dest network_ips default True help Report on total/unique ips and subnets. N/A N/A N/A p add_option --modelvers -m dest modelvers default True help Report on iOS device versions and Macs (if logged). N/A N/A N/A p add_option --osrevs -r dest os_revisions default True help Report on iOS and Macs OS versions. N/A N/A N/A p add_option --ipa -i dest ipas default True help Report on total/unique ipas. N/A N/A N/A p add_option --epub -e dest epubs default True help Report on total/unique epubs. N/A N/A N/A p add_option --pkg -p dest pkgs default True help Report on total/unique pkgs. N/A N/A N/A p add_option --zip -z dest zips default True help Report on total/unique zips (assuming for iOS firmware). N/A N/A N/A p add_option --subject -s dest subject_prefix default Daily help Adds prefix to message, e.g. for denoting arbitrary date ranges, 'daily/weekly/monthly'. N/A N/A N/A p add_option --dev -d dest devmode default False help Skips sanity checks for dev work, remember to override dir_of_logs N/A N/A N/A p add_option --logs -l dest logdir default /Library/Server/Caching/Logs help Dir of caching server debug logs, default = /Library/Server/Caching/Logs N/A N/A options arguments N/A N/A p parse_args N/A N/A N/A options devmode N/A N/A N/A sanities N/A server_vers N/A server_appvers N/A N/A server_vers Five N/A dir_of_logs N/A options logdir N/A start_datetime N/A get_start N/A options from_datetime N/A unbzipped_logs N/A join_bzipped_logs dir_of_logs N/A N/A bandwidth_lines_list filetype_lines_list more_recent_svc_hup new_start_datetime N/A separate_range_build_list dir_of_logs unbzipped_logs start_datetime N/A options to_datetime server_vers N/A N/A options devmode N/A N/A N/A - 14 DEBUG N/A - 14 
All Args: N/A N/A sys argv N/A 1 N/A New(?) start_datetime: new_start_datetime N/A N/A daily_total_from_cache daily_total_from_apple peer_amount N/A parse_bandwidth bandwidth_lines_list server_vers N/A N/A iplog oslog modellog ipas epubs pkgs zips N/A get_device_stats filetype_lines_list server_vers N/A message N/A Download requests served from cache: N/A gen_mb_or_gb daily_total_from_cache N/A N/A Amount streamed from Apple ( N/A str peer_amount ): N/A gen_mb_or_gb daily_total_from_apple (Potential) Net bandwidth saved: N/A gen_mb_or_gb N/A daily_total_from_cache daily_total_from_apple N/A more_recent_svc_hup N/A N/A disclaimer1 N/A   * NOTE: Stats are only displayed from the last caching service restart, new_start_datetime N/A message disclaimer1 N/A N/A options modelvers N/A N/A sum_of_models N/A len modellog N/A individs N/A len N/A set modellog N/A key_total1 N/A report_rounder individs N/A counter N/A N/A collections Counter modellog N/A model_tally N/A The N/A str key_total1 most frequently seen types of devices (of N/A str individs unique devices in total, followed by their count) were: N/A str N/A N/A counter most_common key_total1 The server was accessed by those devices N/A str sum_of_models times, N/A N/A Unknown Mac modellog N/A N/A N/A N/A model_tally append (Unique devices above do not include some unspecified Macs) N/A message model_tally N/A N/A options network_ips N/A N/A subnet_list N/A N/A addy iplog N/A N/A just_sub N/A N/A re search (\d{1,3}\.){2}\d{1,3} addy N/A N/A N/A subnet_list append N/A N/A just_sub group N/A individ_subs N/A len N/A set subnet_list N/A key_total2 N/A report_rounder individ_subs N/A counter N/A N/A collections Counter subnet_list N/A ip_tally N/A IP ranges that devices most frequently accessed this server from were: N/A str N/A N/A counter most_common key_total2 N/A message ip_tally N/A N/A options os_revisions N/A N/A individ_osen N/A len N/A set oslog N/A key_total3 N/A report_rounder individ_osen N/A counter N/A N/A collections Counter oslog N/A os_tally N/A Of the N/A str individ_osen different OS versions seen across all devices, the N/A str key_total3 most frequent were: N/A str N/A N/A counter most_common key_total3 N/A message os_tally N/A final_filetypes N/A N/A N/A options ipas N/A N/A N/A N/A final_filetypes append N/A parse_prods ipas iPhone Applications N/A N/A options epubs N/A N/A N/A N/A final_filetypes append N/A parse_prods epubs iBooks N/A N/A options pkgs N/A N/A N/A N/A final_filetypes append N/A parse_prods pkgs Mac Applications and/or Updates N/A N/A options zips N/A N/A N/A N/A final_filetypes append N/A parse_prods zips iOS Updates (and other zip archives) N/A message final_filetypes N/A N/A options subject_prefix N/A N/A N/A N/A message insert 0 N/A options subject_prefix N/A N/A N/A join message N/A final_msg_list N/A /Applications/Server.app/Contents/ServerRoot/usr/sbin/server postAlert CustomAlert Common subject " N/A options subject_prefix Caching Server Data: N/A new_start_datetime N/A -4 through N/A N/A N/A options to_datetime N/A -4 " message N/A N/A " N/A N/A join message " <<<"" N/A final_message N/A N/A join final_msg_list N/A N/A N/A options devmode N/A N/A N/A N/A subprocess call final_message shell True N/A N/A N/A __name__ __main__ N/A N/A N/A main