Ejemplo n.º 1
0
 def collect_crm_report_file(self, time, conn):
     tmp_path = "/tmp/crm_report"
     crm_log_path = self.config.get_log_path()
     debug_log = action.DebugLog(conn)
     utils.prt_log(conn, f"Start to collect crm_report...", 0)
     debug_log.get_crm_report_file(time, tmp_path)
     debug_log.download_log(tmp_path, crm_log_path)
     debug_log.rm_log_dir(tmp_path)
Ejemplo n.º 2
0
 def get_log(self):
     tmp_path = "/tmp/dmesg"
     lst_get_log = []
     lst_mkdir = []
     lst_download = []
     lst_del_log = []
     log_path = self.config.get_log_path()
     utils.prt_log('', f"Start to collect dmesg file ...", 0)
     for conn in self.conn.list_vplx_ssh:
         debug_log = action.DebugLog(conn)
         lst_mkdir.append(gevent.spawn(debug_log.mkdir_log_dir, tmp_path))
         lst_get_log.append(gevent.spawn(debug_log.get_dmesg_file,
                                         tmp_path))
         lst_download.append(
             gevent.spawn(debug_log.download_log, tmp_path, log_path))
         lst_del_log.append(gevent.spawn(debug_log.rm_log_dir, tmp_path))
     gevent.joinall(lst_get_log)
     gevent.joinall(lst_mkdir)
     gevent.joinall(lst_download)
     gevent.joinall(lst_mkdir)
     utils.prt_log('', f"Finished to collect dmesg file ...", 0)
Ejemplo n.º 3
0
 def clean_dmesg(self):
     lst_clean_dmesg = []
     for conn in self.conn.list_vplx_ssh:
         debug_log = action.DebugLog(conn)
         lst_clean_dmesg.append(gevent.spawn(debug_log.clear_dmesg))
     gevent.joinall(lst_clean_dmesg)