Utils::Logging
- Save logs directly on the worker for offline upload via ulogs
save_and_upload_log($cmd, $file [, timeout => $timeout] [, screenshot => $screenshot] [, noupload => $noupload]);
Will run $cmd
on the SUT (without caring for the return code) and tee the standard output to a file called $file
. The $timeout
parameter specifies how long $cmd
may run. When $cmd
returns, the output file will be uploaded to openQA unless $noupload
is set. Afterwards a screenshot will be created if $screenshot
is set.
tar_and_upload_log($sources, $dest, [, timeout => $timeout] [, screenshot => $screenshot] [, noupload => $noupload]);
Will create an xz compressed tar archive with filename $dest
from the folder(s) listed in $sources
. The return code of tar
will be ignored. The $timeout
parameter specifies how long tar
may run. When tar
returns, the output file will be uploaded to openQA unless $noupload
is set. Afterwards a screenshot will be created if $screenshot
is set.
save_and_upload_systemd_unit_log($unit);
Saves the journal of the systemd unit $unit
to journal_$unit.log
and uploads it to openQA.
save_ulog($out $filename);
Creates a file from a string, the file is then saved in the ulogs directory of the worker running isotovideo. This is particularily useful when the SUT has no network connection.
example:
$out = script_output('journalctl --no-pager -axb -o short-precise'); $filename = "my-test.log";
export_healthcheck_basic();
Upload healthcheck logs that make sense for any failure. This includes cpu
, memory
and fdisk
.
select_log_console();
Select 'log-console' with higher timeout on screen check to even cover systems that react very slow due to high background load or high memory consumption. This should be especially useful in post_fail_hook
implementations.
upload_coredumps(%args);
Upload all coredumps to logs. In case `proceed_on_failure` key is set to true, errors during logs collection will be ignored, which is usefull for the post_fail_hook calls.
export_logs();
This method will call several other log gathering methods from this class.
problem_detection();
This method will upload a number of logs and debugging information. This includes a log with all journal errors, a systemd unit plot and the output of rpmverify. The files will be uploaded as a single tarball called problem_detection_logs.tar.xz
.
upload_solvertestcase_logs();
Upload /tmp/solverTestCase.tar.bz2
.
export_logs_basic();
Upload logs that make sense for any failure. This includes /proc/loadavg
, ps axf
, complete journal since last boot, dmesg
and /etc/sysconfig
.
export_logs_desktop();
Upload several KDE, GNOME, X11, GDM and SDDM related logs and configs.