Home | History | Annotate | Download | only in server

Lines Matching full:host

12     lambda host, test_start_time: None)
15 lambda host, test_start_time: None)
21 def get_crashdumps(host, test_start_time):
22 get_site_crashdumps(host, test_start_time)
26 def get_crashinfo(host, test_start_time):
34 get_crashdumps(host, test_start_time)
36 if wait_for_machine_to_recover(host):
38 get_site_crashinfo(host, test_start_time)
40 crashinfo_dir = get_crashinfo_dir(host, 'crashinfo')
41 collect_messages(host)
42 collect_command(host, "dmesg", os.path.join(crashinfo_dir, "dmesg"))
43 collect_uncollected_logs(host)
48 collect_log_file(host, constants.LOG_DIR, log_path)
53 collect_log_file(host, constants.LOG_CONSOLE_RAMOOPS, log_path)
59 collect_log_file(host, constants.LOG_I915_ERROR_STATE,
68 def wait_for_machine_to_recover(host, hours_to_wait=HOURS_TO_WAIT):
71 @param host: A RemoteHost instance to wait on
77 if host.is_up():
78 logging.info("%s already up, collecting crash info", host.hostname)
82 hours_to_wait, host.hostname, current_time)
83 if not host.wait_up(timeout=hours_to_wait * 3600):
86 host.hostname)
89 logging.info("%s is back up, collecting crash info", host.hostname)
93 def get_crashinfo_dir(host, dir_prefix):
96 @param host: The RemoteHost object that crashinfo will be collected from
101 host_resultdir = getattr(getattr(host, "job", None), "resultdir", None)
106 infodir = os.path.join(infodir, "%s.%s" % (dir_prefix, host.hostname))
112 def collect_log_file(host, log_path, dest_path, use_tmp=False):
119 @param host: The RemoteHost to collect logs from
123 on the host and download logs from there.
131 tmpdir = host.run('mktemp -d', stdout_tee=devnull).stdout.strip()
132 host.run('cp -rp %s %s' % (log_path, tmpdir))
134 host.get_file(source_path, dest_path, preserve_perm=False)
136 host.run('rm -rf %s' % tmpdir)
141 def collect_command(host, command, dest_path):
148 @param host: The RemoteHost to collect from
157 result = host.run(command, stdout_tee=devnull).stdout
165 def collect_uncollected_logs(host):
168 @param host: The RemoteHost to collect from
170 if host.job:
172 logs = host.job.get_client_logs()
174 if hostname == host.hostname:
177 host.get_file(remote_path + "/", local_path + "/")
183 def collect_messages(host):
186 If host.VAR_LOG_MESSAGE_COPY_PATH is on the remote machine, collects
188 are already present in host.VAR_LOG_MESSAGE_COPY_PATH. If it is not
191 @param host: The RemoteHost to collect from
193 crashinfo_dir = get_crashinfo_dir(host, 'crashinfo')
201 # grab the files from the remote host
202 collect_log_file(host, host.VAR_LOG_MESSAGES_COPY_PATH,
204 collect_log_file(host, "/var/log/messages", messages_raw)