#NEWLINE# def UploadClientLogFiles( client ) : #NEWLINE# #INDENT# 'Uploads the Munki client log files to the server.\n\n  Args:\n    client: A SimianAuthClient object.\n  ' #NEWLINE# managed_installs_dir = munkicommon . pref ( 'ManagedInstallDir' ) #NEWLINE# log_file_paths = [ os . path . join ( managed_installs_dir , 'InstallInfo.plist' ) , os . path . join ( managed_installs_dir , 'ManagedInstallReport.plist' ) , os . path . join ( managed_installs_dir , 'Logs' , 'ManagedSoftwareUpdate.log' ) , '/Users/Shared/.SelfServeManifest' , '/var/log/system.log' , '/var/log/debug.log' , '/var/log/install.log' ] #NEWLINE# for log_file_path in log_file_paths : #NEWLINE# #INDENT# if os . path . exists ( log_file_path ) : #NEWLINE# #INDENT# client . UploadFile ( path , 'log' ) #NEWLINE# #UNINDENT# #UNINDENT# ( return_code , stdout , _ ) = Exec ( [ '/bin/ps' , '-ef' ] ) #NEWLINE# if ( not return_code ) : #NEWLINE# #INDENT# path = os . path . join ( tempfile . mkdtemp ( prefix = 'munki_ps_ef_output_' , dir = '/tmp' ) , 'ps_ef_output' ) #NEWLINE# f = open ( path , 'w' ) #NEWLINE# f . write ( stdout ) #NEWLINE# f . close ( ) #NEWLINE# client . UploadFile ( path , 'log' )